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.2 required=5.0 tests=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 5A15CBBCA for ; Thu, 3 Apr 2008 15:33:15 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AhYCAON59EfOvjGufGdsb2JhbACRVwEBCwUCBwcWmgA X-IronPort-AV: E=Sophos;i="4.25,598,1199660400"; d="scan'208";a="10378371" Received: from web54604.mail.re2.yahoo.com ([206.190.49.174]) by mail1-smtp-roc.national.inria.fr with SMTP; 03 Apr 2008 15:33:14 +0200 Received: (qmail 35775 invoked by uid 60001); 3 Apr 2008 13:33:14 -0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=s1024; d=yahoo.com; h=X-YMail-OSG:Received:Date:From:Subject:To:In-Reply-To:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-ID; b=VgkaUFRiqjYGa2dmT6T4gpJzAgxkeIzvLudjTMKhpTTWNv18FiBUoxbU1DaOGspmxigOxBxeSuDIuKTPQ7X49n39sPEFnNOQEbfVN0Z4y7jLDbevnEo9VL6h68BJgyTwU6bYUmcY2RLTQk3eOi+JSN6t7DPYe1lYr71rxOBCqe0=; X-YMail-OSG: d99b5u4VM1kWjHSmVY0LtZoxoHbJUbTbAyHDXCAnRPEFt8V_MZp__qXTxKxrCtKnNL7RuL4PZ9CUEY83T4C5nXhqC8el8A3DOqKAfkI9c73r9SFm0y.DpMV_c3BF4A-- Received: from [82.155.120.75] by web54604.mail.re2.yahoo.com via HTTP; Thu, 03 Apr 2008 14:33:13 BST Date: Thu, 3 Apr 2008 14:33:13 +0100 (BST) From: Dario Teixeira Subject: Re: [Caml-list] Ocamlnet and EINPROGRESS To: caml-list@yquem.inria.fr In-Reply-To: <47F4834D.6010800@glondu.net> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <974585.31607.qm@web54604.mail.re2.yahoo.com> X-Spam: no; 0.00; ocamlnet:01 -linkpkg:01 -linkpkg:01 ocamlfind:01 wiki:01 ocamlfind:01 ocaml:01 ocaml:01 unix:01 caml-list:01 cma:01 binary:02 linking:02 linking:02 module:03 > With these rules, you link the Unix module twice. Try without -linkpkg > in the first rule. More generally, avoid using -linkpkg when making .cma > unless you know what you are doing (use it only in the final stage of > linking). Indeed. And on that note I would like to report a similar problem with the "ocamlfind+ocamlbuild" plugin that was discussed on this list some weeks ago, and available on the Ocamlbuild wiki: http://brion.inria.fr/gallium/index.php/Using_ocamlfind_with_ocamlbuild This is the offending code: (* When one link an OCaml library/binary/package, one should use -linkpkg. *) flag ["ocaml"; "link"] & A"-linkpkg"; As Stéphane mentioned, -linkpkg should normally not be used on libraries. (I have personally run into problems because of this). The solution I am using is to apply -linkpkg only when linking programmes: (* When linking Ocaml programmes (and programmes only!), we use -linkpkg. *) flag ["ocaml"; "link"; "program"] & A"-linkpkg"; Regards, Dario Teixeira ___________________________________________________________ Yahoo! For Good helps you make a difference http://uk.promotions.yahoo.com/forgood/