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 LAA12393; Tue, 22 Oct 2002 11:39:41 +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 LAA12247 for ; Tue, 22 Oct 2002 11:39:40 +0200 (MET DST) X-SPAM-Warning: Sending machine is listed in blackholes.five-ten-sg.com Received: from mail.fltrp.com ([211.101.185.130]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9M9dbD01496 for ; Tue, 22 Oct 2002 11:39:38 +0200 (MET DST) Received: from delbian [129.0.5.6] by mail.fltrp.com with ESMTP (SMTPD32-7.13) id AC20D0500F4; Tue, 22 Oct 2002 17:36:32 +0800 Content-Type: text/plain; charset="gb2312" From: Yang Shouxun Organization: FLTRP To: caml-list@inria.fr Subject: Re: [Caml-list] Error during partial linking Date: Tue, 22 Oct 2002 17:37:56 +0800 User-Agent: KMail/1.4.3 References: <200210221333.36858.yangsx@fltrp.com> <20021022104215.A9456@pauillac.inria.fr> In-Reply-To: <20021022104215.A9456@pauillac.inria.fr> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Message-Id: <200210221737.56370.yangsx@fltrp.com> Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Tuesday 22 October 2002 16:42, you wrote: > 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 There's no other error message. Yes, I should have add the "-verbose" option. > 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". I've set $(RESULT) to "baire.cmo" -- seemingly unconventional. > 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. My fault. At first I follow other examples (that is, without $(SOURCES:.ml=.o). When I cannot find out what's the cause of the error, I add it in desperation. And this does not make a change at all. Now I remove that redundant part and add the verbose option, I get the following spit out: ---8<--- ocamlopt -pack -verbose -o baire.cmx bairePervasives.cmx [...] weightBalancedMap.cmx + as -o '/tmp/camlpackagef06eb8.o' '/tmp/camlpackage2ad2ef.s' + ld -r -o 'baire.o' '/tmp/camlpackagef06eb8.o' 'bairePervasives.o' [...] 'weightBalancedMap.o' + /usr/bin/nm 'baire.o' > '/tmp/camlsymbolse063ad' + /usr/bin/objcopy --redefine-sym 'WeightBalancedSet__zero_227=Baire__WeightBalancedSet__zero_227' [...] --redefine-sym 'AmortizedQueue=Baire__AmortizedQueue' 'baire.o' Error during partial linking make[1]: *** [nativepack] Error 2 ---8<--- To make the list short, I use [...] to elide what come between. The problem is it's ok to "-pack" the byte-compiled .cmo files, but not to "-pack" the native-compiled .cmx files. I can now use the packed baire library in the toplevel and bytecode modes, but not the native-code mode. Besides the "-pack" problem, baire provides modules that have name clash with the stdlibs modules. I'm wondering whether it's possible to use the those of baire instead of the stdlibs. I don't know how so far. When compile and link in the native-code mode, it complains there is such a name clash and aborts. Thanks! shouxun ------------------- 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