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 mail4-relais-sop.national.inria.fr (mail4-relais-sop.national.inria.fr [192.134.164.105]) by sympa.inria.fr (Postfix) with ESMTPS id 6A1C97F2AA for ; Wed, 19 Dec 2012 00:53:20 +0100 (CET) Received-SPF: None (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of philippe.veber@gmail.com) identity=pra; client-ip=209.85.223.174; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="philippe.veber@gmail.com"; x-conformance=sidf_compatible Received-SPF: Pass (mail4-smtp-sop.national.inria.fr: domain of philippe.veber@gmail.com designates 209.85.223.174 as permitted sender) identity=mailfrom; client-ip=209.85.223.174; receiver=mail4-smtp-sop.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 (mail4-smtp-sop.national.inria.fr: no sender authenticity information available from domain of postmaster@mail-ie0-f174.google.com) identity=helo; client-ip=209.85.223.174; receiver=mail4-smtp-sop.national.inria.fr; envelope-from="philippe.veber@gmail.com"; x-sender="postmaster@mail-ie0-f174.google.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AiUCAJkA0VDRVd+um2dsb2JhbABFvh0IFg4BAQEBAQgJCwkUJ4IeAQEEAUABGx4DAQsGBQQHOyEBAREBBQEcBhOIAAEDCQaZfowzgnuBB4NjChknDVmIdgEFDItUhSwDkleBXYFWizeDMRYphAgO X-IronPort-AV: E=Sophos;i="4.84,311,1355094000"; d="scan'208";a="166241626" Received: from mail-ie0-f174.google.com ([209.85.223.174]) by mail4-smtp-sop.national.inria.fr with ESMTP/TLS/RC4-SHA; 19 Dec 2012 00:53:19 +0100 Received: by mail-ie0-f174.google.com with SMTP id c11so1815421ieb.5 for ; Tue, 18 Dec 2012 15:53:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=x5sjSv+9A7mzTILSGieEjWBtznet/70bjqneQi36L/g=; b=TJBErv997BJsNDm7rzOg8s5i4Ol7ZmSU5nwe2DCC9rIlsPw+c+sUW82oVd2tC5BcVa ja0hBvSQ3T2XAKib9X9yuDZv6zTBDwQ958dP2IRuqoCEvgVm2sjAKygraJlRJA80+abj fsGGqmcXdV3pjsBa53avIpaxhaTkjil2Iv0xsAR9P6/ThwNsqwok7Ahss+nS9uEoV5n/ +HgMrCFNTSQQVSF39r1QHdzOKxZGUpxhttzm82mGsJBQ5CyyWSBNmkNhSZmCnEbUW0XC sRS4koOrQ4H6rOYWt8GGHtjWpWRFbQHnBY+Es/4Q25dicWqIcds6CWvFv4AatHWn31KN fHsQ== Received: by 10.43.110.132 with SMTP id ek4mr4351896icc.32.1355874798176; Tue, 18 Dec 2012 15:53:18 -0800 (PST) MIME-Version: 1.0 Received: by 10.64.49.195 with HTTP; Tue, 18 Dec 2012 15:52:57 -0800 (PST) In-Reply-To: References: From: Philippe Veber Date: Wed, 19 Dec 2012 00:52:57 +0100 Message-ID: To: caml users Content-Type: multipart/alternative; boundary=bcaec51717dfb487f504d1293392 X-Validation-by: philippe.veber@gmail.com Subject: [Caml-list] Re: Compilation issue with interdependent libraries --bcaec51717dfb487f504d1293392 Content-Type: text/plain; charset=ISO-8859-1 Answering to myself: the information needed by findlib to sort the cma correctly is stored in the META file, using "require" directives. I In fact I have a slightly more complicated structure: - library A - library B.B1 which depends on A - library B.B2 which depends on B.B1 and A - executable C which depends on all others and I had forgotten the dependency between B.B1 and A. The error message was mentionning B.B2 instead so I overlooked the real missing part. Sorry for the noise! Cheers, Philippe. 2012/12/19 Philippe Veber > 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. > > --bcaec51717dfb487f504d1293392 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Answering to myself: the information needed by findlib to sort the cma corr= ectly is stored in the META file, using "require" directives. I
In fact I have a slightly more complicated structure:
- library A<= br> - library B.B1 which depends on A
- library B.B2 which depends on B.B1 a= nd A
- executable C which depends on all others

and I had forgott= en the dependency between B.B1 and A. The error message was mentionning B.B= 2 instead so I overlooked the real missing part. Sorry for the noise!

Cheers,
=A0 Philippe.

2012/12/19 P= hilippe Veber <philippe.veber@gmail.com>
Dear all,

I have 2 libraries, say A a= nd B where B depends on A, and an executable C which uses both A and B. Eac= h of these components is a separate (oasis) project. I have some test execu= tables in B which work fine. However, when I compile C, the compiler compla= ins that it has no implementation for a module defined in A and used in B. = The compilation (linking) command of C contains "-package" option= s for A and B, it is of the form:

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.


--bcaec51717dfb487f504d1293392--