Browse thread
Compiling a shared library with amd64
-
Jonathan Marchand
-
Alain Frisch
-
Jonathan Marchand
- Alain Frisch
-
Jonathan Marchand
-
Alain Frisch
[
Home
]
[ Index:
by date
|
by threads
]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
| Date: | -- (:) |
| From: | Alain Frisch <alain@f...> |
| Subject: | Re: [Caml-list] Compiling a shared library with amd64 |
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