From: nicholas.r.lucaroni@gmail.com
To: caml-list@inria.fr
Subject: [Caml-list] Compiling shared library with ocamlopt
Date: Fri, 2 Dec 2011 19:43:55 +0100 [thread overview]
Message-ID: <sympa.1322850955.17359.630@inria.fr> (raw)
In-Reply-To:
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.
next reply other threads:[~2011-12-02 18:44 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-12-02 18:43 nicholas.r.lucaroni [this message]
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=sympa.1322850955.17359.630@inria.fr \
--to=nicholas.r.lucaroni@gmail.com \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox