shared lib
Jacob Carlborg
doob at me.com
Mon Nov 14 09:17:42 PST 2011
On 2011-11-14 17:31, Jerry wrote:
> Ellery Newcomer<ellery-newcomer at utulsa.edu> writes:
>
>> trying to build a .so file (actually, trying to resuscitate pyd) with gdc.
>>
>> celerid is spitting out
>>
>> gdc -fPIC -nostartfiles -shared -fdebug {lots of object files plus some
>> link directives}
>>
>> which is spitting out
>>
>> /usr/bin/ld: /usr/lib64/libgphobos2.a(object_.o): relocation
>> R_X86_64_32S against `_D11TypeInfo_Pv6__initZ' can not be used when
>> making a shared object; recompile with -fPIC
>> /usr/lib64/libgphobos2.a: could not read symbols: Bad value
>>
>> any ideas what might be wrong?
>
> Shared libs on linux require things to be compiled with -fPIC so the
> code can be relocated. The error looks like phobos wasn't build with
> position-independent code. Beyond that I don't know.
>
> Jerry
DMD cannot currently generate correct PIC on linux.
--
/Jacob Carlborg
More information about the Digitalmars-d-learn
mailing list