gdc-0.23 x86_64 can't create shared objects?

Neal Becker ndbecker2 at gmail.com
Tue Mar 6 07:07:15 PST 2007


Frits van Bommel wrote:

> Neal Becker wrote:
>> gdc-0.23 x86_64 can't create shared objects?
>> cd /home/nbecker/
>> gdc -g -o test2.so -shared -fpic -v test2.d -Wall
> [snip]
>> /usr/bin/ld:
>> /home/nbecker/gdc/bin/../lib/gcc/x86_64-unknown-linux-gnu/4.1.1/../../../../lib64/libgphobos.a(deh.o):
>> relocation R_X86_64_32 against
>> `_D39TypeInfo_AS3gcc3deh18OurUnwindException6__initZ' can not be used
>> when making a shared object; recompile with -fPIC
> 
> Did you try it with -fPIC instead of -fpic like the error message
> suggests? (Or if that doesn't work, perhaps try recompiling libgphobos
> with that option; I'm not sure what exactly the message means)

Yes, tried that.  The problem is we have to have a shared libgphobos.  On
i386 linux, it was legal to link non-pic code into a shared library.  This
is not legal on x86_64 (and, I think, most other arch's). 


More information about the D.gnu mailing list