Bug#461125: ocaml-nox: linking into a shared library fails due to R_X86_64_32 relocations

2015-08-13 Thread Stéphane Glondu
Control: tags -1 + fixed-upstream pending

Le 16/01/2008 19:53, Mathijs Romans a écrit :
 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?

The upstream changelog for 4.02.2 reads:
 - PR#6693: also build libasmrun_shared.so and lib{asm,caml}run_pic.a
   (Peter Zotov, review by Mark Shinwell)

Link to the upstream bug report:
  http://caml.inria.fr/mantis/view.php?id=6693

So I guess this is fixed upstream...

Cheers,

-- 
Stéphane



Bug#461125: ocaml-nox: linking into a shared library fails due to R_X86_64_32 relocations

2009-12-02 Thread Joost Yervante Damad

Hello,

I also ran into this issue and found the following workaround:

1) recompile libasmrun.a with -fPIC

2) link my library with -Wl,-Bsymbolic

Then I am able to run a C binary that calls ocaml where ocaml lives in the 
created .so.

2) is not very nice. I tried solving it by sprinkling @PLT symbol tags in 
asmrun/amd64.S instead. This makes everything compile and link without -
Bsymbolic but segfaults with an uncomprehensive error.

It would be very nice if you could adapt the ocaml build to build libasmrun.a 
with -fPIC on the x86_64(amd64) architecture by default.

Greetings, Joost Damad



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#461125: ocaml-nox: linking into a shared library fails due to R_X86_64_32 relocations

2008-01-16 Thread Mathijs Romans
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  binutils2.18.1~cvs20080103-1 The GNU assembler, linker and bina
ii  gcc 4:4.2.2-1The GNU C compiler
ii  libncurses5-dev 5.6+20071215-1   Developer's libraries and docs for
ii  ocaml-base-nox [oca 3.10.0-13Runtime system for ocaml bytecode 
ii  ocaml-interp [ocaml 3.10.0-13OCaml interactive interpreter and 

Versions of packages ocaml-nox recommends:
ii  camlp43.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



-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]