From: Jacques Garrigue <garrigue@kurims.kyoto-u.ac.jp>
To: lionelsacks@yahoo.co.uk
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Shared library problem (newbi)
Date: Wed, 18 Aug 2004 11:53:40 +0900 (JST) [thread overview]
Message-ID: <20040818.115340.85412029.garrigue@kurims.kyoto-u.ac.jp> (raw)
In-Reply-To: <BD451ECD.36A8%lionelsacks@yahoo.co.uk>
From: Lionel Sacks <lionelsacks@yahoo.co.uk>
> 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
prev parent reply other threads:[~2004-08-18 2:53 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-15 13:08 Lionel Sacks
2004-08-15 15:44 ` Paul Snively
2004-08-15 21:57 ` David Brown
2004-08-18 2:53 ` Jacques Garrigue [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040818.115340.85412029.garrigue@kurims.kyoto-u.ac.jp \
--to=garrigue@kurims.kyoto-u.ac.jp \
--cc=caml-list@inria.fr \
--cc=lionelsacks@yahoo.co.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).