Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 773604 - sys-libs/libcxxabi-11.0.1[abi_x86_32] fails 32bit tests "[some library] is incompatible with elf32-i386"
Summary: sys-libs/libcxxabi-11.0.1[abi_x86_32] fails 32bit tests "[some library] is in...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: LLVM support project
URL:
Whiteboard:
Keywords: PATCH, PullRequest, TESTFAILURE
: 822213 824242 (view as bug list)
Depends on:
Blocks:
 
Reported: 2021-03-01 16:31 UTC by Paolo Pedroni
Modified: 2021-12-01 16:13 UTC (History)
10 users (show)

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


Attachments
libcxxabi-11.0.1:20210301-152740.log.gz (libcxxabi-11.0.1:20210301-152740.log.gz,28.59 KB, application/gzip)
2021-03-01 16:31 UTC, Paolo Pedroni
Details
libcxxabi-13-clang-toolchain-build-log (build.log,359.20 KB, text/x-log)
2021-10-02 23:50 UTC, Kenton Groombridge
Details
libcxxabi-13.0.0.ebuild (fixed) (libcxxabi-13.0.0.ebuild,3.63 KB, text/plain)
2021-10-03 01:50 UTC, Kenton Groombridge
Details
libcxxabi-32-bit-build.patch (libcxxabi-32-bit-build.patch,847 bytes, patch)
2021-10-03 01:51 UTC, Kenton Groombridge
Details | Diff
Explicitly link against compiler_rt libraries to avoid undefined symbol __udivdi3 (link_compiler_rt.patch,388 bytes, patch)
2021-10-03 07:08 UTC, Mike Cui
Details | Diff
libcxxabi-13.0.0.ebuild (fixed, with patch) (libcxxabi-13.0.0.ebuild,3.68 KB, text/plain)
2021-10-04 01:28 UTC, Andy
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Paolo Pedroni 2021-03-01 16:31:34 UTC
Created attachment 688917 [details]
libcxxabi-11.0.1:20210301-152740.log.gz

-- Testing: 63 tests, 12 workers --
FAIL: libc++abi :: catch_array_01.pass.cpp (1 of 63)
******************** TEST 'libc++abi :: catch_array_01.pass.cpp' FAILED ********************
Script:
--
: 'COMPILED WITH';  /usr/lib/distcc/bin/i686-pc-linux-gnu-clang /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/test/catch_array_01.pass.cpp -v -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -include /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/libcxx/__config_site -nostdinc++ -I/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxx/include -I/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/include -I/usr/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/../libcxx/test/support -Werror -Wall -Wextra -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -Wshadow -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -std=c++2a -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings  -L/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -Wl,-rpath,/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -L/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -Wl,-rpath,/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -nodefaultlibs -lc++ -lc++abi -lm -lpthread -lc -lunwind -ldl /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/lib/linux/libclang_rt.builtins-x86_64.a -o /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test/Output/catch_array_01.pass.cpp.dir/t.tmp.exe
: 'EXECUTED AS';  /usr/bin/python3.8 /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/../libcxx/utils/run.py --execdir /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test/Output/catch_array_01.pass.cpp.dir --codesign_identity "" --env  --  /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test/Output/catch_array_01.pass.cpp.dir/t.tmp.exe
--
Exit Code: 1

