From: "Ricardo Catalinas Jiménez" <jimenezrick@gmail.com>
To: caml-list@inria.fr
Subject: [Caml-list] ocamlmklib fails with code compiled with ocamlopt -c
Date: Wed, 21 Mar 2012 19:02:13 +0100 [thread overview]
Message-ID: <20120321180213.GA1063@viper.local> (raw)
I found out the next issue when using the native compiler to generate a
dynamic library from C:
$ ocamlopt -c foo.c
$ ocamlmklib -o foo foo.o
/usr/bin/ld: fsync.o: relocation R_X86_64_32 against `.rodata' can not
be used when making a shared object; recompile with -fPIC
fsync.o: could not read symbols: Bad value
collect2: ld returned 1 exit status
But `man ocamlopt' reads:
-fPIC Generate position-independent machine code. This is the default.
Anyway, I tried specifying manually `-fPIC' and it gave me the same
error.
But with `ocamlc -c' everything works as expected. Is this normal?
Best regards
--
Ricardo (http://r.untroubled.be/)
next reply other threads:[~2012-03-21 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-21 18:02 Ricardo Catalinas Jiménez [this message]
2012-03-21 18:40 ` Wojciech Meyer
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=20120321180213.GA1063@viper.local \
--to=jimenezrick@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;
as well as URLs for NNTP newsgroup(s).