Version franaise
Home About Download Resources Contact us
Browse thread
Dynlinking plugins defining the same unit name but with different implementations.
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Daniel_Bünzli <daniel.buenzli@e...>
Subject: Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations.
Now on Linux 2.6.32-23-generic #37-Ubuntu SMP Fri Jun 11 07:54:58 UTC
2010 i686 GNU/Linux

with exactly the same code that know works on osx and ocaml 3.12 from
svn. I get the following problem when running my test program.

error loading shared library:
/home/dbuenzli/sync/dynlinkt/_build/a/a.cmxs: undefined symbol:
camlPervasives__$5e_1112
error loading shared library:
/home/dbuenzli/sync/dynlinkt/_build/b/b.cmxs: undefined symbol:
camlPervasives__$5e_1112

I tried to add /usr/local/lib/ocaml to LD_LIBRARY_PATH but without
success. Any hint ? Is that a bug or am I missing something ?

Thanks for your help,

Daniel

P.S. Here's how these things are compiled by ocamlbuild

ocamlbuild -classic-display a.cmxs b.cmxs test.native
/usr/local/bin/ocamldep.opt -modules a/a.ml > a/a.ml.depends
/usr/local/bin/ocamldep.opt -modules a/m.ml > a/m.ml.depends
/usr/local/bin/ocamldep.opt -modules plugin.ml > plugin.ml.depends
/usr/local/bin/ocamlc.opt -c -I a -I c -I b -o a/m.cmo a/m.ml
/usr/local/bin/ocamlc.opt -c -I c -I a -I b -o plugin.cmo plugin.ml
/usr/local/bin/ocamlc.opt -c -I a -I c -I b -o a/a.cmo a/a.ml
/usr/local/bin/ocamlopt.opt -c -I a -I c -I b -o a/m.cmx a/m.ml
/usr/local/bin/ocamlopt.opt -c -I c -I a -I b -o plugin.cmx plugin.ml
/usr/local/bin/ocamlopt.opt -c -I a -I c -I b -o a/a.cmx a/a.ml
/usr/local/bin/ocamlopt.opt -shared a/m.cmx a/a.cmx -o a/a.cmxs
/usr/local/bin/ocamldep.opt -modules b/b.ml > b/b.ml.depends
/usr/local/bin/ocamldep.opt -modules b/m.ml > b/m.ml.depends
/usr/local/bin/ocamlc.opt -c -I b -I c -I a -o b/m.cmo b/m.ml
/usr/local/bin/ocamlc.opt -c -I b -I c -I a -o b/b.cmo b/b.ml
/usr/local/bin/ocamlopt.opt -c -I b -I c -I a -o b/m.cmx b/m.ml
/usr/local/bin/ocamlopt.opt -c -I b -I c -I a -o b/b.cmx b/b.ml
/usr/local/bin/ocamlopt.opt -shared b/m.cmx b/b.cmx -o b/b.cmxs
/usr/local/bin/ocamldep.opt -modules test.ml > test.ml.depends
/usr/local/bin/ocamlc.opt -c -I c -I a -I b -o test.cmo test.ml
/usr/local/bin/ocamlopt.opt -c -I c -I a -I b -o test.cmx test.ml
/usr/local/bin/ocamlopt.opt dynlink.cmxa plugin.cmx test.cmx -o test.native