caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Compiling shared library with ocamlopt
@ 2011-12-02 18:43 nicholas.r.lucaroni
  2011-12-08 12:06 ` Stéphane Glondu
  0 siblings, 1 reply; 5+ messages in thread
From: nicholas.r.lucaroni @ 2011-12-02 18:43 UTC (permalink / raw)
  To: caml-list

I'm having an issue compiling a shared library for as a plugin w/ ocamlbuild.
Turning the verbose options on I see that ocamlopt generates the following
during the final linking, 

/opt/ocaml-3.12.1/bin/ocamlopt.opt -shared -verbose -cc gcc plugins/example.cmx
-o plugins/example.cmxs -ccopt -v
+ as -o 'plugins/example.cmxs.startup.o' '/tmp/camlstartupe6993f.s'
+ gcc -o 'plugins/example.cmxs'   '-L/opt/ocaml-3.12.1/lib/ocaml' -v
'plugins/example.cmxs.startup.o' 'plugins/example.o'

When I remove the -cc option from ocamlopt.opt, the shared flag is successfully
passed,

/opt/ocaml-3.12.1/bin/ocamlopt.opt -shared -verbose plugins/example.cmx -o
plugins/example.cmxs -ccopt -v
+ as -o 'plugins/example.cmxs.startup.o' '/tmp/camlstartup2c31a2.s'
+ gcc -shared -o 'plugins/example.cmxs'   '-L/opt/ocaml-3.12.1/lib/ocaml' -v
'plugins/example.cmxs.startup.o' 'plugins/example.o'

Seems like a bug in ocamlopt; has anyone experienced similar situations? Am I
missing anything or any options in compilation? 

Thanks.

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-08 20:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-02 18:43 [Caml-list] Compiling shared library with ocamlopt nicholas.r.lucaroni
2011-12-08 12:06 ` Stéphane Glondu
2011-12-08 13:11   ` Nicholas Lucaroni
2011-12-08 13:35     ` Stéphane Glondu
2011-12-08 20:26       ` Nick Lucaroni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).