Command Output (stderr):
--
+ : 'COMPILED WITH'
+ /usr/lib/distcc/bin/i686-pc-linux-gnu-clang /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/test/catch_array_01.pass.cpp -v -DLIBCXXABI_NO_TIMER -D_LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -funwind-tables -include /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/libcxx/__config_site -nostdinc++ -I/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxx/include -I/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/include -I/usr/include -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -I/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/../libcxx/test/support -Werror -Wall -Wextra -D_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -Wshadow -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -std=c++2a -fcoroutines-ts -Werror=thread-safety -Wuser-defined-warnings -L/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -Wl,-rpath,/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -L/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -Wl,-rpath,/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -nodefaultlibs -lc++ -lc++abi -lm -lpthread -lc -lunwind -ldl /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/lib/linux/libclang_rt.builtins-x86_64.a -o /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test/Output/catch_array_01.pass.cpp.dir/t.tmp.exe
clang version 11.0.1
Target: i686-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/lib/llvm/11/bin
Selected GCC installation: /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0
Candidate multilib: .;@m64
Candidate multilib: 32;@m32
Selected multilib: 32;@m32
 "/usr/lib/llvm/11/bin/clang-11" -cc1 -triple i686-pc-linux-gnu -emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names -main-file-name catch_array_01.pass.cpp -mrelocation-model static -mframe-pointer=all -fmath-errno -fno-rounding-math -mconstructor-aliases -munwind-tables -target-cpu pentium4 -fno-split-dwarf-inlining -debugger-tuning=gdb -v -nostdinc++ -resource-dir /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1 -include /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/libcxx/__config_site -D LIBCXXABI_NO_TIMER -D _LIBCPP_ENABLE_CXX17_REMOVED_UNEXPECTED_FUNCTIONS -I /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxx/include -I /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/include -I /usr/include -D __STDC_FORMAT_MACROS -D __STDC_LIMIT_MACROS -D __STDC_CONSTANT_MACROS -I /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/../libcxx/test/support -D _LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER -internal-isystem /usr/local/include -internal-isystem /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/include -internal-externc-isystem /include -internal-externc-isystem /usr/include -Werror -Wall -Wextra -Wshadow -Wno-unused-command-line-argument -Wno-attributes -Wno-pessimizing-move -Wno-c++11-extensions -Wno-user-defined-literals -Wno-noexcept-type -Wno-atomic-alignment -Wsign-compare -Wunused-variable -Wunused-parameter -Wunreachable-code -Wno-unused-local-typedef -Werror=thread-safety -Wuser-defined-warnings -std=c++2a -fdeprecated-macro -fdebug-compilation-dir /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test -ferror-limit 19 -fcoroutines-ts -fgnuc-version=4.2.1 -fno-implicit-modules -fcxx-exceptions -fexceptions -o /var/tmp/portage/sys-libs/libcxxabi-11.0.1/temp/catch_array_01-735386.o -x c++ /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/test/catch_array_01.pass.cpp
clang -cc1 version 11.0.1 based upon LLVM 11.0.1libcxx default target x86_64-pc-linux-gnu
ignoring nonexistent directory "/usr/local/include"
ignoring nonexistent directory "/include"
ignoring duplicate directory "/usr/include"
  as it is a non-system directory that duplicates a system directory
#include "..." search starts here:
#include <...> search starts here:
 /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxx/include
 /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/include
 /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/../libcxx/test/support
 /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/include
 /usr/include
End of search list.
 "/usr/bin/ld.lld" --eh-frame-hdr -m elf_i386 -dynamic-linker /lib/ld-linux.so.2 -o /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test/Output/catch_array_01.pass.cpp.dir/t.tmp.exe /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../crt1.o /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../crti.o /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/lib/linux/clang_rt.crtbegin-i386.o -L/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -L/var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/32 -L/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0 -L/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../../x86_64-pc-linux-gnu/lib -L/usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../.. -L/usr/lib/llvm/11/bin/../lib -L/lib -L/usr/lib /var/tmp/portage/sys-libs/libcxxabi-11.0.1/temp/catch_array_01-735386.o -rpath /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -rpath /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/lib -lc++ -lc++abi -lm -lpthread -lc -lunwind -ldl /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/lib/linux/libclang_rt.builtins-x86_64.a /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/lib/linux/clang_rt.crtend-i386.o /usr/lib/gcc/x86_64-pc-linux-gnu/9.3.0/../../../crtn.o
