LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   gcc-4.7.1 (https://www.linuxquestions.org/questions/slackware-14/gcc-4-7-1-a-4175411664/)

volkerdi 06-15-2012 02:00 PM

gcc-4.7.1
 
Howdy folks!

Has anyone here successfully compiled gcc-4.7.1 yet? I'm trying on x86_64, but keep running into failures with gnat linking its shared libraries. The error in question is this:

/usr/x86_64-slackware-linux/bin/ld: adadecode.o: relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
adadecode.o: could not read symbols: Bad value

Indeed, looking earlier in the log, adadecode.c does not appear to be compiled using -fPIC in spite of it appearing in CFLAGS. I tried adding --with-pic to the ./configure options with no noticeable change. Suspecting something had changed in ld, I tried earlier versions of binutils (as -current has a binutils package newer than gcc), but that did not help either. So, I tried compiling gcc-4.7.0 again to see if it would fail. It did not. It also does not seem to be using -fPIC, but it doesn't create a compile error in this case and the gnat package contains all the expected files.

Any help appreciated. Meanwhile it looks like we'll be sticking with 4.7.0.

ponce 06-15-2012 02:20 PM

I've not tried yet a build, but looking at its git I suspect (but it's just a suspect :) ) this commit is involved

http://gcc.gnu.org/git/?p=gcc.git;a=...38ebcf41e6d4b6

EDIT: seems that in a later one (8 hours ago) they readded some
http://gcc.gnu.org/git/?p=gcc.git;a=...70703e2ad90958

ponce 06-15-2012 02:49 PM

it can be (still wild guess), that this patch derived from that post release commit can fix the build (but I haven't tested yet).

EDIT: seems there's a related message on the mailing list.

volkerdi 06-15-2012 03:07 PM

Thanks ponce! I kludged -fPIC into the adalib/Makefile.in GNATLIBCFLAGS and it appears to have built correctly. But I'll try the post release patch (which seems to revert part of the previous change) and use that instead if it works.

ponce 06-15-2012 03:13 PM

thanks to you for providing us the new gcc! :)

Matteo


All times are GMT -5. The time now is 06:04 AM.