From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail3-relais-sop.national.inria.fr (mail3-relais-sop.national.inria.fr [192.134.164.104]) by yquem.inria.fr (Postfix) with ESMTP id 5D0C5BBAF for ; Fri, 2 Jul 2010 19:48:13 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgwCAHnDLUzRVaE0mGdsb2JhbACDHJxBCBUBAQEBAQgJDAcRIq4pgkaFWokBAQEDBYEkgwlyBIg1hyk X-IronPort-AV: E=Sophos;i="4.53,527,1272837600"; d="scan'208";a="53553997" Received: from mail-fx0-f52.google.com ([209.85.161.52]) by mail3-smtp-sop.national.inria.fr with ESMTP; 02 Jul 2010 19:48:13 +0200 Received: by fxm8 with SMTP id 8so3064531fxm.39 for ; Fri, 02 Jul 2010 10:48:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:sender:received :in-reply-to:references:date:x-google-sender-auth:message-id:subject :from:to:cc:content-type; bh=8stInplBpsVzs9BaE4P/062ByD69pv0xiEBH9oDIfnk=; b=aa259uQhg22zBI2Vs0CL64Wt/HUtKEP6w7tPyJHeoM5mIylHQcg8zbLxBVwrRyr/aR XVROXjoDkAxoxarpI7mmTetMdEyX4YX3p/wwZxM44ThWq5etR3qkxJ+KhfEGRaYGLOqe JY6taSstZHr47bmhvB11WU+4CnqnP6bJ4/76I= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:cc:content-type; b=f2GBypQjP+0sDmtSerg8RMjrMTuWOepKFOndrDfCTfNS8NVCGo7+Tgg938m08wCOc0 kIBkSyY/56PSdMMBClC5QeHuxRwJzT3jhi1+T8zSAPJPw9+XLP2R/bfaCBPqopDmovqD NKa5TClghjM0iYsEQEkjaYbHHvcQyY1R1a4EE= MIME-Version: 1.0 Received: by 10.223.123.145 with SMTP id p17mr1197563far.22.1278092891939; Fri, 02 Jul 2010 10:48:11 -0700 (PDT) Sender: daniel.c.buenzli@gmail.com Received: by 10.223.109.198 with HTTP; Fri, 2 Jul 2010 10:48:11 -0700 (PDT) In-Reply-To: References: <4C2D9E51.8010500@frisch.fr> <4C2DA5FD.4040004@frisch.fr> <4C2DA792.4010604@frisch.fr> Date: Fri, 2 Jul 2010 19:48:11 +0200 X-Google-Sender-Auth: 3fv104rEs2CjYpWNnz21_nMOPm4 Message-ID: Subject: Re: [Caml-list] Re: Dynlinking plugins defining the same unit name but with different implementations. From: =?UTF-8?Q?Daniel_B=C3=BCnzli?= To: Alain Frisch Cc: caml-list List Content-Type: text/plain; charset=UTF-8 X-Spam: no; 0.00; buenzli:01 ocaml:01 usr:01 lib:01 ocaml:01 bug:01 usr:01 ocamldep:01 ocamldep:01 ocamlc:01 cmo:01 ocamlc:01 cmo:01 ocamlopt:01 cmx:01 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