From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id q28GW3EW029352 for ; Thu, 8 Mar 2012 17:32:03 +0100 X-IronPort-AV: E=Sophos;i="4.73,552,1325458800"; d="scan'208";a="135069851" Received: from top-wifi.irisa.fr ([131.254.66.192]) by mail4-relais-sop.national.inria.fr with ESMTP/TLS/AES128-SHA; 08 Mar 2012 17:31:58 +0100 Mime-Version: 1.0 (Apple Message framework v1257) Content-Type: text/plain; charset=iso-8859-1 From: Alan Schmitt In-Reply-To: <20120308172558.4eb849c9@caladan.esterel-technologies.com> Date: Thu, 8 Mar 2012 17:31:58 +0100 Cc: Gabriel Scherer , caml-list list Message-Id: <57418AA2-BC39-480E-B702-98F4528BF334@polytechnique.org> References: <74F89B4A-9C34-4A33-8DAA-8A12CF9EF03B@polytechnique.org> <20120308172558.4eb849c9@caladan.esterel-technologies.com> To: =?iso-8859-1?Q?J=E9r=E9mie_Dimino?= X-Mailer: Apple Mail (2.1257) Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q28GW3EW029352 Subject: Re: [Caml-list] state of native dynlink on os x On 8 mars 2012, at 17:25, Jérémie Dimino wrote: > Le Thu, 8 Mar 2012 17:16:30 +0100, > Gabriel Scherer a écrit : > >> This error is not Mac-related (I can reproduce it on my Debian). >> I believe it is a result from the "link-by-need" semantics of the .cma >> and .cmxa: loader.ml does not explicitly depend on test, so when >> producing the executable test.cmxa isn't linked (modules included >> .cm{x,}a, contrarily to .cm{x,o}, are only linked when they are a >> runtime dependency of one of the other modules). >> >> I can remove the error by either: >> - compiling to "test.cmx" instead of "test.cmxa" >> - or adding a dummy dependency in loader.ml: >> let () = ignore (Test.f) > > You can also use -linkall for building loader.native. In fact -linkall > should always be used when you are using dynlink plugins. That was it. Thanks a lot! Alan