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=AWL autolearn=disabled version=3.1.3 X-Original-To: caml-list@yquem.inria.fr Delivered-To: caml-list@yquem.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by yquem.inria.fr (Postfix) with ESMTP id 2AD03BC69 for ; Tue, 25 Sep 2007 16:19:53 +0200 (CEST) X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAGe2+EbLENaMnmdsb2JhbACOLAEBAQEHBAYPGA X-IronPort-AV: E=Sophos;i="4.20,295,1186351200"; d="scan'208";a="1753832" Received: from ipmail01.adl2.internode.on.net ([203.16.214.140]) by mail2-smtp-roc.national.inria.fr with ESMTP; 25 Sep 2007 16:19:49 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AgAAAOKy+EZ5LHvc/2dsb2JhbAAM X-IronPort-AV: E=Sophos;i="4.20,295,1186324200"; d="scan'208";a="197394327" Received: from ppp121-44-123-220.lns10.syd6.internode.on.net (HELO [192.168.1.201]) ([121.44.123.220]) by ipmail01.adl2.internode.on.net with ESMTP; 25 Sep 2007 23:49:45 +0930 Subject: Re: [Caml-list] ocamlbuild From: skaller To: Nicolas Pouillard Cc: "nicolas.pouillard" , caml-list , Erick Tryzelaar In-Reply-To: <1190720253-sup-6791@port-ext11.ensta.fr> References: <1188981406.28332.15.camel@rosella.wigram> <1190029963-sup-259@ausone.inria.fr> <1190046094.6058.26.camel@rosella.wigram> <1190720253-sup-6791@port-ext11.ensta.fr> Content-Type: text/plain Date: Wed, 26 Sep 2007 00:19:44 +1000 Message-Id: <1190729984.9779.23.camel@rosella.wigram> Mime-Version: 1.0 X-Mailer: Evolution 2.10.1 Content-Transfer-Encoding: 7bit X-Spam: no; 0.00; 0200,:01 mli:01 rebuilt:01 rebuilding:01 cmo:01 cmi:01 mli:01 rebuilt:01 cmxa:01 invocation:01 read-only:01 ocamldep:01 sourceforge:01 wrote:01 caml-list:01 On Tue, 2007-09-25 at 13:45 +0200, Nicolas Pouillard wrote: > Excerpts from skaller's message of Mon Sep 17 18:21:34 +0200 2007: > Have you try this, since this part can be very time consuming. Since the problem went away when I deleted the whole directory and recreated it, I can't debug the problem now, sorry ;( > > So just keep an eye out for someone having a similar problem. > > Is you source tree very big? No, not particularly: 10 subdirectories, the biggest contains 95 *.ml files and similar number of *.mli files, others probably 5-10 files each. > > Erick reports another issue: ocamlbuild tries to rebuild > > libraries a code depends on -- but not the system libraries. > > Yes it even don't know that's system libraries. Sorry, I can't parse that. Ocamlbuild doesn't try to build system libraries .. how does it know what libraries are system libraries which are not to be rebuilt, and which one are application libraries which require rebuilding? > > The idea of building a library is to *avoid* having to do > > any dependency checking on the module level. Is there some > > way to fix this? I.e, to 'make' a library, and then have > > it treated as a 'system' library. > > Yes you can do it by showing it the directory with compiled files. > Then you have to explain it that all these .cmo,.cmi... are not junk files. They are though, and indeed the *.ml and *.mli files are also junk. We just want the *.cm(x)a library to be used, not rebuilt. To explain better: we go to directory liba, and we use Ocamlbuild to build liba.cmxa Ok, now we go to directory prog, which needs modules from liba, and we tell it to build prog In this second step, ocamlbuild is not allowed to check if the library is up to date. It just uses the binary library, without examining any source code. Because, we already used Ocamlbuild to build it, and it is expensive to rescan all the source code for liba, and even if it is found to be out of date, Ocamlbuild's current invocation cannot rebuild it. It could be installed in read-only location for example. So even though ocamldep will say prog depends on modules from liba, we don't care. They're excluded from consideration. -- John Skaller Felix, successor to C++: http://felix.sf.net