From: Alain Frisch <alain@frisch.fr>
To: Jonathan Marchand <jonathlela@gmail.com>
Cc: caml-list@yquem.inria.fr
Subject: Re: [Caml-list] Compiling a shared library with amd64
Date: Wed, 23 Jul 2008 09:16:54 +0200 [thread overview]
Message-ID: <4886DAE6.605@frisch.fr> (raw)
In-Reply-To: <9a3dee4b0807230008t3d68e3bu920c1a4af658e857@mail.gmail.com>
Jonathan Marchand wrote:
> I still have the same problem with ocaml from CVS (exemple from rocaml):
>
> cc -shared -o foo.so foo_rocaml_wrapper.o -L. -L/usr/lib -L.
> -rdynamic -Wl,-export-dynamic foo_rocaml_runtime.o
> /usr/local/lib/ocaml/libasmrun.a /usr/local/lib/ocaml/libunix.a
> /usr/local/lib/ocaml/libnums.a -lruby1.8 -lpthread -ldl -lcrypt -lm
> -lc
> /usr/bin/ld: /usr/local/lib/ocaml/libasmrun.a(startup.o): relocation
> R_X86_64_32 against `a local symbol' can not be used when making a
> shared object; recompile with -fPIC
> /usr/local/lib/ocaml/libasmrun.a: could not read symbols: Bad value
> collect2: ld returned 1 exit status
> make: *** [foo.so] Erreur 1
You mentioned in your previous email that you got rid of such errors by
adding -fPIC to *COMPOPTS variables. Cannot you do the same for other C
libraries? The changes in the CVS only affect the code generated by
OCaml, like stdlib.a (the native code produced by ocamlopt for the
standard library).
-- Alain
next prev parent reply other threads:[~2008-07-23 7:16 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-07-22 9:08 Jonathan Marchand
2008-07-22 9:16 ` [Caml-list] " Alain Frisch
2008-07-23 7:08 ` Jonathan Marchand
2008-07-23 7:16 ` Alain Frisch [this message]
[not found] ` <9a3dee4b0807230117m102363a1ubca8ed069e15db41@mail.gmail.com>
2008-07-23 8:24 ` Alain Frisch
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=4886DAE6.605@frisch.fr \
--to=alain@frisch.fr \
--cc=caml-list@yquem.inria.fr \
--cc=jonathlela@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