Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 892527 - sys-libs/compiler-rt-sanitizers-15.0.7 fails to build broken compiler
Summary: sys-libs/compiler-rt-sanitizers-15.0.7 fails to build broken compiler
Status: UNCONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal with 1 vote (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-29 20:18 UTC by Mamadou Babaei
Modified: 2023-05-23 19:58 UTC (History)
1 user (show)

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


Attachments
build log (build.log,5.74 KB, text/x-log)
2023-01-29 20:18 UTC, Mamadou Babaei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mamadou Babaei 2023-01-29 20:18:51 UTC
Created attachment 849417 [details]
build log

$ emerge --info '=sys-libs/compiler-rt-sanitizers-15.0.7::gentoo'

Portage 3.0.44 (python 3.10.9-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.36-r7, 5.15.89 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.89-x86_64-11th_Gen_Intel-R-_Core-TM-_i7-11800H_@_2.30GHz-with-glibc2.36
KiB Mem:    65703156 total,  28490960 free
KiB Swap:   33554428 total,  33554428 free
Head commit of repository librewolf: 6ec2449f602c07007e6aa4ef666a3b9070e35dd8

Timestamp of repository gentoo: Sun, 29 Jan 2023 20:02:03 +0000
Head commit of repository gentoo: b18302ca1f7f7038017741d28e0b8563f6972172

sh bash 5.2_p15-r1
ld GNU ld (Gentoo 2.39 p5) 2.39.0
ccache version 4.7.4 [disabled]
app-misc/pax-utils:        1.3.7::gentoo
app-shells/bash:           5.2_p15-r1::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r2::gentoo
dev-lang/python:           3.10.9-r1::gentoo, 3.11.1-r1::gentoo
dev-lang/rust:             1.67.0::gentoo
dev-util/ccache:           4.7.4::gentoo
dev-util/cmake:            3.25.2::gentoo
dev-util/meson:            1.0.0::gentoo
sys-apps/baselayout:       2.13-r1::gentoo
sys-apps/openrc:           0.46::gentoo
sys-apps/sandbox:          2.30-r1::gentoo
sys-devel/autoconf:        2.13-r7::gentoo, 2.71-r5::gentoo
sys-devel/automake:        1.16.5::gentoo
sys-devel/binutils:        2.39-r4::gentoo, 2.40::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           14.0.6-r1::gentoo, 15.0.7-r1::gentoo
sys-devel/gcc:             12.2.1_p20230121-r1::gentoo
sys-devel/gcc-config:      2.10::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             15.0.7::gentoo
sys-devel/llvm:            14.0.6-r2::gentoo, 15.0.7::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.1::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r7::gentoo
Repositories:

librewolf
    location: /var/db/repos/librewolf
    sync-type: git
    sync-uri: https://gitlab.com/librewolf-community/browser/gentoo.git
    masters: gentoo
    volatile: True

gentoo
    location: /var/db/repos/gentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo.git
    priority: 10
    volatile: True
    sync-git-verify-commit-signature: true

NuLL3rr0r
    location: /var/db/repos/local
    masters: gentoo
    priority: 50
    volatile: True

torbrowser
    location: /var/lib/layman/torbrowser
    masters: gentoo
    priority: 50
    volatile: True

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="*"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /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="-march=native -O2 -pipe"
DISTDIR="/var/cache/portage/distfiles"
EMERGE_DEFAULT_OPTS="--jobs=16 --load-average=16 --keep-going --with-bdeps=y"
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="-march=native -O2 -pipe"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live 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="-march=native -O2 -pipe"
GENTOO_MIRRORS="http://distfiles.gentoo.org"
LANG="en_US.utf8"
LDFLAGS="-Wl,-O1 -Wl,--sort-common -Wl,--as-needed"
LEX="flex"
LINGUAS="en_US en fa_IR fa nl_NL nl"
MAKEOPTS="-j17 -l16"
PKGDIR="/var/cache/portage/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"
SHELL="/bin/zsh"
USE="X a52 aac acl acpi alsa amd64 bluetooth branding bzip2 cairo cdda cdr cli crypt cups dbus dri dts dvd dvdr elogind encode exif flac fortran gdbm gif gpm gtk gui iconv icu ipv6 jpeg lcms libglvnd libnotify libtirpc lm-sensors mad mng mp3 mp4 mpeg multilib ncurses nls nptl ogg opengl openmp pam pango pcre pdf png policykit ppds pulseaudio qt5 readline sdl seccomp sound spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis vulkan wxwidgets x264 xattr xcb xft xml xv xvid zlib" ABI_X86="64" ADA_TARGET="gnat_2021" ALSA_CARDS="hda-intel" 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="aes avx avx2 avx512f avx512dq avx512cd avx512bw avx512vl avx512vbmi f16c fma3 mmx mmxext pclmul popcnt rdrand sha sse sse2 sse3 sse4_1 sse4_2 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="joystick keyboard libinput mouse" KERNEL="linux" L10N="en-US en fa-IR fa nl-NL nl" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LLVM_TARGETS="BPF NVPTX X86" LUA_SINGLE_TARGET="lua5-1" LUA_TARGETS="lua5-1" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php7-4 php8-0" POSTGRES_TARGETS="postgres14" PYTHON_SINGLE_TARGET="python3_10" PYTHON_TARGETS="python3_10" QEMU_SOFTMMU_TARGETS="arm aarch64 x86_64" QEMU_USER_TARGETS="x86_64" RUBY_TARGETS="ruby27 ruby30" USERLAND="GNU" VIDEO_CARDS="nvidia 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:  ADDR2LINE, AR, ARFLAGS, AS, ASFLAGS, CC, CCLD, CONFIG_SHELL, CPP, CPPFLAGS, CTARGET, CXX, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LD, LFLAGS, LIBTOOL, MAKE, MAKEFLAGS, NM, OBJCOPY, OBJDUMP, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RANLIB, READELF, RUSTFLAGS, SIZE, STRINGS, STRIP, YACC, YFLAGS
Comment 1 Mamadou Babaei 2023-01-29 20:19:40 UTC
$ emerge -pqv '=sys-libs/compiler-rt-sanitizers-15.0.7::gentoo'
[ebuild  NS   ] sys-libs/compiler-rt-sanitizers-15.0.7 [14.0.6, 15.0.5] USE="asan cfi clang dfsan gwp-asan hwasan libfuzzer lsan memprof msan orc profile safestack scudo tsan ubsan xray -debug (-shadowcallstack) -test -verify-sig" ABI_X86="32 (64)"
Comment 2 Mamadou Babaei 2023-01-29 22:42:34 UTC
I tried to unmerge everything clang/llvm related and remerge again it seems it's not able to prioritize the dependencies and fails. Now, even libcxx and libcxxabi merge:

 * Package:    sys-libs/libcxxabi-15.0.7:0
 * Repository: gentoo
 * Maintainer: llvm@gentoo.org
 * USE:        abi_x86_32 abi_x86_64 amd64 clang elibc_glibc kernel_linux userland_GNU
 * FEATURES:   ccache network-sandbox preserve-libs sandbox userpriv usersandbox
 * Checking whether python3_11 is suitable ...
 *   >=dev-lang/python-3.11.1:3.11 ...
 [ ok ]
 *   python_check_deps ...
 [ ok ]
 * Using python3.11 to build (via PYTHON_COMPAT iteration)
>>> Unpacking source...
 * Unpacking from llvm-project-15.0.7.src.tar.xz ...
 [ ok ]
>>> Source unpacked in /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work
>>> Preparing source in /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes ...
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build"
>>> Source prepared.
>>> Configuring source in /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes ...
 * abi_x86_32.x86: running multilib-minimal_abi_src_configure
 * Source directory (CMAKE_USE_DIR): "/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes"
 * Build directory  (BUILD_DIR):     "/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86"
cmake -C /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86/gentoo_common_config.cmake -G Ninja -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_CXX_COMPILER_TARGET=i686-pc-linux-gnu -DPython3_EXECUTABLE=/usr/bin/python3.11 -DLLVM_ENABLE_RUNTIMES=libcxxabi;libcxx -DLLVM_INCLUDE_TESTS=OFF -DLLVM_LIBDIR_SUFFIX= -DLIBCXXABI_ENABLE_SHARED=ON -DLIBCXXABI_ENABLE_STATIC=no -DLIBCXXABI_INCLUDE_TESTS=no -DLIBCXXABI_USE_COMPILER_RT=ON -DLIBCXXABI_LIBUNWIND_INCLUDES=/usr/include -DLIBCXX_LIBDIR_SUFFIX= -DLIBCXX_ENABLE_SHARED=ON -DLIBCXX_ENABLE_STATIC=OFF -DLIBCXX_CXX_ABI=libcxxabi -DLIBCXX_ENABLE_ABI_LINKER_SCRIPT=OFF -DLIBCXX_HAS_MUSL_LIBC=no -DLIBCXX_HAS_GCC_S_LIB=OFF -DLIBCXX_INCLUDE_BENCHMARKS=OFF -DLIBCXX_INCLUDE_TESTS=OFF -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_TOOLCHAIN_FILE=/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86/gentoo_toolchain.cmake /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes
loading initial cache file /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86/gentoo_common_config.cmake
-- The C compiler identification is Clang 15.0.7
-- The CXX compiler identification is Clang 15.0.7
-- The ASM compiler identification is Clang with GNU-like command-line
-- Found assembler: /usr/lib/ccache/bin/i686-pc-linux-gnu-clang
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-clang - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - failed
-- Check for working CXX compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-clang++
-- Check for working CXX compiler: /usr/lib/ccache/bin/i686-pc-linux-gnu-clang++ - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCXXCompiler.cmake:63 (message):
  The C++ compiler

    "/usr/lib/ccache/bin/i686-pc-linux-gnu-clang++"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86/CMakeFiles/CMakeScratch/TryCompile-OD0gAs
    
    Run Build Command(s):/usr/bin/ninja cmTC_ab90a && [1/2] Building CXX object CMakeFiles/cmTC_ab90a.dir/testCXXCompiler.cxx.o
    [2/2] Linking CXX executable cmTC_ab90a
    FAILED: cmTC_ab90a 
    : && /usr/lib/ccache/bin/i686-pc-linux-gnu-clang++ --target=i686-pc-linux-gnu -march=native -O2 -pipe -Wl,-O1 -Wl,--sort-common -Wl,--as-needed CMakeFiles/cmTC_ab90a.dir/testCXXCompiler.cxx.o -o cmTC_ab90a   && :
    ld.lld: error: unable to find library -lc++
    clang-15: error: linker command failed with exit code 1 (use -v to see invocation)
    ninja: build stopped: subcommand failed.
    
    

  

  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:3 (project)


-- Configuring incomplete, errors occurred!
See also "/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86/CMakeFiles/CMakeOutput.log".
See also "/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86/CMakeFiles/CMakeError.log".
 * ERROR: sys-libs/libcxxabi-15.0.7::gentoo failed (configure phase):
 *   cmake failed
 * 
 * Call stack:
 *     ebuild.sh, line  136:  Called src_configure
 *   environment, line 3779:  Called cmake-multilib_src_configure
 *   environment, line 1248:  Called multilib-minimal_src_configure
 *   environment, line 2711:  Called multilib_foreach_abi 'multilib-minimal_abi_src_configure'
 *   environment, line 2961:  Called multibuild_foreach_variant '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 2666:  Called _multibuild_run '_multilib_multibuild_wrapper' 'multilib-minimal_abi_src_configure'
 *   environment, line 2664:  Called _multilib_multibuild_wrapper 'multilib-minimal_abi_src_configure'
 *   environment, line  520:  Called multilib-minimal_abi_src_configure
 *   environment, line 2705:  Called multilib_src_configure
 *   environment, line 3197:  Called cmake_src_configure
 *   environment, line 1509:  Called die
 * The specific snippet of code:
 *       "${CMAKE_BINARY}" "${cmakeargs[@]}" "${CMAKE_USE_DIR}" || die "cmake failed";
 * 
 * If you need support, post the output of `emerge --info '=sys-libs/libcxxabi-15.0.7::gentoo'`,
 * the complete build log and the output of `emerge -pqv '=sys-libs/libcxxabi-15.0.7::gentoo'`.
 * The complete build log is located at '/var/tmp/portage/sys-libs/libcxxabi-15.0.7/temp/build.log'.
 * The ebuild environment file is located at '/var/tmp/portage/sys-libs/libcxxabi-15.0.7/temp/environment'.
 * Working directory: '/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes_build-abi_x86_32.x86'
 * S: '/var/tmp/portage/sys-libs/libcxxabi-15.0.7/work/runtimes'
Comment 3 Mamadou Babaei 2023-01-29 22:48:39 UTC
I did:

USE="-clang" emerge -1 sys-libs/libcxxabi libcxx

And, now this succeeds:

emerge -1atuv sys-libs/compiler-rt-sanitizers

Now, I'm moving to build the rest.
Comment 4 Oleg 2023-05-23 19:58:54 UTC
I get something like this but instead got error:

```
/usr/lib/llvm/15/bin/x86_64-pc-linux-gnu-clang++ -DHAVE_RPC_XDR_H=0 -I/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.7/work/compiler-rt/lib/sanitizer_common/..  -DNDEBUG -O2 -march=native -pipe -fomit-frame-pointer -Wall -std=c++14 -Wno-unused-parameter -m32 -fPIC -fno-builtin -fno-exceptions -fomit-frame-pointer -funwind-tables -fno-stack-protector -fno-sanitize=safe-stack -fvisibility=hidden -fno-lto -Wthread-safety -Wthread-safety-reference -Wthread-safety-beta -O3 -gline-tables-only -Wno-gnu -Wno-variadic-macros -Wno-c99-extensions -nostdinc++ -Wno-format -fno-rtti -Wframe-larger-than=570 -Wglobal-constructors -MD -MT lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_linux.cpp.o -MF lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_linux.cpp.o.d -o lib/sanitizer_common/CMakeFiles/RTSanitizerCommon.i386.dir/sanitizer_platform_limits_linux.cpp.o -c /tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.7/work/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp
/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.7/work/compiler-rt/lib/sanitizer_common/sanitizer_platform_limits_linux.cpp:25:10: fatal error: 'stddef.h' file not found
#include <stddef.h>
```