From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id EAA20795; Wed, 18 Aug 2004 04:53:50 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id EAA20884 for ; Wed, 18 Aug 2004 04:53:49 +0200 (MET DST) Received: from kurims.kurims.kyoto-u.ac.jp (kurims.kurims.kyoto-u.ac.jp [130.54.16.1]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i7I2rlRM014045 for ; Wed, 18 Aug 2004 04:53:48 +0200 Received: from localhost (suiren.kurims.kyoto-u.ac.jp [130.54.16.25]) by kurims.kurims.kyoto-u.ac.jp (8.9.3p2-20030924/3.7W) with ESMTP id LAA26625; Wed, 18 Aug 2004 11:53:42 +0900 (JST) Date: Wed, 18 Aug 2004 11:53:40 +0900 (JST) Message-Id: <20040818.115340.85412029.garrigue@kurims.kyoto-u.ac.jp> To: lionelsacks@yahoo.co.uk Cc: caml-list@inria.fr Subject: Re: [Caml-list] Shared library problem (newbi) From: Jacques Garrigue In-Reply-To: References: X-Mailer: Mew version 4.0.64 on Emacs 21.3 / Mule 5.0 (SAKAKI) Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Miltered: at concorde with ID 4122C4BB.000 by Joe's j-chkmail (http://j-chkmail.ensmp.fr)! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 jacques:01 lionel:01 lablgtk:01 fink:01 3.07:01 lablgtk:01 wwwfun:01 olabl:01 complied:01 compiles:01 labltk:01 ocamlrun:01 stublibs:01 stublibs:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk From: Lionel Sacks > Problem is this; I'm trying to install/run nab on my little iBookG4/Panther. > http://nab.epfl.ch/ > > It requires ocaml, gtk and lablgtk. > I've used fink to install ocaml (3.07+2) and gtk (1.2.10) > Lablgtk comes from > http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/lablgtk.html > Complied and installed my self (version 1.2.7) > > So far so good. Test/demo progs work. Labgtk and gtk are v.1 as required (I > haven't installed the v.2 series) > > Nab compiles fine and the command line version works OK. > However, when I try to run the graphical version (that uses the tcltc/labtk > etc). You got me confused here: you're using lablgtk, not labltk... > lsacks$ ./bin/nabviz-top > Fatal error: cannot load shared library dllstr > Reason: dyld: ocamlrun multiple definitions of symbol _re_partial_match > /sw/lib/ocaml/stublibs/dllstr.so definition of _re_partial_match > /sw/lib/ocaml/stublibs/dllstr.so definition of _re_partial_match Interesting problem. Looking at the Makefile the cause is clear: str.cma is linked twice in nabviz-top. Apparently, OSX's dyld doesn't like to open the same dll twice. Will have to do something about it. By the way, the fink discussion is irrelevant here: ocaml will use the same dynamic loading whether you use fink or not (or I hope so.) I join a patch for nab's Makefile. More generally, when you have problems with dynamic loading, the fastest way to solve them is to add -custom in the linking step. This also solves the problem in this case. Cheers, Jacques Garrigue --- Makefile Wed Aug 18 11:37:35 2004 +++ Makefile.new Wed Aug 18 11:44:54 2004 @@ -103,8 +103,8 @@ THREADS_LIB = $(LIB_DIR)/threads/threads$(CMA) -GTK_LIBS = $(GTK_DIR)/lablgtk$(CMA) $(UNIX_LIB) $(STR_LIB) -GTK_TH_LIBS = $(UNIX_LIB) $(THREADS_LIB) $(STR_LIB) $(GTK_DIR)/lablgtk$(CMA) +GTK_LIBS = $(GTK_DIR)/lablgtk$(CMA) $(UNIX_LIB) +GTK_TH_LIBS = $(UNIX_LIB) $(THREADS_LIB) $(GTK_DIR)/lablgtk$(CMA) GTK_TH_OBJS = $(GTK_DIR)/gtkThread$(CMO) $(GTK_DIR)/gtkInit$(CMO) $(GTK_DIR)/gtkThInit$(CMO) GTK_INIT_OBJS = $(GTK_DIR)/gtkInit$(CMO) ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners