Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
GCC 4.6.2 build flags
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Fri Apr 06, 2012 8:52 am    Post subject: GCC 4.6.2 build flags Reply with quote

GCC 4.6.2 is still masked for ~x86, but I need that specific version to build a (working)
cross-compiler. I can unmask it, but the build then fails with:
Code:

Comparing stages 2 and 3
warning: gcc/cc1plus-checksum.o differs
warning: gcc/cc1-checksum.o differs
Bootstrap comparison failure!
gcc/varasm.o differs
make[2]: *** [compare] Error 1


Does anyone know of any specific build flags that I could add to make.conf to enable
GCC 4.6.2 to compile? (I'm building it with a current 32-bit x86 system and GCC 4.5.3).

Thanks - Will
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3226

PostPosted: Sat Apr 07, 2012 6:44 am    Post subject: Reply with quote

gcc-4.6.* needs a rather recent glibc to compile properly. I forgot which version, but it may very well be 2.14 or even 2.14.1
Back to top
View user's profile Send private message
Veldrin
Veteran
Veteran


Joined: 27 Jul 2004
Posts: 1937
Location: Zurich, Switzerland

PostPosted: Sat Apr 07, 2012 9:00 am    Post subject: Reply with quote

I was able to build gcc-4.6.2 with glibc-2.13-r4 and binutils-2.21.1r1 back in November.
If that still fails, try upgrading glibc or even binutils to the latest unstable.

V.
_________________
read the portage output!
If my answer is too short, just ask for an explanation.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Sat Apr 07, 2012 9:15 am    Post subject: Reply with quote

Yes, that's what I'm using, but after three attempts with different USE flags I gave up and
downloaded the package from gnu.org. So far, that's compiling ok ...

Thanks for the confirmation of the version numbers; it means something is off in my system.
Since its a new and clean Stage 3 install I'm not sure there's much I can do about that.

Will
l
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3226

PostPosted: Sat Apr 07, 2012 8:19 pm    Post subject: Reply with quote

I can confirm now some problems: On one of my 3 systems (-march=pentium3) the gcc does not compile properly (differing stages as in your case), even if originally built with gcc-4.6.2.
It built on this system previously. On a very similar system (-march=native with an athlon) there is no such problems.
It might be related with graphite which is the only difference in the CFLAGS (besides -march) on these systems.
Since gcc-4.7 will come out soon, I make no further tests now.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Sun Apr 08, 2012 12:11 pm    Post subject: Reply with quote

mv wrote:
I can confirm now some problems: On one of my 3 systems (-march=pentium3) the gcc does not compile properly (differing stages as in your case), even if originally built with gcc-4.6.2.
It built on this system previously. On a very similar system (-march=native with an athlon) there is no such problems.
It might be related with graphite which is the only difference in the CFLAGS (besides -march) on these systems.
Since gcc-4.7 will come out soon, I make no further tests now.


Yup, that's the one. I've tried pentium3 and native, and neither build (but with different problems). OTOH both
4.6.2 and 4.6.3 build correctly from the original gnu.org packages; the trouble is I'm not sure how to package
the results. I'm not sure where Gentoo gets its gcc patches, but it looks as if one of them may be the problem.

I'll see if the graphite flag makes any difference; it's a nuisance, since I only want 4.6 as the basis for a
cross-compiler - I don't want to build any Gentoo software with it.

Will
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3226

PostPosted: Sun Apr 08, 2012 1:37 pm    Post subject: Reply with quote

I have now tried the new gcc-4.7 from the hardened-dev overlay, and it built on all of my systems without any problems.
There is also gcc-4.6.3 in that overlay (but I have not tried). So it is probably not worth looking for the bug in gcc-4.6.2
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Sun Apr 08, 2012 9:35 pm    Post subject: Reply with quote

mv wrote:
I have now tried the new gcc-4.7 from the hardened-dev overlay, and it built on all of my systems without any problems.
There is also gcc-4.6.3 in that overlay (but I have not tried). So it is probably not worth looking for the bug in gcc-4.6.2


Well, the hardened 4.6.3 doesn't build for me - once again it fails with varasm.o differing between stages 2 and 3.
Since I've compiled the original package several times now it must be a Gentoo patch that's breaking things,
but I've no idea which.

Will
Back to top
View user's profile Send private message
Hu
Watchman
Watchman


Joined: 06 Mar 2007
Posts: 7679

PostPosted: Sun Apr 08, 2012 10:01 pm    Post subject: Reply with quote

cwr: could you post your emerge --info so that others can more readily try to replicate the specific failure?
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Mon Apr 09, 2012 9:59 am    Post subject: Reply with quote

Hu wrote:
cwr: could you post your emerge --info so that others can more readily try to replicate the specific failure?


I've filed a bug under GCC 4.6.2; I had another shot at rebuilding that, since the ebuild is (masked) in the standard tree.
The results are pretty consistent - it always fails with a mismatched stage2-gcc/varasm.o and stage3-gcc/varasm.o

Will
Back to top
View user's profile Send private message
mv
Advocate
Advocate


Joined: 20 Apr 2005
Posts: 3226

PostPosted: Thu Apr 12, 2012 7:04 pm    Post subject: Reply with quote

I can confirm now that gcc-4.6.3 from the hardened-development overlay also fails with -march=pentium3. It works on the same system with -march=native (which is on this system an intel core2 in 32bit mode). In both cases, graphite flags were active, so graphite seems to be unrelated. So it seems that only -march=pentium3 is broken.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1484

PostPosted: Sun Apr 15, 2012 12:36 am    Post subject: Reply with quote

mv wrote:
I can confirm now that gcc-4.6.3 from the hardened-development overlay also fails with -march=pentium3. It works on the same system with -march=native (which is on this system an intel core2 in 32bit mode). In both cases, graphite flags were active, so graphite seems to be unrelated. So it seems that only -march=pentium3 is broken.


Unfortunately I tried -march=native with 4.6.2, and it also failed - as I recall a slightly different faillure to -march=pentium3, but
it still failed to build. I've managed to find a binary package of version 4.5.1 of the gcc-avr cross-compiler I wanted,
(the 4.5.3 cross-compiler builds but produces buggy code), so I'm in no rush for 4.6.2. Since the package taken directly
from gnu.org, with no patches, builds correctly the problem is somewhere in the gentoo patches, but I've no idea where.

Will
Back to top
View user's profile Send private message
alexbuell
Guru
Guru


Joined: 18 Jul 2002
Posts: 433
Location: "Hemp"shire, UK

PostPosted: Wed Aug 01, 2012 10:26 am    Post subject: Reply with quote

cwr wrote:
mv wrote:
I can confirm now that gcc-4.6.3 from the hardened-development overlay also fails with -march=pentium3. It works on the same system with -march=native (which is on this system an intel core2 in 32bit mode). In both cases, graphite flags were active, so graphite seems to be unrelated. So it seems that only -march=pentium3 is broken.


Unfortunately I tried -march=native with 4.6.2, and it also failed - as I recall a slightly different faillure to -march=pentium3, but
it still failed to build. I've managed to find a binary package of version 4.5.1 of the gcc-avr cross-compiler I wanted,
(the 4.5.3 cross-compiler builds but produces buggy code), so I'm in no rush for 4.6.2. Since the package taken directly
from gnu.org, with no patches, builds correctly the problem is somewhere in the gentoo patches, but I've no idea where.

Will


Folks, temporarily change your CFLAGS to use i686 and 4.6.3 should build correctly. Change CFLAGS back once it's built. Worked for me.
_________________
Cheers,
Alex.

Linux - the best text adventure game ever.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum