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 LAA11089; Tue, 22 Oct 2002 11:21:09 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id LAA11482 for ; Tue, 22 Oct 2002 11:21:07 +0200 (MET DST) Received: from mel-rto6.wanadoo.fr (smtp-out-6.wanadoo.fr [193.252.19.25]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9M9L6D01020; Tue, 22 Oct 2002 11:21:06 +0200 (MET DST) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto6.wanadoo.fr (6.5.007) id 3DA24D4D008F2D72; Tue, 22 Oct 2002 11:21:05 +0200 Received: from iliana (80.14.193.120) by mel-rta9.wanadoo.fr (6.5.007) id 3DA24B290092EECF; Tue, 22 Oct 2002 11:21:05 +0200 Received: from luther by iliana with local (Exim 3.36 #1 (Debian)) id 183vDk-0000MN-00; Tue, 22 Oct 2002 11:21:04 +0200 Date: Tue, 22 Oct 2002 11:21:04 +0200 To: Xavier Leroy Cc: Yang Shouxun , caml-list@inria.fr Subject: Re: [Caml-list] Error during partial linking Message-ID: <20021022092103.GA1344@iliana> References: <200210221333.36858.yangsx@fltrp.com> <20021022104215.A9456@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20021022104215.A9456@pauillac.inria.fr> User-Agent: Mutt/1.4i From: Sven Luther Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tue, Oct 22, 2002 at 10:42:15AM +0200, Xavier Leroy wrote: > > I'm trying to compile "baire" data structures library and package it > > as a .deb. I have a problem when try to pack all the modules as a > > single "baire" module to avoid name clash with stdlibs. The error > > message is shown as the title. > > If you want help, you should provide more context for the error, > i.e. the command that fails and all error messages it prints. > Adding the "-verbose" option to ocamlopt will give even more useful > context. At any rate: > > > $(CAMLOPT) -pack -o $(RESULT:.cmo=.cmx) $(SOURCES:.ml=.cmx) $(SOURCES:.ml=.o) > > The -o $(RESULT:.cmo=.cmx) might be wrong, since $(RESULT) is > (apparently) "baire", not "baire.cmo". > > The $(SOURCES:.ml=.o) is wrong too, you should just pass the .cmx > files to ocamlopt, it will deal with the underlying .o files all by > itself. Xavier, Is there a particular reason why ocamlmklib does not support the pack option ? $ cat a.ml let z = 0 $ cat b.ml let z = 1 $ ocamlc -c a.ml $ ocamlc -c b.ml $ ocamlc -a -pack -o lib.cma a.cmo b.cmo $ cat c.ml let z = 18 let () = Printf.printf "z = %d, A.z = %d, B.z = %d\n" z A.z B.z $ ocamlc -o test lib.cma c.cmo $ ./test z = 18, A.z = 1, B.z = 0 But ... $ ocamlmklib -pack -o lib a.cmo b.cmo Unknown option -pack Is this because the pack option is not supported on all arches ? Also, i have the feeling that the correct way of distributing a bunch of .cmo is to create a .cma, not to cram them together in a super .cmo thanks to the pack option, i may be wrong about this though. The current documentation only gives an example of using the -pack option to build .cmos, not to build a .cma. Maybe such an example could be added, or at least a little notice about it ? BTW, advi build fails on ia64, i think ocamlopt on ia64 does not like the big array in dvicolor.ml, since removing some of the entries will make the build work (you have to cut them after grey50 or somethign such). Is this a bug in ocamlopt/ia64, or a normal restriction on array size ? Friendly, Sven Luther I have a question about this selfsame behavior, but then i admit, i did not have time to test this myself. My impression of the way to use the pack option is that you should use it to create libraries, not super object files like it is done here. I think the natural way of distributing a bunch of .cmo is to provide a .cma, like it was done before, not have people ------------------- 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