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 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 95259BB84 for ; Mon, 6 Oct 2008 21:43:09 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AtgDAG0H6kjAXQIniGdsb2JhbACBcYoZh1gBAQEVIqMAhnCBag X-IronPort-AV: E=Sophos;i="4.33,368,1220220000"; d="asc'?scan'208";a="18320792" Received: from concorde.inria.fr ([192.93.2.39]) by mail1-smtp-roc.national.inria.fr with ESMTP; 06 Oct 2008 21:43:09 +0200 Received: from mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by concorde.inria.fr (8.13.6/8.13.6) with ESMTP id m96Jh8nP012314 (version=TLSv1/SSLv3 cipher=RC4-SHA bits=128 verify=OK) for ; Mon, 6 Oct 2008 21:43:09 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AnoBAOgG6kjUGyojmmdsb2JhbACBcYoZh1gBAQEBAQYNCgcRA6J5hnCBag X-IronPort-AV: E=Sophos;i="4.33,368,1220220000"; d="asc'?scan'208";a="29962022" Received: from smtp5-g19.free.fr ([212.27.42.35]) by mail4-smtp-sop.national.inria.fr with ESMTP; 06 Oct 2008 21:43:08 +0200 Received: from smtp5-g19.free.fr (localhost.localdomain [127.0.0.1]) by smtp5-g19.free.fr (Postfix) with ESMTP id 6B49D3EA212; Mon, 6 Oct 2008 21:43:08 +0200 (CEST) Received: from ausone.inria.fr (home.feydakins.org [82.229.164.236]) by smtp5-g19.free.fr (Postfix) with SMTP id 196AC3EA1F4; Mon, 6 Oct 2008 21:43:08 +0200 (CEST) Received: by ausone.inria.fr (sSMTP sendmail emulation); Mon, _d Oct 2008 21:42:22 +0200 From: "Nicolas Pouillard" Cc: caml-list Subject: Re: [Caml-list] ocamlbuild not including dependencies with mlpack To: Ashish Agarwal References: In-Reply-To: Date: Mon, 06 Oct 2008 21:42:22 +0200 Message-Id: <1223322139-sup-2877@ausone.local> User-Agent: Sup/git Content-Type: multipart/signed; protocol="application/pgp-signature"; boundary="=-1223322142-815308-27115-6742-1-="; micalg="pgp-sha1" MIME-Version: 1.0 X-Miltered: at concorde with ID 48EA6A4C.000 by Joe's j-chkmail (http://j-chkmail . ensmp . fr)! X-Spam: no; 0.00; dependencies:01 mylib:01 mylib:01 ocamlfind:01 ocamlc:01 -linkpkg:01 cmo:01 cmo:01 ocamlfind:01 ocamlc:01 -linkpkg:01 'let':01 caml-list:01 precisely:01 cma:01 X-Attachments: cset="UTF-8" type="application/pgp-signature" name="signature.asc" name="signature.asc" --=-1223322142-815308-27115-6742-1-= Content-Type: text/plain; charset=UTF-8 Excerpts from Ashish Agarwal's message of Mon Oct 06 19:49:16 +0200 2008: > Ocamlbuild seems to not include dependent modules when building a library, > when that library is defined by an mlpack file. However, it works fine if I > manually pack, i.e. define an ml file instead of an mlpack file. Here's a > summary: > > --- mylib.mlpack --- > A > B > > $ ocamlbuild mylib.cma > $ cat _build/_log #just showing relevant line > ocamlfind ocamlc -a -linkpkg mylib.cmo -o mylib.cma > > I was expecting a.cmo and b.cmo to get included in the library but they are > not. > Now if a replace the mylib.mlpack with mylib.ml as follows, I get what I > want. > > --- mylib.ml --- > module A = A > module B = B > > $ ocamlbuild mylib.cma > $ cat _build/_log #just showing relevant line > ocamlfind ocamlc -a -linkpkg a.cmo b.cmo mylib.cmo -o mylib.cma > > How can I get the latter behavior with mlpack? Thank you. The concept of package is precisely to get rid of a.cmo and b.cmo, since mylib.cmo (in your first example) contains all the code of A and B. In the second example mylib.cmo does not contains the code of A and B but merely a bunch of 'let' definitions. In your case, if you want to avoid name-space pollution by using packs, then the first option is the right one. Best regards, -- Nicolas Pouillard aka Ertai --=-1223322142-815308-27115-6742-1-= Content-Disposition: attachment; filename="signature.asc" Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.8 (Darwin) iEYEARECAAYFAkjqah4ACgkQj+FCNw9dwLmq0wCgmm9N8/ZBzWhB69W/U6URehA/ snkAmQEmdL50LthwL6cuv5VDCDyEwDee =iZsV -----END PGP SIGNATURE----- --=-1223322142-815308-27115-6742-1-=--