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 q28GQKxh029006 for ; Thu, 8 Mar 2012 17:26:20 +0100 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiEFAFXdWE/VuiYS/2dsb2JhbABDhF9Wr2iBB4IKAQEEAQwXVgULCQIaAiYCAiE2BhOIBQmoMJIygS+ICYYggRYElUSLI4R2gmQ X-IronPort-AV: E=Sophos;i="4.73,552,1325458800"; d="scan'208";a="135068727" Received: from solaria.dimino.org ([213.186.38.18]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 08 Mar 2012 17:26:14 +0100 Received: from caladan (caladan.dim [10.200.42.14]) by solaria.dimino.org (Postfix) with ESMTP id 3C06280053; Thu, 8 Mar 2012 17:26:14 +0100 (CET) Received: from caladan.esterel-technologies.com (localhost [127.0.0.1]) by caladan (Postfix) with ESMTP id A8391FF834; Thu, 8 Mar 2012 17:25:58 +0100 (CET) Date: Thu, 8 Mar 2012 17:25:58 +0100 From: =?UTF-8?B?SsOpcsOpbWll?= Dimino To: Gabriel Scherer Cc: Alan Schmitt , caml-list list Message-ID: <20120308172558.4eb849c9@caladan.esterel-technologies.com> In-Reply-To: References: <74F89B4A-9C34-4A33-8DAA-8A12CF9EF03B@polytechnique.org> X-Mailer: Claws Mail 3.8.0 (GTK+ 2.24.9; x86_64-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-MIME-Autoconverted: from quoted-printable to 8bit by walapai.inria.fr id q28GQKxh029006 Subject: Re: [Caml-list] state of native dynlink on os x 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. -- Jérémie