This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
fPIC error hard to diagnose
- From: Mathieu Lacage <mathieu dot lacage at gmail dot com>
- To: gcc-help <gcc-help at gcc dot gnu dot org>
- Date: Mon, 12 Oct 2009 00:07:53 +0200
- Subject: fPIC error hard to diagnose
hi,
I tried to build gcc trunk to test -flto but I keep getting the same
error during link:
/usr/bin/ld: /tmp/cclQrpIm.lto.o: relocation R_X86_64_PC32 against
symbol `_ZN3ns316g_logTi
mePrinterE' can not be used when making a shared object; recompile with -fPIC
/usr/bin/ld: final link failed: Bad value
collect2: ld returned 1 exit status
So, I added -fPIC instead of -fpic to my build lines but still get the
error which means that I probably forgot one file somewhere but I am
stuck while trying to figure out which of them I forgot:
/tmp/cclQrpIm.lto.o does not exist anymore when gcc returns so, I
can't just go and look at it to figure which source file it
corresponds to. Would someone know of a nice gcc option which can make
it report a more useful error (or which can make it leave the file in
place) ?
Mathieu
--
Mathieu Lacage <mathieu.lacage@gmail.com>