Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 871624 - sys-devel/gcc-11.3.0 compile fails during prefix bootstrap
Summary: sys-devel/gcc-11.3.0 compile fails during prefix bootstrap
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo/Alt
Classification: Unclassified
Component: Prefix Support (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Gentoo Prefix
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2022-09-19 01:04 UTC by APN-Pucky
Modified: 2023-03-19 17:43 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Attachments
build.log (build.log,525.59 KB, text/x-log)
2022-09-19 01:04 UTC, APN-Pucky
Details
gcc-build-logs (gcc-build-logs.tar.bz2,93.30 KB, application/x-bzip2)
2022-09-19 01:04 UTC, APN-Pucky
Details
stage3.log (stage3.tgz,772.94 KB, application/x-compressed-tar)
2022-09-23 11:23 UTC, APN-Pucky
Details

Note You need to log in before you can comment on or make changes to this bug.
Description APN-Pucky 2022-09-19 01:04:01 UTC
I tried to install Gentoo Prefix on a Debian 9 with gcc-6.3.0 and Linux  4.9.0-18-amd64 #1 SMP Debian 4.9.303-1 (2022-03-07) x86_64 GNU/Linux. It failed during compiling gcc-11.3.0. 

Reproducible: Didn't try

Steps to Reproduce:
1. Run bootstrap-prefix.sh
Actual Results:  
 * ERROR: sys-devel/gcc-11.3.0::gentoo failed (compile phase):
 *   emake failed
 * 
 * If you need support, post the output of `emerge --info '=sys-devel/gcc-11.3.0::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-devel/gcc-11.3.0::gentoo'`.
 * The complete build log is located at '/[...]/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/temp/build.log'.
 * The ebuild environment file is located at '/[...]/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/temp/environment'.
 * Working directory: '/home/wangjingbo/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/build'
 * S: '/[...]/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-11.3.0'
 * 
 * Please include /[...]/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-build-logs.tar.bz2 in your bug report.
 *
Comment 1 APN-Pucky 2022-09-19 01:04:38 UTC
Created attachment 812602 [details]
build.log
Comment 2 APN-Pucky 2022-09-19 01:04:54 UTC
Created attachment 812605 [details]
gcc-build-logs
Comment 3 APN-Pucky 2022-09-23 11:08:17 UTC
Retried it and same result. A similar problem was reported on #gentoo-prefix on an old CentOS machine.

I am adding warnings/errors only printed to std::out:

 * Messages for package sys-devel/gcc-11.3.0:
 * Disabling bootstrapping. ONLY recommended for development.
 * This is NOT a safe configuration for endusers!
 * This compiler may not be safe or reliable for production use!
 * ERROR: sys-devel/gcc-11.3.0::gentoo failed (compile phase):
 *   emake failed
 *
Comment 4 APN-Pucky 2022-09-23 11:23:44 UTC
Created attachment 813787 [details]
stage3.log
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-09-24 01:59:01 UTC
g++ -isystem /local0/a_neuw01/gentoo/usr/include -B/local0/a_neuw01/gentoo/usr/lib64 -L/local0/a_neuw01/gentoo/usr/lib64 -Wl,--dynamic-linker=/local0/a_neuw01/gentoo/lib64/ld-linux-x86-64.so.2  -pipe -pipe -O2 -fno-exceptions -fno-rtti -include config.h -I/local0/a_neuw01/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-11.3.0/libcody \
  -MMD -MP -MF buffer.d -c -o buffer.o /local0/a_neuw01/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-11.3.0/libcody/buffer.cc
In file included from /local0/a_neuw01/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/cstdlib:75,
                 from /local0/a_neuw01/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/ext/string_conversions.h:41,
                 from /local0/a_neuw01/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/bits/basic_string.h:6608,
                 from /local0/a_neuw01/gentoo/tmp/usr/lib/gcc/x86_64-pc-linux-gnu/11.3.0/include/g++-v11/string:55,
                 from /local0/a_neuw01/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-11.3.0/libcody/cody.hh:25,
                 from /local0/a_neuw01/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-11.3.0/libcody/internal.hh:5,
                 from /local0/a_neuw01/gentoo/var/tmp/portage/sys-devel/gcc-11.3.0/work/gcc-11.3.0/libcody/buffer.cc:6:
/usr/include/stdlib.h:56:1: error: '__BEGIN_NAMESPACE_STD' does not name a type
   56 | __BEGIN_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:62:5: error: 'div_t' does not name a type
   62 |   } div_t;
      |     ^~~~~
/usr/include/stdlib.h:73:1: error: '__END_NAMESPACE_STD' does not name a type
   73 | __END_NAMESPACE_STD
      | ^~~~~~~~~~~~~~~~~~~
/usr/include/stdlib.h:82:5: error: 'lldiv_t' does not name a type; did you mean 'ldiv_t'?
   82 |   } lldiv_t;
      |     ^~~~~~~
      |     ldiv_t
/usr/include/stdlib.h:84:1: error: '
Comment 6 APN-Pucky 2022-11-11 15:53:45 UTC
The error seems to be the same as here: https://www.mail-archive.com/gcc-bugs@gcc.gnu.org/msg566121.html

It seems like Debian GLIBC 2.24-11+deb9u4 (and similar in centos7) is too old for GCC-11, since it works on a recent Gentoo machine.

Is there a way to first compile an older GCC to upgrade GLIBC then, maybe? 
Or should the system compiler first create a recent glibc then GCC(s) instead of the other way round (more bootstrapping?)?
Comment 7 APN-Pucky 2023-03-19 17:38:47 UTC

*** This bug has been marked as a duplicate of bug 902123 ***