-fPIC related error compiling hello_world.d with dmd

rikki cattermole via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Fri Nov 18 05:12:14 PST 2016


On 19/11/2016 2:09 AM, Alessandro wrote:
> Hi everyone,
> I'm almost ashamed to ask help on this...
> I used dmd/dub on an arch linux machine for some time in the past
> without any problem.
> Now I'm experiencing a strange problem after switching to a debian
> jessie (testing) machine when compiling even the simplest hello_world
> application :( !!
> After successfully compiling the source file, I get hundreds of linker
> error messages of the form:
>
> /usr/bin/ld: /usr/lib/x86_64-linux-gnu/libphobos2.a(aaA_52e_53e.o):
> relocation R_X86_64_32 against symbol `__dmd_personality_v0' can not be
> used when making a shared object; recompile with -fPIC
>
> It looks like the linker cannot link together phobos library modules
> into the final binary or something like that.
> I'm using the official package dmd_2.072.0-0_amd64.deb from dlang
> website, but also the package in debian repositories (version 2.071.2)
> does the same.
> Any idea what the problem might be?

Yup lots of posts about this problem lately.
Here's my answer to an identical question[0].

[0] http://forum.dlang.org/post/nvekf6$1pvb$1@digitalmars.com



More information about the Digitalmars-d-learn mailing list