* [Caml-list] ocamlc -linkall: problems with external functions?
@ 2004-02-24 6:37 Ranjan Bagchi
2004-02-24 8:35 ` [Caml-list] " Richard Jones
0 siblings, 1 reply; 3+ messages in thread
From: Ranjan Bagchi @ 2004-02-24 6:37 UTC (permalink / raw)
To: caml-list; +Cc: Richard Jones
Hi --
I'm experimenting with mod_caml 1.0.6 (which is very cool, thanks Rich),
and I've found something interesting (this may be an ocaml thing, a
mod_caml thing, or an apache thing since it intersects):
The following line in the Makefile:
mod_caml_executable: $(ALL_CMOS) apache_c.o wrappers.o dummy.o
$(OCAMLC) -custom $(OCAMLCFLAGS) $(ALL_CMAS) $^ -o $@
if changed to
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'
However, in both mod_caml_executables, nm | grep
pcre_get_match_limit_wrapper results in
080571a0 T pcre_get_match_limit_wrapper
Is this a bug? What's happening? Is there a workaround?
Thanks,
Ranjan
(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)
-------------------
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Caml-list] Re: ocamlc -linkall: problems with external functions?
2004-02-24 6:37 [Caml-list] ocamlc -linkall: problems with external functions? Ranjan Bagchi
@ 2004-02-24 8:35 ` Richard Jones
2004-02-24 18:01 ` Ranjan Bagchi
0 siblings, 1 reply; 3+ messages in thread
From: Richard Jones @ 2004-02-24 8:35 UTC (permalink / raw)
To: Ranjan Bagchi; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
* [Caml-list] Re: ocamlc -linkall: problems with external functions?
2004-02-24 8:35 ` [Caml-list] " Richard Jones
@ 2004-02-24 18:01 ` Ranjan Bagchi
0 siblings, 0 replies; 3+ messages in thread
From: Ranjan Bagchi @ 2004-02-24 18:01 UTC (permalink / raw)
To: Richard Jones; +Cc: caml-list
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
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-02-24 18:15 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-02-24 6:37 [Caml-list] ocamlc -linkall: problems with external functions? Ranjan Bagchi
2004-02-24 8:35 ` [Caml-list] " Richard Jones
2004-02-24 18:01 ` Ranjan Bagchi
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox