View previous topic :: View next topic |
Author |
Message |
SlowMotion n00b
Joined: 26 May 2024 Posts: 36
|
Posted: Sun Aug 25, 2024 6:58 pm Post subject: Problem rebuilding gcc |
|
|
Quote: |
>>> Failed to emerge sys-devel/gcc-13.3.1_p20240614, Log file:
>>> '/var/tmp/portage/sys-devel/gcc-13.3.1_p20240614/temp/build.log'
* Messages for package sys-devel/gcc-13.3.1_p20240614:
* Different values of l1-cache-size detected!
* GCC will fail to bootstrap when comparing files with these flags.
* This CPU is likely big.little/hybrid hardware with power/efficiency cores.
* Please install app-misc/resolve-march-native and run 'resolve-march-native'
* to find a safe value of CFLAGS for this CPU. Note that this may vary
* depending on the core it ran on. taskset can be used to fix the cores used.
* ERROR: sys-devel/gcc-13.3.1_p20240614::gentoo failed (configure phase):
* Varying l1-cache-size found, aborting (bug #915389, gcc PR#111768)
*
* Call stack:
* ebuild.sh, line 136: Called src_configure
* environment, line 3413: Called toolchain_src_configure
* environment, line 4559: Called gcc_do_filter_flags
* environment, line 1822: Called die
* The specific snippet of code:
* die "Varying l1-cache-size found, aborting (bug #915389, gcc PR#111768)";
|
What confuses me is "Note that this may vary depending on the core it ran on."
How should I find a correct value and why does gcc suddenly need exact cache sizes of my computer ?
emerge --info '=sys-devel/gcc-13.3.1_p20240614::gentoo'
https://pastebin.com/5uwGB0GH
emerge -pqv '=sys-devel/gcc-13.3.1_p20240614::gentoo'
Quote: | [ebuild U ] sys-devel/gcc-13.3.1_p20240614 [13.2.1_p20240210] USE="cet (cxx) (default-stack-clash-protection) (default-znow) fortran (multilib) nls openmp (pie) sanitize ssp zstd -ada (-custom-cflags) -d -debug -doc (-fixed-point) -go -graphite -hardened (-ieee-long-double) -jit (-libssp) -lto -modula2 -objc -objc++ -objc-gc (-pch) -pgo -systemtap -test -valgrind -vanilla -vtv" |
full build log https://pastebin.com/HXEcemVL |
|
Back to top |
|
|
alamahant Advocate
Joined: 23 Mar 2019 Posts: 3916
|
|
Back to top |
|
|
SlowMotion n00b
Joined: 26 May 2024 Posts: 36
|
Posted: Sun Aug 25, 2024 7:25 pm Post subject: |
|
|
Thanks trying that way (currently compiling).
But its strange that a bug reported 2023-10-11 is marked as "NEW".
But this version is now used in gentoo with a known bug that make problems on a supported platform
I am a little bit confused |
|
Back to top |
|
|
Hu Administrator
Joined: 06 Mar 2007 Posts: 22619
|
Posted: Sun Aug 25, 2024 7:43 pm Post subject: |
|
|
What status should it have, if the developers have not fixed it to their satisfaction? The problem is that these hybrid CPUs break certain assumptions that have held since the very earliest usable hardware, and the obvious solution (checking cache size on every core, every time) is undesirable. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111768#c7 is relevant. The workaround may be unpleasant (asking the user to not use -march=native), but it is effective. Gentoo does not have the precision to prevent users on affected hardware from scheduling an emerge of gcc, short of denying gcc to everyone, so the current check is, as far as I can see, the best that Gentoo can do to keep affected users from hitting the failure. Further, as I understand it, this is not a regression in gcc. Every version of gcc that understands -march=native is impacted by this. |
|
Back to top |
|
|
sam_ Developer
Joined: 14 Aug 2020 Posts: 1949
|
Posted: Mon Aug 26, 2024 7:38 am Post subject: |
|
|
I also tried quite hard to implement an automated, if icky, workaround, and it couldn't be feasibly done because of how the option parsing works.
SlowMotion wrote: |
How should I find a correct value and why does gcc suddenly need exact cache sizes of my computer ?
|
The error message says to use resolve-march-native to obtain the correct values for a workaround.
The "sudden" part is because you're using new hardware. If you didn't hit it before now, you got very lucky.
It is possible we could do the check in pkg_pretend/pkg_setup instead or as well as in src_configure. I'm not sure that would really make anyone much happier though. |
|
Back to top |
|
|
|
|
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
|
|