From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by sympa.inria.fr (Postfix) with ESMTPS id A630D7F2AA for ; Wed, 19 Dec 2012 00:22:11 +0100 (CET) Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of philippe.veber@gmail.com) identity=pra; client-ip=209.85.210.179; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail1-smtp-roc.national.inria.fr: domain of philippe.veber@gmail.com designates 209.85.210.179 as permitted sender) identity=mailfrom; client-ip=209.85.210.179; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible; x-record-type="v=spf1" Received-SPF: None (mail1-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ia0-f179.google.com) identity=helo; client-ip=209.85.210.179; receiver=mail1-smtp-roc.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="postmaster@mail-ia0-f179.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiQCADz50FDRVdKzm2dsb2JhbABFvh4IFg4BAQEBAQgJCwkUJ4JlARseAxIJAQZdAREBBQEiiBMBAw+XCYJtjDOCe4EHg2wKGScNWYh2AQUMkQADkleDM45oFimECA4 X-IronPort-AV: E=Sophos;i="4.84,311,1355094000"; d="scan'208";a="186759472" Received: from mail-ia0-f179.google.com ([209.85.210.179]) by mail1-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Dec 2012 00:22:10 +0100 Received: by mail-ia0-f179.google.com with SMTP id o25so1152234iad.24 for ; Tue, 18 Dec 2012 15:22:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=N1Ipm+axbVI61wx7AkGGMaHRRQ+2LPGjZDtJhJsnIhg=; b=Bs9G8JI0UV9blMCe7vq62KPNYLi2tQ4sU6/vRAfOF+dBVW/WARqPeECekfFBf5Q4uv IXHbtDJm+/ehfUVHXfAcDWcN+S0uKGsPnERefqR/mLUKMANiQsRVsJrhEHdIyrlJd5w+ JifuzWnIRJHf5y9oylvnv6YwcIo6Vyh9Q+Kj5X7dXH+7Of3tWL3E/empGfbAYQbQsi90 zf6X0978sycyV8jMie7iuJ9wL1oMXe4gJpifo1RNTGx9KyWkR8u5bALMTV2+bwu3ovIT H7PeMDPNUMnEBT1BBfCyd4f3Uxvp2zIPHxdnygOIicOqqgTYTcqU3bq2d6AGkuX/J0cC Kmnw== Received: by 10.42.48.147 with SMTP id s19mr4319286icf.18.1355872929873; Tue, 18 Dec 2012 15:22:09 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.49.195 with HTTP; Tue, 18 Dec 2012 15:21:48 -0800 (PST) From: Philippe Veber Date: Wed, 19 Dec 2012 00:21:48 +0100 Message-ID: To: caml users Content-Type: multipart/alternative; boundary=90e6ba1efbc258802904d128c446 X-Validation-by: philippe.veber@gmail.com Subject: [Caml-list] Compilation issue with interdependent libraries --90e6ba1efbc258802904d128c446 Content-Type: text/plain; charset=ISO-8859-1 Dear all, I have 2 libraries, say A and B where B depends on A, and an executable C which uses both A and B. Each of these components is a separate (oasis) project. I have some test executables in B which work fine. However, when I compile C, the compiler complains that it has no implementation for a module defined in A and used in B. The compilation (linking) command of C contains "-package" options for A and B, it is of the form: ocamlfind ocamlopt ... -package B -package A ... C.cmo If I permute the two package options, like in ocamlfind ocamlopt ... -package A -package B ... C.cmo the compilation works fine. It is not really clear to me, but I thought the order of the -package options did not matter, because findlib would store the dependencies between packages and produce a compilation command where cma or cmxa are correctly sorted. Indeed, if I use the -verbose option, I can see that cma are wrongly sorted in the former case, while they are fine in the latter. Admitedly my description is rather abstract, but does anyone see what could I (or oasis) have forgotten, to tell ocamlfind that B.cma depends on A.cma? Cheers, Philippe. --90e6ba1efbc258802904d128c446 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear all,

I have 2 libraries, say A and B where B depends on A, and = an executable C which uses both A and B. Each of these components is a sepa= rate (oasis) project. I have some test executables in B which work fine. Ho= wever, when I compile C, the compiler complains that it has no implementati= on for a module defined in A and used in B. The compilation (linking) comma= nd of C contains "-package" options for A and B, it is of the for= m:

ocamlfind ocamlopt ... -package B -package A ... C.cmo

If I perm= ute the two package options, like in

ocamlfind ocamlopt ... -packag= e A -package B ... C.cmo

the compilation works fine. It is not really clear to me, but I thought= the order of the -package options did not matter, because findlib would st= ore the dependencies between packages and produce a compilation command whe= re cma or cmxa are correctly sorted. Indeed, if I use the -verbose option, = I can see that cma are wrongly sorted in the former case, while they are fi= ne in the latter.

Admitedly my description is rather abstract, but does anyone see what c= ould I (or oasis) have forgotten, to tell ocamlfind that B.cma depends on A= .cma?

Cheers,
=A0 Philippe.

--90e6ba1efbc258802904d128c446--