Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 811294 - sys-devel/gcc-11.2.0: fails to cross compile for musl (error: there are no arguments to ‘__is_nothrow_constructible’ that depend on a template parameter, so a declaration of ‘__is_nothrow_constructible’ must be available [-fpermissive])
Summary: sys-devel/gcc-11.2.0: fails to cross compile for musl (error: there are no ar...
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-09-01 01:45 UTC by Sam James
Modified: 2021-11-10 13:37 UTC (History)
1 user (show)

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


Attachments
gcc-build-logs.tar.bz2 (gcc-build-logs.tar.bz2,136.33 KB, application/x-bzip2)
2021-09-01 01:45 UTC, Sam James
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-01 01:45:28 UTC
Created attachment 736990 [details]
gcc-build-logs.tar.bz2

Not sure what's going on here yet.

Currently in the process of trying to get a stage3 tarball for catalyst from scratch (CBUILD is aarch64-unknown-linux-gnu) for aarch64-gentoo-linux-musl.

I get pretty far, although I end up being unable to build GCC with the cross-built GCC.

guix seem to have hit the same issue: https://issues.guix.gnu.org/49600. Can't find an upstream report yet.

Errors look like:
/usr/aarch64-gentoo-linux-musl/tmp/portage/cross-aarch64-gentoo-linux-musl/gcc-11.2.0/work/build/aarch64-gentoo-linux-musl/libstdc++-v3/include/type_traits:971:25: error: there are no arguments to ‘__is_nothrow_constructible’ that depend on a template parameter, so a declaration of ‘__is_nothrow_constructible’ must be available [-fpermissive]
  971 |       = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
      |                         ^~~~~~~~~~~~~~~~~~~~~~~~~~
/usr/aarch64-gentoo-linux-musl/tmp/portage/cross-aarch64-gentoo-linux-musl/gcc-11.2.0/work/build/aarch64-gentoo-linux-musl/libstdc++-v3/include/type_traits:971:25: note: (if you use ‘-fpermissive’, G++ will accept your code, but allowing the use of an undeclared name is deprecated)
/usr/aarch64-gentoo-linux-musl/tmp/portage/cross-aarch64-gentoo-linux-musl/gcc-11.2.0/work/build/aarch64-gentoo-linux-musl/libstdc++-v3/include/type_traits:971:66: error: template argument 1 is invalid
  971 |       = __bool_constant<__is_nothrow_constructible(_Tp, _Args...)>;
      |                                                                  ^
Comment 1 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-01 01:45:57 UTC
# aarch64-gentoo-linux-musl-emerge --info
Portage 3.0.20 (python 3.9.6-final-0, default/linux/arm64/17.0/musl, gcc-10.3.0, musl-1.2.2-r3, 5.10.38-gentoo-dist aarch64)
=================================================================
System uname: Linux-5.10.38-gentoo-dist-aarch64-with-glibc2.33
KiB Mem:   262984492 total, 198242352 free
KiB Swap:    9767620 total,   9767620 free
Timestamp of repository gentoo: Sun, 29 Aug 2021 22:00:01 +0000
Head commit of repository gentoo: c8aeae97e6c4b96099555e224fdcca7f90964cd5
sh bash 5.1_p8
ld GNU ld (Gentoo 2.36.1 p5) 2.36.1
app-shells/bash:          5.1_p8::gentoo
dev-lang/python:          3.9.6_p1::gentoo
sys-apps/baselayout:      2.7-r3::gentoo
sys-apps/openrc:          0.43.5::gentoo
sys-apps/sandbox:         2.24::gentoo
sys-devel/binutils:       2.37_p1::gentoo
sys-devel/gcc-config:     2.4::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.13::gentoo (virtual/os-headers)
sys-libs/musl:            1.2.2-r3::gentoo
Repositories:

crossdev
    location: /var/db/repos/crossdev
    masters: gentoo
    priority: -1000

gentoo
    location: /var/db/repos/gentoo
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000
    sync-rsync-verify-jobs: 1
    sync-rsync-verify-metamanifest: yes
    sync-rsync-extra-opts:
    sync-rsync-verify-max-age: 24

ACCEPT_KEYWORDS="arm64 ~arm64"
ACCEPT_LICENSE="@FREE"
CBUILD="aarch64-unknown-linux-gnu"
CFLAGS="-O2 -pipe -fomit-frame-pointer"
CHOST="aarch64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -fomit-frame-pointer"
DISTDIR="/var/cache/distfiles"
ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GOBIN GOPATH PERL5LIB PERL5OPT PERLPREFIX PERL_CORE PERL_MB_OPT PERL_MM_OPT XAUTHORITY XDG_CACHE_HOME XDG_CONFIG_HOME XDG_DATA_HOME XDG_RUNTIME_DIR"
FCFLAGS="-O2"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync network-sandbox news nodoc noinfo noman parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms strict unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias locale.alias"
LANG="C.UTF8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed"
PKGDIR="/usr/aarch64-gentoo-linux-musl/packages/"
PORTAGE_CONFIGROOT="/usr/aarch64-gentoo-linux-musl/"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --omit-dir-times --compress --force --whole-file --delete --stats --human-readable --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages --exclude=/.git"
PORTAGE_TMPDIR="/usr/aarch64-gentoo-linux-musl/tmp/"
USE="acl arm64 bzip2 cli crypt dri fortran iconv ipv6 libglvnd libtirpc ncurses nls nptl openmp pcre readline seccomp split-usr ssl tcpd unicode xattr zlib" ADA_TARGET="gnat_2018" APACHE2_MODULES="authn_core authz_core socache_shmcb unixd actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache cgi cgid dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CALLIGRA_FEATURES="karbon sheets words" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_ARM="edsp thumb thumb2 v4 v5 v6 v7 v8 vfp vfp-d32 vfpv3 vfpv4" ELIBC="musl" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock greis isync itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf skytraq superstar2 timing tsip tripmate tnt ublox ubx" INPUT_DEVICES="libinput" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-3 php7-4" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="fbdev dummy v4l" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq proto steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, EMERGE_DEFAULT_OPTS, LC_ALL, LINGUAS, MAKEOPTS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS
Comment 2 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-09-01 02:51:32 UTC
Building gcc 10.3.0 works, however. Note that I'm using gcc 10.3.0 for compilation. Not tried building gcc 11 with gcc 11.
Comment 3 tt_1 2021-10-01 15:46:37 UTC
I never had much luck with mixing up gcc versions between host, target and rootfs. Its propably very time consuming to chase this down, with little benefit. Sorry if my message is not very constructive :)
Comment 4 Gordon Bos 2021-10-22 15:24:40 UTC
Had the same issue compiling for arm5. Switching to 11.2 cross-compiler allowed me to get further but failed at some later point with errors like these:

                 from /usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/gcc-11.2.0/libstdc++-v3/src/c++17/floating_to_chars.cc:31:
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/fenv.h:58:11: error: ‘fenv_t’ has not been declared in ‘::’
   58 |   using ::fenv_t;
      |           ^~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/fenv.h:59:11: error: ‘fexcept_t’ has not been declared in ‘::’
   59 |   using ::fexcept_t;
      |           ^~~~~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/fenv.h:62:11: error: ‘feclearexcept’ has not been declared in ‘::’
   62 |   using ::feclearexcept;
      |           ^~~~~~~~~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/fenv.h:63:11: error: ‘fegetexceptflag’ has not been declared in ‘::’
   63 |   using ::fegetexceptflag;
      |           ^~~~~~~~~~~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/fenv.h:64:11: error: ‘feraiseexcept’ has not been declared in ‘::’
   64 |   using ::feraiseexcept;
      |           ^~~~~~~~~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/cfenv:68:11: error: ‘fesetexceptflag’ has not been declared in ‘::’
   68 |   using ::fesetexceptflag;
      |           ^~~~~~~~~~~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/cfenv:69:11: error: ‘fetestexcept’ has not been declared in ‘::’
   69 |   using ::fetestexcept;
      |           ^~~~~~~~~~~~
