Linker error for d.o: relocation R_X86_64_32 against `__dmd_personality_v0'
rcorre via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Thu Apr 21 04:54:27 PDT 2016
On Thursday, 21 April 2016 at 09:55:30 UTC, Rene Zwanenburg wrote:
> On Thursday, 21 April 2016 at 01:20:27 UTC, rcorre wrote:
>> s/compile/link
>> I _can_ compile a D library, but as soon as I try to link
>> anything compiled with DMD it falls over.
>
> What is dmd's verbose output? (add -v switch)
>
> Some of the things it outputs are the location of the config
> file it uses, you can inspect that file to see if it has been
> borked somehow.
>
> Near the bottom you can find the used link command, that could
> also reveal the problem.
Thanks for the tip. Here's the linking code it shows:
cc d.o -o d -m64 -L/usr/lib -L/usr/lib32 -Xlinker
--export-dynamic -Xlinker -Bstatic -lphobos2 -Xlinker -Bdynamic
-lpthread -lm -lrt -ldl
/usr/bin/ld: d.o: relocation R_X86_64_32 against
`__dmd_personality_v0' can not be used when making a shared
object; recompile with -fPIC
I tried `cc d.o -o d -m64 -fPIC and still get the error.
More information about the Digitalmars-d-learn
mailing list