Build log: https://hastebin.com/podezuvoci.m # emerge -1 sys-devel/llvm * ERROR: sys-devel/llvm-12.0.0::gentoo failed (compile phase): * ninja -v -j8 -l0 distribution failed * * Call stack: * ebuild.sh, line 127: Called src_compile * environment, line 3818: Called multilib-minimal_src_compile * environment, line 2597: Called multilib_foreach_abi 'multilib-minimal_abi_src_compile' * environment, line 2867: Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile' * environment, line 2532: Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_compile' * environment, line 2530: Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_compile' * environment, line 597: Called multilib-minimal_abi_src_compile * environment, line 2591: Called multilib_src_compile * environment, line 3079: Called cmake_build 'distribution' * environment, line 1321: Called eninja 'distribution' * environment, line 1807: Called die * The specific snippet of code: * "$@" || die "${nonfatal_args[@]}" "${*} failed" * * If you need support, post the output of `emerge --info '=sys-devel/llvm-12.0.0::gentoo'`, * the complete build log and the output of `emerge -pqv '=sys-devel/llvm-12.0.0::gentoo'`. * The complete build log is located at '/var/tmp/portage/sys-devel/llvm-12.0.0/temp/build.log'. * The ebuild environment file is located at '/var/tmp/portage/sys-devel/llvm-12.0.0/temp/environment'. * Working directory: '/var/tmp/portage/sys-devel/llvm-12.0.0/work/llvm-12.0.0_build-abi_x86_32.x86' * S: '/var/tmp/portage/sys-devel/llvm-12.0.0/work/llvm' # emerge --info '=sys-devel/llvm-12.0.0::gentoo' Portage 3.0.20 (python 3.9.6-final-0, default/linux/amd64/17.1/hardened, gcc-11.1.0, glibc-2.33-r1, 5.13.1-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-5.13.1-gentoo-x86_64-AMD_FX-tm-8320_Eight-Core_Processor-with-glibc2.33 KiB Mem: 16377612 total, 9485480 free KiB Swap: 134217724 total, 134217724 free Timestamp of repository gentoo: Fri, 09 Jul 2021 02:30:01 +0000 Head commit of repository gentoo: e4b0c36e0925e5f5f53fe889bc260c0548fe43c1 Timestamp of repository guru: Fri, 09 Jul 2021 02:36:23 +0000 Head commit of repository guru: c4ab449f53112f808008346ce1fcd38be349d623 sh bash 5.1_p8 ld GNU ld (Gentoo 2.36.1 p3) 2.36.1 ccache version 4.3 [disabled] app-shells/bash: 5.1_p8::gentoo dev-java/java-config: 2.3.1::gentoo dev-lang/perl: 5.34.0::gentoo dev-lang/python: 3.9.6::gentoo, 3.10.0_beta3::gentoo dev-lang/rust-bin: 1.53.0::gentoo dev-util/ccache: 4.3-r2::gentoo dev-util/cmake: 3.20.5::gentoo sys-apps/baselayout: 2.7-r3::gentoo sys-apps/openrc: 0.43.3::gentoo sys-apps/sandbox: 2.24::gentoo sys-devel/autoconf: 2.13-r1::gentoo, 2.69-r5::gentoo sys-devel/automake: 1.16.3-r1::gentoo sys-devel/binutils: 2.36.1-r1::gentoo sys-devel/gcc: 11.1.0-r2::gentoo sys-devel/gcc-config: 2.4::gentoo sys-devel/libtool: 2.4.6-r6::gentoo sys-devel/make: 4.3::gentoo sys-kernel/linux-headers: 5.12::gentoo (virtual/os-headers) sys-libs/glibc: 2.33-r1::gentoo Repositories: gentoo location: /var/db/repos/gentoo sync-type: rsync sync-uri: rsync://rsync.gentoo.org/gentoo-portage priority: -1000 sync-rsync-verify-metamanifest: yes sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-extra-opts: guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo ACCEPT_KEYWORDS="amd64 ~amd64" ACCEPT_LICENSE="* -@EULA" CBUILD="x86_64-pc-linux-gnu" CFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" CHOST="x86_64-pc-linux-gnu" CONFIG_PROTECT="/etc /usr/share/gnupg/qualified.txt" CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/sandbox.d /etc/terminfo" CXXFLAGS="-march=native -O2 -pipe -fomit-frame-pointer" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="-j8" 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 -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs config-protect-if-modified distlocks ebuild-locks fixlafiles ipc-sandbox merge-sync multilib-strict network-sandbox news 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" GENTOO_MIRRORS="rsync://mirror.init7.net/gentoo" LANG="C.UTF8" LDFLAGS="-Wl,-O1 -Wl,--as-needed" MAKEOPTS="-j8" PKGDIR="/var/cache/binpkgs" PORTAGE_CONFIGROOT="/" 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="/var/tmp" USE="X acl alsa amd64 bzip2 crypt dbus ffmpeg hardened iconv ipv6 libglvnd libtirpc multilib ncurses nls nptl openmp pam pcre pie readline seccomp split-usr ssl ssp threads unicode xattr xtpax zlib" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="ali5451 als4000 atiixp atiixp-modem bt87x ca0106 cmipci emu10k1x ens1370 ens1371 es1938 es1968 fm801 hda-intel intel8x0 intel8x0m maestro3 trident usb-audio via82xx via82xx-modem ymfpci" 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" 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 wacom" 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="postgres10 postgres11" PYTHON_SINGLE_TARGET="python3_9" PYTHON_TARGETS="python3_9" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="amdgpu radeonsi radeon" 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, INSTALL_MASK, LC_ALL, LINGUAS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS ================================================================= Package Settings ================================================================= sys-devel/llvm-12.0.0::gentoo was built with the following: USE="libffi ncurses -debug -doc -exegesis -gold -libedit -test -xar -xml -z3" ABI_X86="(64) -32 (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore" CFLAGS="-march=bdver2 -O2 -pipe -fomit-frame-pointer" CXXFLAGS="-march=bdver2 -O2 -pipe -fomit-frame-pointer" FEATURES="usersync network-sandbox xattr fixlafiles usersandbox userfetch distlocks binpkg-dostrip qa-unresolved-soname-deps ipc-sandbox multilib-strict ebuild-locks protect-owned unknown-features-warn userpriv assume-digests pid-sandbox binpkg-docompress merge-sync news binpkg-logs parallel-fetch strict sfperms sandbox unmerge-orphans unmerge-logs config-protect-if-modified preserve-libs" # emerge -pqv '=sys-devel/llvm-12.0.0::gentoo' [ebuild R ] sys-devel/llvm-12.0.0 USE="libffi ncurses -debug -doc -exegesis -gold -libedit -test -xar -xml -z3" ABI_X86="32* (64) (-x32)" LLVM_TARGETS="AMDGPU BPF NVPTX (X86) -AArch64 -ARC -ARM -AVR (-CSKY) -Hexagon -Lanai -MSP430 -Mips -PowerPC -RISCV -Sparc -SystemZ -VE -WebAssembly -XCore"
Created attachment 722902 [details] Build log.
Created attachment 722905 [details] emerge --info '=sys-devel/llvm-12.0.0::gentoo'
Created attachment 722908 [details] emerge -pqv '=sys-devel/llvm-12.0.0::gentoo'
Tried to build sys-devel/llvm-11.1.0 — failed too.
With disabled `abi_x86_32`, it compiles normally.
llvm-10.0.1 fails too
*** Bug 801421 has been marked as a duplicate of this bug. ***
From the other bug, this may be related to the kernel's CONFIG_COMPAT_32BIT_TIME being unset and kernel 5.13.x (haven't tried).
@toolchain, is there some active effort to switch to 64-bit time_t on x86? I don't see anything like that in glibc (i.e. it seems to always force the 32-bit type on 32-bit x86), so this looks like PEBKAC.
https://sourceware.org/glibc/wiki/Y2038ProofnessDesign is an effort and API design description. Similar to _FILE_OFFSET_BITS=64 it's an explicit option that would need to be enabled (at least while we are yet far away from 2038). For time_t it will be a _TIME_BITS=64. glibc-2.34 (not released yet) will provide it. The caveat is that even 32-bit time_t calls will use (and probably already uses partially) 64-bit kernel's time_t. Thus it's not a 1-to-1 mapping of 32-bit userspace time_t <=> CONFIG_COMPAT_32BIT_TIME and eventually need for CONFIG_COMPAT_32BIT_TIME should go away for 32-bit time_t. But that day is not today.
Ok, so the issue is not LLVM-specific. You can't disable CONFIG_COMPAT_32BIT_TIME if you want to use 32-bit applications on multilib amd64. I suppose we could add a config check somewhere (in glibc maybe?) but LLVM is not the place for it.