From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA31068; Thu, 21 Feb 2002 15:13:01 +0100 (MET) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id PAA32172 for ; Thu, 21 Feb 2002 15:13:00 +0100 (MET) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g1LECsj22930; Thu, 21 Feb 2002 15:12:54 +0100 (MET) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id PAA31851; Thu, 21 Feb 2002 15:12:54 +0100 (MET) Date: Thu, 21 Feb 2002 15:12:54 +0100 From: Xavier Leroy To: "Alexander V. Voinov" Cc: "caml-list@inria.fr" Subject: Re: [Caml-list] a hard road to a new toplevel Message-ID: <20020221151254.A31874@pauillac.inria.fr> References: <3C7403BA.B1AAF99D@quasar.ipa.nw.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <3C7403BA.B1AAF99D@quasar.ipa.nw.ru>; from avv@quasar.ipa.nw.ru on Wed, Feb 20, 2002 at 12:14:50PM -0800 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > and try to make a new toplevel, which would have access to a module I'm > interested in: Unix2. I started from > > ocamlmktop unix2.cmo -o unix2top > > and subsequently added more and more modules to the absence of which it > complained. It took not less than one hour of trials. Resulting in this: > > ocamlmktop string2.cmo file.cmo str.cma netstring_str.cmo > netencoding.cmo base64.cmo debug.cmo unix.cma timeout.cmo log.cmo > unix.cma concur.cmo bufrw.cmo activebuffer.cmo str.cma unix.cma > /usr/lib/ocaml/select.o /usr/lib/ocaml/libunix2_c.a string2.cmo > filename2.cmo printexc2.cmo sys2.cmo unix2.cmo netstring_str.cmo > netencoding.cmo network.cma unix2.cmo -o unix2top > > What did I do wrong? It is possible to get a transivite closure of all > these dependencies in one shot? Library files (.cma files) provide an answer to this issue: *if* the authors of the library did a good job, they built a .cma file that groups all .cmo files for their library, in the right order. Then, the final user simply links with the .cma file, and the OCaml linker picks only the relevant .cmo files from the .cma. If all you have initially is a bunch of .cmo files with no docs, then I agree you run into the problem you describe. > BTW the last step were purely gcc/ld > dependecies on select.o and libunix2_c.a and there is now way to > indicate libraries in the Unix style via -lLIB. Not true: -cclib -lunix2_c will pass a "-lunix2_c" option to gcc and ld. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners