Bug#461125: ocaml-nox: linking into a shared library fails due to R_X86_64_32 relocations
Package: ocaml-nox
Version: 3.10.0-13
Severity: normal
I'm not sure I understand the problem exactly, I'm sorry for that. I run on AMD64 and I'm
making a shared library using the library libasmrun.a. However the linker complains that a
relocation R_X86_64_32 can not be used, because the library was not compiled with -fPIC (see
output below). I understand there is a alternative for this for the camlrun library (called
"camlrun_shared"). But not so for the asmrun?
output:
$ gcc -shared -o libsgfparser.so caml_sgf.o sgfcallbacks.o -L/usr/lib/ocaml/3.10.0 -lstr
-lasmrun
/usr/bin/ld: /usr/lib/ocaml/3.10.0/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/lib/ocaml/3.10.0/libasmrun.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [libsgfparser.so] Error 1
-- System Information:
Debian Release: lenny/sid
APT prefers unstable
APT policy: (500, 'unstable'), (500, 'stable')
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.22-3-amd64 (SMP w/1 CPU core)
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Shell: /bin/sh linked to /bin/bash
Versions of packages ocaml-nox depends on:
ii binutils 2.18.1~cvs20080103-1 The GNU assembler, linker and bina
ii gcc 4:4.2.2-1 The GNU C compiler
ii libncurses5-dev 5.6+20071215-1 Developer's libraries and docs for
ii ocaml-base-nox [oca 3.10.0-13 Runtime system for ocaml bytecode
ii ocaml-interp [ocaml 3.10.0-13 OCaml interactive interpreter and
Versions of packages ocaml-nox recommends:
ii camlp4 3.10.0-13 Pre Processor Pretty Printer for O
ii file 4.21-4 Determines file type using "magic"
ii ledit 1.16-1 line editor for interactive progra
-- no debconf information
Reply to: