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: 2008-07-22 (09:08)
From: Jonathan Marchand <jonathlela@g...>
Subject: Compiling a shared library with amd64

I would like to compile a native shared library with ocaml on amd64. I
googled the problem and as far as I understand, I need both runtimes
and libraries (the ones used in my library) compiled with -fPIC:

The above trick allowed me to compile ocaml runtimes with -fPIC
(linker doesn't complain about libasmrun.a anymore):


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. I
looked at the Makefiles, but I could'nt figure out what to change to
achieve this task.

I've looked at rocaml ( which fails
to compile amd64 library too, so I imagine the problem is definitly in
the way of compiling the ocaml libraries.

Any hints how to compile these libraries with -fPIC ?