/usr/armv5tel-softfloat-linux-gnueabi/tmp/portage/sys-devel/gcc-11.2.0/work/build/armv5tel-softfloat-linux-gnueabi/libstdc++-v3/include/cfenv:71:11: error: ‘fegetround’ has not been declared in ‘::’
   71 |   using ::fegetround;
      |           ^~~~~~~~~~
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-10 06:31:06 UTC
(In reply to tt_1 from comment #3)
> I never had much luck with mixing up gcc versions between host, target and
> rootfs. Its propably very time consuming to chase this down, with little
> benefit. Sorry if my message is not very constructive :)

I think you're right tbh.
Comment 6 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-10 06:31:34 UTC
(In reply to Gordon Bos from comment #4)
> Had the same issue compiling for arm5. Switching to 11.2 cross-compiler
> allowed me to get further but failed at some later point with errors like
> these:
> 

I think this is your bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017
Comment 7 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-10 06:32:36 UTC
(In reply to Sam James from comment #6)
> (In reply to Gordon Bos from comment #4)
> > Had the same issue compiling for arm5. Switching to 11.2 cross-compiler
> > allowed me to get further but failed at some later point with errors like
> > these:
> > 
> 
> I think this is your bug: https://gcc.gnu.org/bugzilla/show_bug.cgi?id=100017

ah, bug 803371
Comment 8 Gordon Bos 2021-11-10 13:37:52 UTC
Confirmed

That does result in a successful build, but obviously also implies a double work-around for the original issue.