ld.lld: error: /usr/lib/llvm/11/bin/../../../../lib/clang/11.0.1/lib/linux/libclang_rt.builtins-x86_64.a(udivdi3.c.o) is incompatible with elf32-i386
clang-11: error: linker command failed with exit code 1 (use -v to see invocation)
distcc[1299] ERROR: compile /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi/test/catch_array_01.pass.cpp on localhost failed
[...]
********************
Failed Tests (51):
  libc++abi :: backtrace_test.pass.cpp
  libc++abi :: catch_array_01.pass.cpp
  libc++abi :: catch_array_02.pass.cpp
  libc++abi :: catch_class_01.pass.cpp
  libc++abi :: catch_class_02.pass.cpp
  libc++abi :: catch_class_03.pass.cpp
  libc++abi :: catch_class_04.pass.cpp
  libc++abi :: catch_const_pointer_nullptr.pass.cpp
  libc++abi :: catch_function_01.pass.cpp
  libc++abi :: catch_function_02.pass.cpp
  libc++abi :: catch_in_noexcept.pass.cpp
  libc++abi :: catch_member_data_pointer_01.pass.cpp
  libc++abi :: catch_member_function_pointer_01.pass.cpp
  libc++abi :: catch_member_pointer_nullptr.pass.cpp
  libc++abi :: catch_multi_level_pointer.pass.cpp
  libc++abi :: catch_pointer_nullptr.pass.cpp
  libc++abi :: catch_pointer_reference.pass.cpp
  libc++abi :: catch_ptr.pass.cpp
  libc++abi :: catch_ptr_02.pass.cpp
  libc++abi :: catch_reference_nullptr.pass.cpp
  libc++abi :: cxa_bad_cast.pass.cpp
  libc++abi :: cxa_bad_typeid.pass.cpp
  libc++abi :: cxa_thread_atexit_test.pass.cpp
  libc++abi :: cxa_vec_new_overflow_PR41395.pass.cpp
  libc++abi :: dynamic_cast.pass.cpp
  libc++abi :: dynamic_cast14.pass.cpp
  libc++abi :: dynamic_cast3.pass.cpp
  libc++abi :: dynamic_cast5.pass.cpp
  libc++abi :: dynamic_cast_stress.pass.cpp
  libc++abi :: exception_object_alignment.2.pass.cpp
  libc++abi :: exception_object_alignment.pass.cpp
  libc++abi :: guard_test_basic.pass.cpp
  libc++abi :: guard_threaded_test.pass.cpp
  libc++abi :: incomplete_type.sh.cpp
  libc++abi :: inherited_exception.pass.cpp
  libc++abi :: test_aux_runtime.pass.cpp
  libc++abi :: test_aux_runtime_op_array_new.pass.cpp
  libc++abi :: test_demangle.pass.cpp
  libc++abi :: test_exception_address_alignment.pass.cpp
  libc++abi :: test_exception_storage.pass.cpp
  libc++abi :: test_fallback_malloc.pass.cpp
  libc++abi :: test_guard.pass.cpp
  libc++abi :: test_vector1.pass.cpp
  libc++abi :: test_vector2.pass.cpp
  libc++abi :: test_vector3.pass.cpp
  libc++abi :: thread_local_destruction_order.pass.cpp
  libc++abi :: uncaught_exception.pass.cpp
  libc++abi :: uncaught_exceptions.pass.cpp
  libc++abi :: unittest_demangle.pass.cpp
  libc++abi :: unwind_01.pass.cpp
  libc++abi :: unwind_06.pass.cpp


Testing Time: 39.68s
  Unsupported: 12
  Failed     : 51
FAILED: test/CMakeFiles/check-cxxabi 
cd /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test && /usr/bin/python3.8 /usr/bin/lit -vv -j 12 --param=cxx_under_test=/usr/lib/distcc/bin/i686-pc-linux-gnu-clang /var/tmp/portage/sys-libs/libcxxabi-11.0.1/work/libcxxabi-11.0.1_build-abi_x86_32.x86/test
ninja: build stopped: subcommand failed.
 * ERROR: sys-libs/libcxxabi-11.0.1::gentoo failed (test phase):
 *   ninja -v -j12 -l6 check-cxxabi failed

