caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Alex Rubinsteyn <alex.rubinsteyn@gmail.com>
To: Jeff Meister <nanaki@gmail.com>
Cc: Caml List <caml-list@inria.fr>
Subject: Re: [Caml-list] Problem with 64-bit shared libraries?
Date: Thu, 1 Dec 2011 13:59:06 -0500	[thread overview]
Message-ID: <CAMB58pG-DjnVPp=oNz5Nx0Tvaj475DW=kj1JjfqBkV0W6m9XZQ@mail.gmail.com> (raw)
In-Reply-To: <CAHaHOqT_HgA=QJRyFCqrPyOVAAhqYOLE37NeVj+NM-zFTKdZLA@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 1230 bytes --]

Thanks, I guess I'll recompile then. I notice, though, that there's a
libcamlrun_shared.so (for the bytecode runtime). Is there any reason we
don't also get libasmrun_shared.so by default?

On Wed, Nov 30, 2011 at 8:00 PM, Jeff Meister <nanaki@gmail.com> wrote:

> 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: 2075 bytes --]

      reply	other threads:[~2011-12-01 18:59 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
2011-12-01 18:59   ` Alex Rubinsteyn [this message]

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='CAMB58pG-DjnVPp=oNz5Nx0Tvaj475DW=kj1JjfqBkV0W6m9XZQ@mail.gmail.com' \
    --to=alex.rubinsteyn@gmail.com \
    --cc=caml-list@inria.fr \
    --cc=nanaki@gmail.com \
    /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).