Cannot link with libphobos2.a with GCC 6.2 on Ubuntu 16.10
tcak via Digitalmars-d-learn
digitalmars-d-learn at puremagic.com
Sun Oct 16 10:42:44 PDT 2016
On Thursday, 13 October 2016 at 17:02:32 UTC, Nordlöw wrote:
> I just upgraded my Ubuntu to 16.10 and now my rebuilding of dmd
> from git master fails as
>
> /usr/bin/ld: idgen.o: relocation R_X86_64_32 against symbol
> `__dmd_personality_v0' can not be used when making a shared
> object; recompile with -fPIC
> /usr/bin/ld:
> /usr/lib/x86_64-linux-gnu/libphobos2.a(object_a_66e.o):
> relocation R_X86_64_32 against symbol `__dmd_personality_v0'
> can not be used when making a shared object; recompile with
> -fPIC
>
> What's wrong?
>
> Am I using the wrong GCC version? Should I use GCC 5 instead?
>
> GCC 6.2 is default on 16.10.
I have upgraded my Ubuntu to 16.10 yesterday as well, and I am
getting following error:
/usr/bin/ld: obj/Debug/program.o: relocation R_X86_64_32 against
symbol `_D9Exception7__ClassZ' can not be used when making a
shared object; recompile with -fPIC
/usr/bin/ld:
/usr/lib/x86_64-linux-gnu/libphobos2.a(object_1_257.o):
relocation R_X86_64_32 against symbol `__dmd_personality_v0' can
not be used when making a shared object; recompile with -fPIC
...
I guess the problem is same. Even though I have added
"-defaultlib=libphobos2.so" to compiler options, problem persists.
More information about the Digitalmars-d-learn
mailing list