Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Compiling a shared library with amd64
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jonathan Marchand <jonathlela@g...>
Subject: Re: [Caml-list] Compiling a shared library with amd64
I still have the same problem with ocaml from CVS (exemple from rocaml):

cc -shared -o 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
/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: *** [] Erreur 1

Is there any specific tag to check out from CVS?

On Tue, Jul 22, 2008 at 11:16 AM, Alain Frisch <> wrote:
> Jonathan Marchand wrote:
>> But I still have issues with the ocaml libraries. I don't know how to
>> compile the standard library from the ocaml tarball with -fPIC.
> You should try the current CVS version of OCaml. Under AMD64, ocamlopt now
> produces PIC code by default.
> -- Alain