Looks to me like it's linking 32bit tests against 64bit libraries, or something like that.
Comment 1 Paolo Pedroni 2021-03-01 16:31:52 UTC
# emerge --info =sys-libs/libcxxabi-11.0.1
Portage 3.0.13 (python 3.8.7-final-0, default/linux/amd64/17.1/desktop/plasma/systemd, gcc-9.3.0, glibc-2.32-r7, 5.4.97-gentoo x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.4.97-gentoo-x86_64-AMD_Phenom-tm-_II_X6_1100T_Processor-with-glibc2.2.5
KiB Mem:    16138524 total,   5688292 free
KiB Swap:   12550140 total,   9708540 free
Timestamp of repository gentoo: Mon, 01 Mar 2021 09:15:01 +0000
Head commit of repository gentoo: 90169acaf310a7464980e089574f116b3b2ce242
sh dash 0.5.11.3-r1
ld GNU gold (Gentoo 2.35.1 p2 2.35.1) 1.16
distcc 3.3.3 x86_64-pc-linux-gnu [enabled]
ccache version 4.1 [disabled]
app-shells/bash:          5.0_p18::gentoo
dev-java/java-config:     2.3.1::gentoo
dev-lang/perl:            5.30.3::gentoo
dev-lang/python:          2.7.18-r6::gentoo, 3.8.7-r1::gentoo, 3.9.1-r1::gentoo
dev-util/ccache:          4.1::gentoo
dev-util/cmake:           3.18.5::gentoo
sys-apps/baselayout:      2.7::gentoo
sys-apps/sandbox:         2.20::gentoo
sys-devel/autoconf:       2.13-r1::gentoo, 2.69-r5::gentoo
sys-devel/automake:       1.16.2-r1::gentoo
sys-devel/binutils:       2.35.1-r1::gentoo
sys-devel/gcc:            9.3.0-r2::gentoo
sys-devel/gcc-config:     2.3.3::gentoo
sys-devel/libtool:        2.4.6-r6::gentoo
sys-devel/make:           4.3::gentoo
sys-kernel/linux-headers: 5.10::gentoo (virtual/os-headers)
sys-libs/glibc:           2.32-r7::gentoo
Repositories:

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

x-portage
    location: /usr/local/portage
    masters: gentoo
    priority: 0

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="* -@EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=6"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /usr/lib64/libreoffice/program/sofficerc /usr/share/config /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/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CXXFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=6"
DISTDIR="/usr/portage/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going y --with-bdeps y"
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 -frecord-gcc-switches -march=amdfam10 -flto=6"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs cgroup compress-build-logs config-protect-if-modified distcc distlocks ebuild-locks ipc-sandbox merge-sync multilib-strict network-sandbox news parallel-fetch pid-sandbox preserve-libs protect-owned qa-unresolved-soname-deps sandbox sfperms split-elog split-log strict test unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=6"
GENTOO_MIRRORS="http://mirrors.soeasyto.com/distfiles.gentoo.org/ http://mirrors.evowise.com/gentoo/ http://gentoo.modulix.net/gentoo/ https://mirrors.soeasyto.com/distfiles.gentoo.org/ https://mirrors.evowise.com/gentoo/"
LANG="it_IT.UTF-8"
LDFLAGS="-Wl,-O1 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -flto=6"
LINGUAS="it it_IT"
MAKEOPTS="-j12 -l6"
PKGDIR="/usr/portage/packages"
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 a52 aac aalib acl acpi activities adns alsa amd64 ao audiofile bash-completion bluetooth branding brotli bzip2 cairo caps cdda cddb cdparanoia cdr cli crypt css cups curl dbus declarative dga djvu dri dts dvd dvdr emboss encode exif expat fbcon ffmpeg fftw flac fontconfig fortran ftp gd gdbm geoip gif gimp gmp gnutls gphoto2 gpm graphviz gtk gui handbook iconv icu idn imagemagick imlib introspection ipv6 java javascript jbig jemalloc jpeg jpeg2k kde kipi kwallet lame lcms libass libglvnd libnotify libsamplerate libtirpc lm_sensors lua lzma lzo mad mmap mng mp3 mp4 mpeg mplayer multilib musicbrainz ncurses nls nptl nsplugin offensive ogg openal opengl openmp pam pango pcre pdf phonon plasma png policykit postscript ppds pulseaudio qml qt5 rdesktop readline recode samba sctp sdl seccomp sndfile sockets speex spell split-usr sqlite sqlite3 ssl startup-notification svg symlink syslog systemd sysvipc taglib telemetry test theora threads tidy tiff truetype udev udisks unicode upower usb vaapi vala vdpau verify-sig vim-syntax vnc vorbis wavpack wayland widgets win32codecs wmf wxwidgets x264 xattr xcb xine xml xpm xscreensaver xv xvid yahoo zlib zstd" ABI_X86="64" ADA_TARGET="gnat_2018" ALSA_CARDS="hda-intel virmidi" 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" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="3dnow 3dnowext mmx mmxext popcnt sse sse2 sse3 sse4a" CURL_SSL="gnutls" 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" GRUB_PLATFORMS="pc" INPUT_DEVICES="libinput" KERNEL="linux" L10N="it en" 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_8" PYTHON_TARGETS="python3_8" RUBY_TARGETS="ruby26" USERLAND="GNU" VIDEO_CARDS="radeon r600" XTABLES_ADDONS="quota2 psd pknock lscan length2 ipv4options ipset ipp2p iface geoip fuzzy condition tee tarpit sysrq steal rawnat logmark ipmark dhcpmac delude chaos account"
Unset:  CC, CPPFLAGS, CTARGET, CXX, INSTALL_MASK, LC_ALL, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS

=================================================================
                        Package Settings
=================================================================

sys-libs/libcxxabi-11.0.1::gentoo was built with the following:
USE="libunwind -static-libs -test" ABI_X86="32 (64) (-x32)"
CFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=thin"
CXXFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=thin"
FEATURES="xattr usersync protect-owned multilib-strict distlocks sandbox config-protect-if-modified unmerge-logs assume-digests unmerge-orphans parallel-fetch binpkg-dostrip preserve-libs distcc binpkg-logs userfetch cgroup merge-sync split-elog unknown-features-warn ipc-sandbox compress-build-logs pid-sandbox sfperms usersandbox ebuild-locks split-log news qa-unresolved-soname-deps binpkg-docompress strict userpriv network-sandbox"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -fuse-ld=lld -flto=thin"

# emerge -1pqv =sys-libs/libcxxabi-11.0.1
[ebuild   R   ] sys-libs/libcxxabi-11.0.1  USE="libunwind test* -static-libs" ABI_X86="32 (64) (-x32)"
Comment 2 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-03-01 23:02:46 UTC
That's really weird.  It gets the correct arch for crt stuff but not for builtins.  Anything really special about your system that could be relevant?
Comment 3 Paolo Pedroni 2021-03-02 09:48:11 UTC
(In reply to Michał Górny from comment #2)
> Anything really special about your system that could be relevant?

What do you mean by "special", besides being a 10-year old Phenom II PC with 16GB RAM?

The only "special" thing I can think of is that the LLVM toolchain is built with clang as the compiler:

$ cat /etc/portage/package.env/compiler-clang-flto 
app-emulation/virtualbox-modules                        compiler-clang-flto.conf
dev-lang/rust                                           compiler-clang-flto.conf
media-libs/mesa                                         compiler-clang-flto.conf
sys-devel/clang                                         compiler-clang-flto.conf
sys-devel/clang-common                                  compiler-clang-flto.conf
sys-devel/clang-runtime                                 compiler-clang-flto.conf
sys-devel/lld                                           compiler-clang-flto.conf
sys-devel/llvm                                          compiler-clang-flto.conf
sys-devel/llvm-common                                   compiler-clang-flto.conf
sys-devel/llvmgold                                      compiler-clang-flto.conf
sys-libs/compiler-rt                                    compiler-clang-flto.conf
sys-libs/libcxx                                         compiler-clang-flto.conf
sys-libs/libcxxabi                                      compiler-clang-flto.conf
sys-libs/libomp                                         compiler-clang-flto.conf
sys-libs/llvm-libunwind                                 compiler-clang-flto.conf

$ cat /etc/portage/env/compiler-clang-flto.conf 
CC="clang"                            
CXX="clang++"                         
LD="ld.lld"
CFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=thin"              
CXXFLAGS="-O2 -pipe -frecord-gcc-switches -march=amdfam10 -flto=thin"
LDFLAGS="-Wl,-O2 -Wl,--as-needed -Wl,--hash-style=gnu -Wl,--sort-common -fuse-ld=lld -flto=thin"
AR="llvm-ar"
NM="llvm-nm"
STRIP="llvm-strip"
RANLIB="llvm-ranlib"
OBJCOPY="llvm-objcopy"
OBJDUMP="llvm-objdump"
OBJSIZE="llvm-size"
READELF="llvm-readelf"
Comment 4 Kenton Groombridge gentoo-dev 2021-10-02 23:49:05 UTC
It seems that with a clang/llvm toolchain this error occurs at compile time with libcxxabi 13.
Comment 5 Kenton Groombridge gentoo-dev 2021-10-02 23:50:54 UTC
Created attachment 742557 [details]
libcxxabi-13-clang-toolchain-build-log
Comment 6 Kenton Groombridge gentoo-dev 2021-10-03 01:49:54 UTC
The following ebuild and patch fixed the compile issue for me, but the changes I made are likely not the optimal solution.

It seems that when configuring libcxxabi, the option `LIBCXXABI_BUILD_32_BITS` is expected to be passed, which (among other things) tells the macro `find_compiler_rt_library` to locate the correct builtins library. It seems that during the configure state, `-m32` is never passed and so the 64-bit version of this library will always be found.

I also found that this same problem happens with `libcxx`, but that library does not utilize any symbols provided by the builtins and so there is no noticeable failure.
Comment 7 Kenton Groombridge gentoo-dev 2021-10-03 01:50:40 UTC
Created attachment 742560 [details]
libcxxabi-13.0.0.ebuild (fixed)
Comment 8 Kenton Groombridge gentoo-dev 2021-10-03 01:51:15 UTC
Created attachment 742563 [details, diff]
libcxxabi-32-bit-build.patch
Comment 9 unhappy-ending 2021-10-03 06:29:56 UTC
(In reply to 0xC0ncord from comment #8)
> Created attachment 742563 [details, diff] [details, diff]
> libcxxabi-32-bit-build.patch

I can confirm this problem now happens during the compile phase rather than the test phase as well. The posted patch and ebuild resolves the issue.
Comment 10 Mike Cui 2021-10-03 07:08:17 UTC
Created attachment 742611 [details, diff]
Explicitly link against compiler_rt libraries to avoid undefined symbol __udivdi3
Comment 11 Mike Cui 2021-10-03 07:09:52 UTC
This is happening for me on 12.0.1, I root caused the problem to be that compiler_rt is not being picked in when linking libcxxabi.so
Comment 12 Andy 2021-10-04 01:28:56 UTC
Created attachment 742857 [details]
libcxxabi-13.0.0.ebuild (fixed, with patch)
Comment 13 Andy 2021-10-04 01:30:12 UTC
(In reply to Andy from comment #12)
> Created attachment 742857 [details]
> libcxxabi-13.0.0.ebuild (fixed, with patch)

I was wondering why it didn´t work for me until I found out the patch was never pulled by the ebuild. For everyone facing the same issue, the ebuild with the patch linked as attached. Path libcxxabi-32-bit-build.patch to be stored in files subdir
Comment 14 Michael 2021-11-05 23:45:07 UTC
I just hit this with llvm-13, interestingly I can build both sys-libs/libcxxabi and sys-libs/libcxx with gcc, but not with clang.
Comment 15 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-11-07 05:26:15 UTC
*** Bug 822213 has been marked as a duplicate of this bug. ***
Comment 16 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-11-30 15:58:45 UTC
*** Bug 824242 has been marked as a duplicate of this bug. ***
Comment 17 Larry the Git Cow gentoo-dev 2021-11-30 16:44:19 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d3942aa181bfee35afdd8ef1d9fe199e3239fdd9

commit d3942aa181bfee35afdd8ef1d9fe199e3239fdd9
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2021-11-30 16:02:27 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2021-11-30 16:44:15 +0000

    sys-libs/libcxxabi: Fix testing on non-native ABI
    
    Closes: https://bugs.gentoo.org/773604
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 sys-libs/libcxxabi/libcxxabi-13.0.0.ebuild      | 1 +
 sys-libs/libcxxabi/libcxxabi-13.0.1.9999.ebuild | 1 +
 sys-libs/libcxxabi/libcxxabi-13.0.1_rc1.ebuild  | 1 +
 sys-libs/libcxxabi/libcxxabi-14.0.0.9999.ebuild | 1 +
 4 files changed, 4 insertions(+)
Comment 18 Michael 2021-11-30 17:25:46 UTC
Still failing to build:

ld.lld: error: /usr/lib/llvm/13/bin/../../../../lib/clang/13.0.0/lib/linux/libclang_rt.builtins-x86_64.a(udivdi3.c.o) is incompatible with elf32-i386
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)
ninja: build stopped: subcommand failed.
 * ERROR: sys-libs/libcxxabi-13.0.0::gentoo failed (compile phase):

package.env:

CC="clang"
CXX="clang++"
LDFLAGS="-fuse-ld=lld -unwindlib=libunwind -rtlib=compiler-rt"
Comment 19 Paul Mulders 2021-12-01 15:10:31 UTC
I'm also hitting this with test disabled, like Michael (presumably). I think the cmake parameter might need to be pulled outside of the if test conditional.
Comment 20 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-12-01 15:22:39 UTC
(In reply to Paul Mulders from comment #19)
> I'm also hitting this with test disabled, like Michael (presumably). I think
> the cmake parameter might need to be pulled outside of the if test
> conditional.

Could you try that for me and let me know if it works?
Comment 21 Paolo Pedroni 2021-12-01 15:30:45 UTC
Works for me "as-is"
Comment 22 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2021-12-01 15:32:53 UTC
I think we might be dealing with two different bugs here.  The one I addresses is test failure, as posted in #c0.  I suspect your failure stems from using lld; please file a separate bug for that and attach the build log (and ideally, try building with GNU ld on the same system for comparison).
Comment 23 Paul Mulders 2021-12-01 15:37:18 UTC
(In reply to Sam James from comment #20)
> (In reply to Paul Mulders from comment #19)
> > I'm also hitting this with test disabled, like Michael (presumably). I think
> > the cmake parameter might need to be pulled outside of the if test
> > conditional.
> 
> Could you try that for me and let me know if it works?

I did the opposite instead and enabled test, then the build (and test phase) worked fine (with clang compiler and lld linker).

Does that help?
Comment 24 Kenton Groombridge gentoo-dev 2021-12-01 16:13:31 UTC
(In reply to Michał Górny from comment #22)
> I think we might be dealing with two different bugs here.  The one I
> addresses is test failure, as posted in #c0.  I suspect your failure stems
> from using lld; please file a separate bug for that and attach the build log
> (and ideally, try building with GNU ld on the same system for comparison).

I've opened https://bugs.gentoo.org/show_bug.cgi?id=827943 with the requested logs for this issue.