Summary: | =sys-devel/gcc-11.1.0-r2 fails to cross compile into rootfs | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | tt_1 <herrtimson> |
Component: | Current packages | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | sam |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: |
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017 https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80196 |
||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 732706 | ||
Attachments: |
compressed build log
output from emerge --info (host) output from emerge --info (cross-target) bootstrap order [PATCH] sys-devel/gcc: regression: fenv_t not declared |
Created attachment 725788 [details]
output from emerge --info (host)
Created attachment 725791 [details]
output from emerge --info (cross-target)
Created attachment 725794 [details]
bootstrap order
attached you will find the output of emerge-aarch64-unknown-linux-gnu -auvND world, this command bootstraps the rootfs and shows the order of emerged packages. The list will fail when =sys-devel/gcc-11.1.0-r2 is reached.
I will retry with =sys-devel/gcc-11.2.0 thanks for the heads up, do you know which of the two patches in the upstream bug are worth a try? Created attachment 741654 [details, diff]
[PATCH] sys-devel/gcc: regression: fenv_t not declared
Same for sys-devel/gcc-11.2.0
Had luck with the following patch.
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=192068fcd5aa14c681bcd90fe28f4bff641599e1 commit 192068fcd5aa14c681bcd90fe28f4bff641599e1 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-11-18 05:22:50 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-11-18 05:22:50 +0000 sys-devel/gcc: add workaround for cross-compile failure Bug: https://bugs.gentoo.org/803371 Signed-off-by: Sam James <sam@gentoo.org> .../files/gcc-11.2.0-cross-compile-include.patch | 26 ++++++++++++++++++++++ sys-devel/gcc/gcc-11.2.0.ebuild | 9 ++++++++ 2 files changed, 35 insertions(+) The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/proj/musl.git/commit/?id=cae17298ec9c0d1c84577a026545491a95af2ea8 commit cae17298ec9c0d1c84577a026545491a95af2ea8 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-11-18 05:21:33 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-11-18 05:21:33 +0000 sys-devel/gcc: add workaround for cross-compile failure Bug: https://bugs.gentoo.org/803371 Signed-off-by: Sam James <sam@gentoo.org> .../files/gcc-11.2.0-cross-compile-include.patch | 26 ++++++++++++++++++++++ sys-devel/gcc/gcc-11.2.0.ebuild | 5 +++++ 2 files changed, 31 insertions(+) I think the patch is applied incorrectly: not the cross compiler is affected, but the canadian cross into the rootfs. So: "if tc-is-crosscompile ; then" should be correct. Please check the ebuild, thanks. (In reply to tt_1 from comment #9) > I think the patch is applied incorrectly: not the cross compiler is > affected, but the canadian cross into the rootfs. So: "if tc-is-crosscompile > ; then" should be correct. Please check the ebuild, thanks. Ah, it seems to work for me here, but I understand -- that's sort of by chance / it's a subset of the cases where the patch needs to be applied. You're right. The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4978a4ec96cf4785251da724260069ad5316f0f3 commit 4978a4ec96cf4785251da724260069ad5316f0f3 Author: Sam James <sam@gentoo.org> AuthorDate: 2021-11-24 22:51:51 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2021-11-24 22:52:03 +0000 sys-devel/gcc: fix cross compile patch application Bug: https://bugs.gentoo.org/803371 Signed-off-by: Sam James <sam@gentoo.org> sys-devel/gcc/gcc-11.2.0.ebuild | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) This was fixed in gcc-12 branch, and swiftly backported to gcc-11 branch: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=01a70ccd723eb9a479186fe37c972b0d0f8676cf Can you think of either updating the patch or the gcc-11 snapshot? (In reply to tt_1 from comment #12) > This was fixed in gcc-12 branch, and swiftly backported to gcc-11 branch: > https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git; > h=01a70ccd723eb9a479186fe37c972b0d0f8676cf > > Can you think of either updating the patch or the gcc-11 snapshot? Yep, I'm subscribed to the bug. Is there a reason I'm missing for the urgency? Snapshots are done weekly by upstream. I think it should be functionally equivalent to what we have now but I'll be updating it soon (it was literally yesterday...) when I read about the fix this morning I was just really happy about it and wanted it to share with you :) to answer the question: a new snapshot with the fix included will allow me to give it a proper testing, the debate about the best fix for this was really long and worst outcome is an incomplete fix that goes unnoticed until after the gcc-11.3 release. (In reply to tt_1 from comment #14) > when I read about the fix this morning I was just really happy about it and > wanted it to share with you :) > sorry, that's totally fine! I was just writing on my phone and wondered if I had missed something :) > to answer the question: a new snapshot with the fix included will allow me > to give it a proper testing, the debate about the best fix for this was > really long and worst outcome is an incomplete fix that goes unnoticed until > after the gcc-11.3 release. yes, that's a very good point The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b96fd11e3e5626181c32c38381f814aba21fb9f0 commit b96fd11e3e5626181c32c38381f814aba21fb9f0 Author: Sam James <sam@gentoo.org> AuthorDate: 2022-01-18 13:16:42 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2022-01-18 13:19:30 +0000 sys-devel/gcc: add 11.2.1_p20220115 Fairly minor changes upstream since the last snapshot of the 11 stable branch. Includes more CET fixes and the upstream cross-compile patch. Also, the PCH ICE fix, although we've since masked PCH globally due to its instability. Bug: https://bugs.gentoo.org/822036 Closes: https://bugs.gentoo.org/803371 Closes: https://bugs.gentoo.org/828400 Closes: https://bugs.gentoo.org/822690 Signed-off-by: Sam James <sam@gentoo.org> profiles/base/package.use.mask | 2 +- sys-devel/gcc/Manifest | 3 +++ sys-devel/gcc/gcc-11.2.1_p20220115.ebuild | 26 ++++++++++++++++++++++++++ 3 files changed, 30 insertions(+), 1 deletion(-) |
Created attachment 725785 [details] compressed build log reproducer: get fresh stage3, update world, then emerge =sys-devel/gcc-11.1.0-r2. Eselect gcc-11 when done and do an emerge -e world for good measurement. next, emerge layman and =sys-devel/crossdev-20210718 ; set up the cross compiler via: crossdev -S aarch64-unknown-linux-gnu --gcc 11.1.0-r2 --ov-output /var/lib/layman/crossdev/ when done, fix make.profile within /usr/aarch64-unknown-linux-gnu/etc/portage to /usr/portage/profiles/default/linux/arm64/17.0/ , and fixup the targets make.conf to only accept stable keywords. Also set USE="-rsync-verify -sanitize -installkernel" globally via make.conf unmask =sys-devel/gcc-11.1.0-r2 for the target populate the rootfs at /usr/aarch64-unknown-linux-gnu/ via emerge-aarch64-unknown-linux-gnu -auvND world and wait a bit, it will fail at =sys-devel/gcc-11.1.0-r2 with this beauty: /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:58:11: error: ‘fenv_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:59:11: error: ‘fexcept_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:62:11: error: ‘feclearexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:63:11: error: ‘fegetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:64:11: error: ‘feraiseexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:65:11: error: ‘fesetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:66:11: error: ‘fetestexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:68:11: error: ‘fegetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:69:11: error: ‘fesetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:71:11: error: ‘fegetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:72:11: error: ‘feholdexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:73:11: error: ‘fesetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:74:11: error: ‘feupdateenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:61:11: error: ‘fenv_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:62:11: error: ‘fexcept_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:65:11: error: ‘feclearexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:66:11: error: ‘fegetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:67:11: error: ‘feraiseexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:68:11: error: ‘fesetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:69:11: error: ‘fetestexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:71:11: error: ‘fegetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:72:11: error: ‘fesetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:74:11: error: ‘fegetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:75:11: error: ‘feholdexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:76:11: error: ‘fesetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:77:11: error: ‘feupdateenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:58:11: error: ‘fenv_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:59:11: error: ‘fexcept_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:62:11: error: ‘feclearexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:63:11: error: ‘fegetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:64:11: error: ‘feraiseexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:65:11: error: ‘fesetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:66:11: error: ‘fetestexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:68:11: error: ‘fegetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:69:11: error: ‘fesetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:71:11: error: ‘fegetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:72:11: error: ‘feholdexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:73:11: error: ‘fesetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/fenv.h:74:11: error: ‘feupdateenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:61:11: error: ‘fenv_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:62:11: error: ‘fexcept_t’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:65:11: error: ‘feclearexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:66:11: error: ‘fegetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:67:11: error: ‘feraiseexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:68:11: error: ‘fesetexceptflag’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:69:11: error: ‘fetestexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:71:11: error: ‘fegetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:72:11: error: ‘fesetround’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:74:11: error: ‘fegetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:75:11: error: ‘feholdexcept’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:76:11: error: ‘fesetenv’ has not been declared in ‘::’ /usr/aarch64-unknown-linux-gnu/tmp/portage/sys-devel/gcc-11.1.0-r2/work/build/aarch64-unknown-linux-gnu/libstdc++-v3/include/cfenv:77:11: error: ‘feupdateenv’ has not been declared in ‘::’ here are the useflags for the hosts system-gcc: Calculating dependencies... done! [ebuild R ~] sys-devel/gcc-11.1.0-r2:11::gentoo USE="(cxx) fortran (multilib) nls nptl openmp pch (pie) sanitize ssp (-ada) -custom-cflags -d -debug -doc (-fixed-point) -go -graphite (-hardened) -jit (-libssp) -lto -objc -objc++ -objc-gc -pgo -systemtap -test -valgrind -vanilla -vtv -zstd" 0 KiB here are the useflags for the hosts cross-gcc: emerge -pv cross-aarch64-unknown-linux-gnu/gcc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild R ~] cross-aarch64-unknown-linux-gnu/gcc-11.1.0-r2:11::crossdev USE="cxx fortran nls nptl openmp pch pie ssp -ada -custom-cflags -d -debug -doc (-fixed-point) -go -graphite -hardened -jit -libssp -lto -multilib -objc -objc++ -objc-gc -pgo -sanitize -systemtap -test -valgrind -vanilla -vtv -zstd" 0 KiB here are the useflag for the targets sys-devel/gcc emerge-aarch64-unknown-linux-gnu -pv gcc These are the packages that would be merged, in order: Calculating dependencies... done! [ebuild N ~] sys-devel/gcc-11.1.0-r2:11::gentoo to /usr/aarch64-unknown-linux-gnu/ USE="(cxx) fortran nls nptl openmp pch (pie) ssp (-ada) -custom-cflags -d -debug -doc (-fixed-point) -go -graphite (-hardened) -jit (-libssp) -lto (-multilib) -objc -objc++ -objc-gc -pgo -sanitize -systemtap -test (-valgrind) -vanilla -vtv -zstd" 0 KiB I'm quite puzzled by the amount of missing declared errors, also I have no idea where this may be coming from.