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 TAA23298; Tue, 24 Feb 2004 19:15:33 +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 TAA25599 for ; Tue, 24 Feb 2004 19:15:32 +0100 (MET) Received: from mail4.speakeasy.net (mail4.speakeasy.net [216.254.0.204]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1OIFUae027738 for ; Tue, 24 Feb 2004 19:15:31 +0100 Received: (qmail 14700 invoked from network); 24 Feb 2004 18:15:27 -0000 Received: from dsl093-079-117.sfo2.dsl.speakeasy.net (HELO manjula.frotz.bogus) (rbagchi@[66.93.79.117]) (envelope-sender ) by mail4.speakeasy.net (qmail-ldap-1.03) with SMTP for ; 24 Feb 2004 18:15:27 -0000 Received: from localhost (localhost [127.0.0.1]) by manjula.frotz.bogus (Postfix) with ESMTP id 35A782D9A7; Tue, 24 Feb 2004 10:01:50 -0800 (PST) Date: Tue, 24 Feb 2004 10:01:50 -0800 (PST) From: Ranjan Bagchi X-X-Sender: ranjan@manjula.frotz.bogus To: Richard Jones Cc: caml-list@inria.fr Subject: [Caml-list] Re: ocamlc -linkall: problems with external functions? In-Reply-To: <20040224083544.GA13071@redhat.com> Message-ID: References: <403AF139.7030303@frotz.com> <20040224083544.GA13071@redhat.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; ocamlc:01 -linkall:01 ocamlc:01 -linkall:01 usr:01 3.07:01 pcre:01 -verbose:01 dynlink:01 pcre:01 dbi:99 wrappers:01 gcc:01 -wl:01 usr:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Rich, Looks more or less identical: $ ocamlc -linkall -custom -g -w s -I /usr/lib/ocaml/3.07/pcre -verbose dynlink.cma str.cma pcre.cma unix.cma dbi.cmo apache.cmo mod_caml_config.cmo mod_caml.cmo cgi.cmo apache_c.o wrappers.o dummy.o -o mod_caml_executable + gcc -Wl,-E -o 'mod_caml_executable' -I'/usr/lib/ocaml/3.07' /tmp/camlprim3a1c34.c '-L/usr/lib/ocaml/3.07/pcre' '-L/usr/lib/ocaml/3.07' '-lunix' '-lpcre_stubs' '-lpcre' '-lstr' 'apache_c.o' 'wrappers.o' 'dummy.o' -lcamlrun -lm -ldl -lcurses -lpthread $ ocamlc -custom -g -w s -I /usr/lib/ocaml/3.07/pcre -verbose dynlink.cma str.cma pcre.cma unix.cma dbi.cmo apache.cmo mod_caml_config.cmo mod_caml.cmo cgi.cmo apache_c.o wrappers.o dummy.o -o mod_caml_executable + gcc -Wl,-E -o 'mod_caml_executable' -I'/usr/lib/ocaml/3.07' /tmp/camlprimcecba1.c '-L/usr/lib/ocaml/3.07/pcre' '-L/usr/lib/ocaml/3.07' '-lunix' '-lpcre_stubs' '-lpcre' '-lstr' 'apache_c.o' 'wrappers.o' 'dummy.o' -lcamlrun -lm -ldl -lcurses -lpthread I'll check out what Vlad had done. Ranjan On Tue, 24 Feb 2004, Richard Jones wrote: > On Mon, Feb 23, 2004 at 10:37:45PM -0800, Ranjan Bagchi wrote: > > mod_caml_executable: $(ALL_CMOS) apache_c.o wrappers.o dummy.o > > $(OCAMLC) -linkall -custom $(OCAMLCFLAGS) $(ALL_CMAS) $^ -o $@ > > > > results in the very strange startup error (when doing > > /usr/sbin/apachectl start): > > Fatal error: unknown C primitive `pcre_get_match_limit_wrapper' > > I'm guessing that this is something to do with the link order ...? > > You could try adding the -verbose option to ocamlc which should > display the actual commands it is executing. > > > (PS -- why I'm doing this. I'm trying to load into the executable the > > rpc library. The reason why is that Dynlink seems to really dislike > > loading -- at run time -- the rpc.cma and equeue.cma libraries. > > However, I've found that building an executable with --linkall produces > > a system that Dynlink can use to load in code building **using** rpc: > > stub modules, etc) > > Hopefully I'm going to be able to fix some of this soon ... by using > the same tricks that Vlad Seryakov uses in his AOLServer/caml program > (see an earlier posting on caml-list). > > Rich. > > -- > Richard Jones. http://www.annexia.org/ http://www.j-london.com/ > Merjis Ltd. http://www.merjis.com/ - improving website return on investment > http://www.YouUnlimited.co.uk/ - management courses > > ------------------- 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