Wiki Roadmap Timeline Tickets New Ticket Source Search Help / Guide About Trac Login

Ticket #360 (new defect)

Opened 2 years ago

Last modified 2 years ago

ldc + shared tango user library: overflow in R_X86_64_PC32 relocation

Reported by: goshawk Assigned to: ChristianK
Priority: major Milestone:
Component: unspecified Version: hg tip
Keywords: shared library Cc:

Description

Hi, I'm trying to set up a shared version of the tango shared library.

As reported in tango track, when compiling against shared tango user and static tango base i've the foolowing error:

http://www.dsource.org/projects/tango/ticket/857#comment:19

When i try to compile linking against shared tango user and base (which is broken) i get:

http://www.dsource.org/projects/tango/ticket/857#comment:20

This could be a compiler error since have been reported that it was possible to link against shared tango user and static tango base libraries with gdc.

Change History

05/16/10 23:18:02 changed by llucax

I'm copying a comment I added to the Tango bug report for convenience. The segmentation fault itself doesn't looks like it's related to this though (at least not directly):

I'm giving this a try and after successfully building the shared object and compiling a simple hello world, I get this error when the program is ran:

LANG=C LD_LIBRARY_PATH=~/tesis/ldc/lib ./test
./test: Symbol `_d_eh_personality' causes overflow in R_X86_64_PC32 relocation
Segmentation Fault

Linux, 64 bits, ldc 0.9.2, tango 0.99.9. To build tango I compiled the same files bob compile except tango/core/vendor/ldc/{bitmanip,vararg}.d (to avoid multiple definition errors) and tango/text/locale/Win32.d (because it uses the Win API, already fixed in svn). I added -relocation-model=pic to the ldc command line and -fPIC to the gcc command line. I linked all the objects together with -shared -lz -lbz2 -lpthread -ldl -lm -Wl,-soname,libtango.so.

Any ideas on what can be wrong?

Copyright © 2008, LDC Development Team.