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
Wed Apr 20 18:20:27 PDT 2016


On Thursday, 21 April 2016 at 01:18:14 UTC, rcorre wrote:
> On Wednesday, 20 April 2016 at 19:24:49 UTC, Chris wrote:
>> On Wednesday, 20 April 2016 at 12:04:45 UTC, rcorre wrote:
>>> ===
>>> $ dmd /tmp/d.d
>>> /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
>>> d.o: error adding symbols: Bad value
>>> collect2: error: ld returned 1 exit status
>>> --- errorlevel 1
>>> ===
>>>
>>> I'm seeing the above trying to compile a simple d program.
>>>
>>> /tmp/d.d:
>>> ===
>>> void main() { }
>>> ===
>>>
>>> Any idea what this might be? I'm on dmd 2.071.0 on Archlinux.
>>
>> I had a similar error. Could you show us the code? Do you 
>> refer/link to a dynamic library?
>
> The code is shown above. Literally `void main() { }`. I can't 
> compile anything.

s/compile/link
I _can_ compile a D library, but as soon as I try to link 
anything compiled with DMD it falls over.



More information about the Digitalmars-d-learn mailing list