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 mail1-relais-roc.national.inria.fr (mail1-relais-roc.national.inria.fr [192.134.164.82]) by yquem.inria.fr (Postfix) with ESMTP id 381CBBC6C for ; Mon, 28 Jan 2008 11:43:12 +0100 (CET) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAApAnUeK6AGOh2dsb2JhbACQKAEBAQgKKZl+ X-IronPort-AV: E=Sophos;i="4.25,258,1199660400"; d="scan'208";a="7319154" Received: from lmr1.uibk.ac.at (HELO smtp.uibk.ac.at) ([138.232.1.142]) by mail1-smtp-roc.national.inria.fr with ESMTP; 28 Jan 2008 11:43:11 +0100 Received: from smc.uibk.ac.at (smc.uibk.ac.at [138.232.1.226] c703350@smc.uibk.ac.at) by smtp.uibk.ac.at (8.13.8/8.13.8/F1) with ESMTP id m0SAhASu032425 for ; Mon, 28 Jan 2008 11:43:10 +0100 Received: from smc.uibk.ac.at (localhost [127.0.0.1] c703350@smc.uibk.ac.at) by smc.uibk.ac.at (8.13.8+Sun/uibk) with ESMTP id m0SAh9Xa027038 for ; Mon, 28 Jan 2008 11:43:09 +0100 (MET) Received: (from c703350@localhost) by smc.uibk.ac.at (8.13.8+Sun/8.13.8/Submit) id m0SAh9pR027037 for caml-list@yquem.inria.fr; Mon, 28 Jan 2008 11:43:09 +0100 (MET) Date: Mon, 28 Jan 2008 11:43:09 +0100 From: Christian Sternagel To: caml-list@yquem.inria.fr Subject: Re: [Caml-list] ocamlbuild `Circular dependencies' Message-ID: <20080128104309.GA3836@pc6197-c703.uibk.ac.at> Mail-Followup-To: caml-list@yquem.inria.fr References: <20080124142327.GC761@pc6197-c703.uibk.ac.at> <479DAD21.9040300@lri.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <479DAD21.9040300@lri.fr> User-Agent: Mutt/1.4.2.3i X-Scanned-By: MIMEDefang 2.61 at uibk.ac.at on 138.232.1.140 X-Spam: no; 0.00; 0100,:01 mli:01 ocamldep:01 makefile:01 cheers:01 beginner's:01 ocaml:01 bug:01 28,:98 beginners:01 wrote:01 compile:01 compile:01 caml-list:01 caml-list:01 On Mon, Jan 28, 2008 at 11:23:29AM +0100, Romain Bardou wrote: > I tried to reproduce a similar set of directories as yours. I couldn't > get the "circular dependency" error, but I had to compile everything in > one command line, otherwise the file a.cma (which is in the _build/A Today I found out, that we indeed had a circular dependency: An interface file B.mli used a type A.t, whereas the implementation file A.ml uses functions from B. When using ocamldep + a Makefile, no error occurred. But ocamlbuild refused to compile... I guess that is the right thing to do =) > directory) was deleted before compiling b.cma. The command which I used > and which worked is: > > ocamlbuild -Is A,B a.cma b.cma > > I don't really understand how the -lib option works though. Where and > when does it look for the library x.cma with the "-lib x" option? How > and what's the semantic of the "+" you can add at the beginning of a > library name?... As far as I know, a `+' means that the following name should be searched relative to the standard library. Still my question remains, how one should configure a project that consists of several libraries and one binary, together with ocamlbuild. E.g., +- prof.dir/ +-+- A/ | +- a.mllib | +- a1.ml | +- ... | +- aN.ml | +-+- B/ | +- b.mllib | +- b1.ml | +- ... | +- bN.ml | +-+- Main/ +- main.ml (depending on a.cma and b.cma) cheers christian > > -- > Romain Bardou > > _______________________________________________ > Caml-list mailing list. Subscription management: > http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list > Archives: http://caml.inria.fr > Beginner's list: http://groups.yahoo.com/group/ocaml_beginners > Bug reports: http://caml.inria.fr/bin/caml-bugs >