gdc-0.23 x86_64 can't create shared objects?
Gregor Richards
Richards at codu.org
Tue Mar 6 08:44:52 PST 2007
Neal Becker wrote:
> 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).
You don't have to have a /shared/ libgphobos, but you do have to have a
-fPIC libgphobos.
- Gregor Richards
More information about the D.gnu
mailing list