caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: skaller <skaller@users.sourceforge.net>
To: Nicolas Pouillard <nicolas.pouillard@inria.fr>
Cc: "nicolas.pouillard" <nicolas.pouillard@gmail.com>,
	caml-list <caml-list@yquem.inria.fr>,
	Erick Tryzelaar <erickt@dslextreme.com>
Subject: Re: [Caml-list] ocamlbuild
Date: Wed, 26 Sep 2007 00:19:44 +1000	[thread overview]
Message-ID: <1190729984.9779.23.camel@rosella.wigram> (raw)
In-Reply-To: <1190720253-sup-6791@port-ext11.ensta.fr>

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 <skaller at users dot sf dot net>
Felix, successor to C++: http://felix.sf.net


  reply	other threads:[~2007-09-25 14:19 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-05  8:36 ocamlbuild skaller
2007-09-17 11:56 ` [Caml-list] ocamlbuild Nicolas Pouillard
2007-09-17 16:21   ` skaller
2007-09-25 11:45     ` Nicolas Pouillard
2007-09-25 14:19       ` skaller [this message]
2007-09-26  8:42         ` Nicolas Pouillard
  -- strict thread matches above, loose matches on Subject: below --
2007-08-05 23:19 ocamlbuild skaller
2007-08-06  7:36 ` [Caml-list] ocamlbuild Adrien
2007-08-06  9:34   ` Adrien
2007-08-06 12:14     ` David Allsopp
2007-08-06 16:19     ` Christophe TROESTLER
2007-08-08  4:12 ` Aleksey Nogin
2007-08-09 18:35 ` Nicolas Pouillard

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1190729984.9779.23.camel@rosella.wigram \
    --to=skaller@users.sourceforge.net \
    --cc=caml-list@yquem.inria.fr \
    --cc=erickt@dslextreme.com \
    --cc=nicolas.pouillard@gmail.com \
    --cc=nicolas.pouillard@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).