From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.1.3 (2006-06-01) on yquem.inria.fr X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=none autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by yquem.inria.fr (Postfix) with ESMTP id C9D7ABBAF for ; Fri, 8 Aug 2008 02:13:32 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AqECADwsm0iK54gDiGdsb2JhbACRPgEBAQ8gmwE X-IronPort-AV: E=Sophos;i="4.31,323,1215381600"; d="scan'208";a="28038052" Received: from rouge.crans.org ([138.231.136.3]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/ADH-AES256-SHA; 08 Aug 2008 02:13:04 +0200 Received: from localhost (localhost.crans.org [127.0.0.1]) by rouge.crans.org (Postfix) with ESMTP id 1772A805B; Fri, 8 Aug 2008 02:13:01 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at crans.org Received: from rouge.crans.org ([10.231.136.3]) by localhost (rouge.crans.org [10.231.136.3]) (amavisd-new, port 10024) with LMTP id LTZhIuCZxdHJ; Fri, 8 Aug 2008 02:13:01 +0200 (CEST) Received: from [88.185.141.188] (korell.glondu.net [88.185.141.188]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by rouge.crans.org (Postfix) with ESMTP id CAB8C801B; Fri, 8 Aug 2008 02:13:00 +0200 (CEST) Message-ID: <489B8F8C.1060409@glondu.net> Date: Fri, 08 Aug 2008 02:13:00 +0200 From: =?UTF-8?B?U3TDqXBoYW5lIEdsb25kdQ==?= User-Agent: Mozilla-Thunderbird 2.0.0.14 (X11/20080509) MIME-Version: 1.0 To: Jake Donham Cc: caml-list@yquem.inria.fr Subject: Re: [Caml-list] linking the same module more than once References: In-Reply-To: X-Enigmail-Version: 0.95.0 OpenPGP: id=FCE03DAA Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Spam: no; 0.00; cheers:01 phane:98 steph:98 phane:98 wrote:01 unix:01 exception:01 caml-list:01 cma:01 cma:01 caml:02 confusing:02 linking:02 linking:02 objects:02 Jake Donham wrote: > [...] > There is no trouble linking a module more than once, but different > parts of the code can wind up linked to different instances of the > module, leading to the confusing behavior that exception handling > seems not to work (and generally that things you think are equal are > not). [...] This is a problem I faced myself. My advice is to make sure some module is not linked twice in an executable. For this, I build a .cma with the same objects as the executable (basically, add -a to the final linking stage), and run ocamlobjinfo on the .cma. Sometimes, it is not up to you. See for example: http://caml.inria.fr/mantis/view.php?id=3D4568 > [...] > (I ran into this trying to use the ocaml-ssl module, which for some > reason builds unix.cma into ssl.cma.) I've also noticed this and submitted a patch upstream for this. Cheers, --=20 St=C3=A9phane Glondu