From: Jeff Meister <nanaki@gmail.com>
To: Alex Rubinsteyn <alex.rubinsteyn@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Problem with 64-bit shared libraries?
Date: Wed, 30 Nov 2011 17:00:17 -0800 [thread overview]
Message-ID: <CAHaHOqT_HgA=QJRyFCqrPyOVAAhqYOLE37NeVj+NM-zFTKdZLA@mail.gmail.com> (raw)
In-Reply-To: <CAMB58pELe0i_kJZwyQsaiwh_-5KPfewdphvBacJiP0vGnYNFfQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 928 bytes --]
Yes, you should recompile OCaml with -fPIC. I ran into the same problem a
few months ago, and noticed this bit of information in the INSTALL file:
On a Linux x86/64 bits host, to build the run-time system in PIC mode
(enables putting the runtime in a shared library,
at a small performance cost):
./configure -cc "gcc -fPIC" -aspp "gcc -c -fPIC"
On Wed, Nov 30, 2011 at 1:37 PM, Alex Rubinsteyn
<alex.rubinsteyn@gmail.com>wrote:
> Hi,
>
> I'd like to package up some OCaml code (along with C bindings) as a shared
> library. However, I'm encountering the following linker error:
>
> /usr/bin/ld: /usr/lib/ocaml/libasmrun.a(startup.o): relocation R_X86_64_32
> against `.rodata.str1.1' can not be used when making a shared object;
> recompile with -fPIC
> /usr/lib/ocaml/libasmrun.a: could not read symbols: Bad value
>
> Do I have to recompile OCaml with -fPIC to put the runtime inside a shared
> library?
>
>
>
[-- Attachment #2: Type: text/html, Size: 1484 bytes --]
next prev parent reply other threads:[~2011-12-01 1:00 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-30 21:37 Alex Rubinsteyn
2011-12-01 1:00 ` Jeff Meister [this message]
2011-12-01 18:59 ` Alex Rubinsteyn
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='CAHaHOqT_HgA=QJRyFCqrPyOVAAhqYOLE37NeVj+NM-zFTKdZLA@mail.gmail.com' \
--to=nanaki@gmail.com \
--cc=alex.rubinsteyn@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).