You are not logged in.

#1 2016-07-02 13:16:27

FlowIt
Member
Registered: 2014-10-25
Posts: 243

Misconfig leads to compilation error

Yesterday I changed my makepkg.conf to use -march=native and -mtune=native. With these settings I compiled the gcc package and installed it. Today I was trying to compile gtk3 with the "new" compiler and the described settings, but it fails with the following error message:

/usr/bin/ld: variable.o: relocation R_X86_64_PC32 against undefined symbol `sqrt@@GLIBC_2.2.5' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value

So I did what was recommended and added -fPIC to the flags in my makepkg.conf. Without success. I also tried to undo my previous work and changed the flags back to -march=x86-64 and -mtune=generic and reinstalled gcc from the official repository. Tried to build gtk3 again, but it still fails with the same message.
So now I am out of ideas how I introduced this behaviour in my system and how I can get rid of it. Any ideas?

Edit: Recompiling glibc with -fPIC solved the problem, but I want to leave this thread open for now since I still have no clue why simply reverting my changes was not enough.

Last edited by FlowIt (2016-07-02 14:19:05)

Offline

Board footer

Powered by FluxBB