Summary: | sys-devel/gcc-11.2.0: bootstrap comparison failure | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Chris <Christopher.Lundgren> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED NEEDINFO | ||
Severity: | major | CC: | Christopher.Lundgren, gentoo, me, sam |
Priority: | Highest | ||
Version: | unspecified | ||
Hardware: | AMD64 | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=831710 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: |
GCC build logs
GCC 9,10,11 "differs" issue |
Description
Chris
2021-08-19 14:26:50 UTC
Created attachment 734287 [details]
GCC build logs
Build logs.
Few things of note here, I suppose: - CFLAGS="-O2 -march=native -fomit-frame-pointer -fno-stack-protector -pipe" I personally wouldn't consider -fno-stack-protector to be a sensible or supported configuration. I wouldn't be surprised if plenty of stuff fails to build with this, and at least in the case of GCC, if it ended up forcing it on/off for some specific subcomponents, and this could end up being the cause (which may end up being a minor bug in GCC if it should filter it better). - LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--sort-common -Wl,--relax" -Wl,--relax is rather uncommon. Interestingly, slyfox raised it in a ::haskell bug (https://github.com/gentoo-haskell/gentoo-haskell/issues/704) and ended up filing a bug for binutils itself to better handle some mixed situations (similar to what I'm describing for -fno-satck-protector): https://sourceware.org/bugzilla/show_bug.cgi?id=27837. - I would not particularly bother with gold any more at this point, given it seems rather low-activity upstream. (As a complete aside, it seems rather odd to me you have so many Pythons, autoconfs, and automakes installed. Please remember to depclean after world upgrades and avoid putting dependencies/things you don't personally want in your /var/lib/portage/world file.) (In reply to Sam James from comment #2) > Few things of note here, I suppose: It would be useful if you could first tell us: - if the failure occurs with "vanilla" CFLAGS + CXXFLAGS + *FLAGS + LDFLAGS; - if it occurs with gold; - if previous GCC versions work. Depending on the results, we can figure out exactly which specific options cause failure. After updating pretty old Gentoo installation, I got stuck with GCC upgrade. Latest 8.5.0-r1 is compiling just fine, but any from 9,10,11 branch is failing with the same "differs" issue. Created attachment 765550 [details]
GCC 9,10,11 "differs" issue
(In reply to Serguei I. Ivantsov from comment #5) > Created attachment 765550 [details] > GCC 9,10,11 "differs" issue Please file a new bug as this is for 11.2.0 and your version is 11.2.1_p20220115. This original bug never received the information requested and isn't necessarily the same problem as what you're hitting. Someone did file bug 831710 for the latest GCC 11 but it now works for them. (In reply to Sam James from comment #6) > (In reply to Serguei I. Ivantsov from comment #5) > > Created attachment 765550 [details] > > GCC 9,10,11 "differs" issue > > Please file a new bug as this is for 11.2.0 and your version is > 11.2.1_p20220115. This original bug never received the information requested > and isn't necessarily the same problem as what you're hitting. > > Someone did file bug 831710 for the latest GCC 11 but it now works for them. Also, in the new bug, include emerge --info, and a tarball of the whole workdir. (In reply to Sam James from comment #6) > Please file a new bug as this is for 11.2.0 and your version is > 11.2.1_p20220115. As I said, looks like it's version-independent issue, because it's reproducible on any of 9,10,11 branches. But I was able to resolve this issue. Reading the links you provided and more, I found suggestion this can be related to CFLAGS, indeed, I changed it from CFLAGS="-O2 -pipe -march=native" to (I have old Opteron) CFLAGS="-O2 -pipe -march=bdver2" And now it compiles flawlessly! Thanks a lot! I can still provide a tarball of working copy, if it can help to make upstream fix. |