Created attachment 872364 [details] gcc-build-log When compiled natively (in amd64), it works just fine. Emerge info: emerge-i686-asus-linux-gnu --info '=sys-devel/gcc-13.2.1_p20230826::gentoo' Portage 3.0.51 (python 3.11.5-final-0, default/linux/x86/17.0, gcc-12, glibc-2.37-r3, 6.1.55-gentoo-dist-hardened x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.1.55-gentoo-dist-hardened-x86_64-Intel-R-_Core-TM-_i7-7500U_CPU_@_2.70GHz-with-glibc2.37 KiB Mem: 12158792 total, 9534944 free KiB Swap: 4194300 total, 4194300 free Timestamp of repository gentoo: Sun, 08 Oct 2023 15:00:01 +0000 Head commit of repository gentoo: 85d9c3b676fb54b0d62e6e90a0c76bdc246bbaaf sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.7::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-lang/perl: 5.36.1-r3::gentoo dev-lang/python: 3.11.5::gentoo dev-util/cmake: 3.26.5-r1::gentoo sys-apps/baselayout: 2.14::gentoo sys-apps/openrc: 0.48::gentoo sys-apps/sandbox: 2.37::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/gcc: 12.3.1_p20230526::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/make: 4.4.1-r1::gentoo sys-kernel/linux-headers: 6.1::gentoo (virtual/os-headers) sys-libs/glibc: 2.37-r3::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 volatile: False sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes sync-rsync-extra-opts: ACCEPT_KEYWORDS="x86" ACCEPT_LICENSE="@FREE" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-O2 -pipe -march=bonnell -msahf -mmovbe -mfxsr" CHOST="i686-asus-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo" CXXFLAGS="-O2 -pipe -march=bonnell -msahf -mmovbe -mfxsr" DISTDIR="/var/cache/distfiles" ENV_UNSET="CARGO_HOME DBUS_SESSION_BUS_ADDRESS DISPLAY GDK_PIXBUF_MODULE_FILE 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 XDG_STATE_HOME" FCFLAGS="-O2 -pipe -march=bonnell -msahf -mmovbe -mfxsr" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict 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 -pipe -march=bonnell -msahf -mmovbe -mfxsr" GENTOO_MIRRORS="http://distfiles.gentoo.org" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" LEX="flex" PKGDIR="/mnt/backup/i686-asus-linux-gnu" PORTAGE_BINHOST="ssh://fabri@192.168.0.50/var/cache/binpkgs" PORTAGE_CONFIGROOT="/usr/i686-asus-linux-gnu/" 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/i686-asus-linux-gnu/tmp/" SHELL="/bin/bash" USE="X acl bzip2 cli crypt dist-kernel dri fortran gdbm iconv ipv6 libtirpc ncurses nls nptl openmp pam pcre readline seccomp split-usr ssl test-rust unicode x86 xattr zlib" ABI_X86="32" ADA_TARGET="gnat_2021" 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_X86="mmx mmxext sse sse2 sse3 ssse3" ELIBC="glibc" 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 synaptics" 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="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="intel i915" 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: ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EMERGE_DEFAULT_OPTS, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, MAKEOPTS, NM, OBJCOPY, OBJDUMP, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
/usr/i686-asus-linux-gnu/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/libgcc/unwind-dw2.c:964:20: error: ‘__LIBGCC_DWARF_CIE_DATA_ALIGNMENT__’ undeclared (first use in this function); did you mean ‘DWARF_CIE_DATA_ALIGNMENT’? 964 | #define DATA_ALIGN __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/i686-asus-linux-gnu/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/libgcc/unwind-dw2.c:964:20: note: in definition of macro ‘DATA_ALIGN’ 964 | #define DATA_ALIGN __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/i686-asus-linux-gnu/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/libgcc/unwind-dw2.c:964:20: note: each undeclared identifier is reported only once for each function it appears in 964 | #define DATA_ALIGN __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/i686-asus-linux-gnu/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/libgcc/unwind-dw2.c:964:20: note: in definition of macro ‘DATA_ALIGN’ 964 | #define DATA_ALIGN __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/i686-asus-linux-gnu/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/libgcc/unwind-dw2.c: In function ‘execute_cfa_program’: /usr/i686-asus-linux-gnu/tmp/portage/sys-devel/gcc-13.2.1_p20230826/work/gcc-13-20230826/libgcc/unwind-dw2.c:977:25: error: ‘__LIBGCC_DWARF_CIE_DATA_ALIGNMENT__’ undeclared (first use in this function); did you mean ‘DWARF_CIE_DATA_ALIGNMENT’? 977 | if (fs->data_align == __LIBGCC_DWARF_CIE_DATA_ALIGNMENT__ | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | DWARF_CIE_DATA_ALIGNMENT fwiw, using a custom CHOST, even if one _should_ be able to do it, often leads to confusion in build systems like this; for x86 we generally just tell people to do a chroot on amd64 instead. Are you saying USE=-jit works?
> fwiw, using a custom CHOST, even if one _should_ be able to do it, often > leads to confusion in build systems like this; for x86 we generally just > tell people to do a chroot on amd64 instead. I saw that the wiki page and even crossdev advices against it. I'll try to give the chroot a try. Thank you for the tip! > Are you saying USE=-jit works? Yes! Everything has worked perfectly* so far. Crossdev is an amazing tool, I have to give the gentoo devs props! The error only came up with the jit use flag on gcc turned on. Without it, it compiled just fine.
You're very welcome! Thanks, the JIT part is a very significant hint. We pass rather different configure args there. I'll let you know when I have something for you to try.
Hi! Great news!! Out of the blue, I was able to install crossdev gcc with the +jit use flag! :D Great! I am having issues with emacs recognizing the jit libraries however. I opened a new bug for that issue. Link to said issue: https://bugs.gentoo.org/916511 I don't know if Sam had something to do with this. Regardless, it was a pleasant surprise.
Fantastic! It must be to do with the continued toolchain.eclass work, I suppose.