Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 883225 - sys-libs/compiler-rt-sanitizers fails to build due to wrong order of upgrades (needs dependency adjustments?)
Summary: sys-libs/compiler-rt-sanitizers fails to build due to wrong order of upgrades...
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: 2022-11-27 00:58 UTC by Mamadou Babaei
Modified: 2024-01-31 00:09 UTC (History)
4 users (show)

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


Attachments
build.log (build.log,5.74 KB, text/x-log)
2022-11-27 00:58 UTC, Mamadou Babaei
Details
new build.log (build.log.tar.gz,47.41 KB, application/gzip)
2022-11-28 13:08 UTC, Mamadou Babaei
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Mamadou Babaei 2022-11-27 00:58:22 UTC
Created attachment 837337 [details]
build.log

$ emerge --info '=sys-libs/compiler-rt-sanitizers-15.0.5::gentoo'
Portage 3.0.39 (python 3.10.8-final-0, default/linux/amd64/17.1/desktop, gcc-12, glibc-2.36-r5, 5.15.77 x86_64)
=================================================================
                         System Settings
=================================================================
System uname: Linux-5.15.77-x86_64-11th_Gen_Intel-R-_Core-TM-_i7-11800H_@_2.30GHz-with-glibc2.36
KiB Mem:    32726500 total,  14891060 free
KiB Swap:   33554428 total,  33089276 free
Head commit of repository librewolf: 6570b5b758a769d9f25616f86009810652b3a93d

Timestamp of repository gentoo: Sun, 27 Nov 2022 00:46:51 +0000
Head commit of repository gentoo: 74f95517abe0c7d55017d1fb236de632231d31ba

sh bash 5.2_p12
ld GNU ld (Gentoo 2.39 p5) 2.39.0
ccache version 4.7.4 [disabled]
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.2_p12::gentoo
dev-java/java-config:      2.3.1::gentoo
dev-lang/perl:             5.36.0-r1::gentoo
dev-lang/python:           3.10.8_p3::gentoo, 3.11.0_p2::gentoo
dev-lang/rust:             1.65.0::gentoo
dev-util/ccache:           4.7.4::gentoo
dev-util/cmake:            3.25.0::gentoo
dev-util/meson:            0.64.1::gentoo
sys-apps/baselayout:       2.9::gentoo
sys-apps/openrc:           0.45.2-r1::gentoo
sys-apps/sandbox:          2.29::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
sys-devel/binutils-config: 5.4.1::gentoo
sys-devel/clang:           13.0.1::gentoo, 14.0.6-r1::gentoo, 15.0.5::gentoo
sys-devel/gcc:             12.2.1_p20221008::gentoo
sys-devel/gcc-config:      2.8::gentoo
sys-devel/libtool:         2.4.7::gentoo
sys-devel/lld:             14.0.6-r1::gentoo, 15.0.5::gentoo
sys-devel/llvm:            13.0.1::gentoo, 14.0.6-r2::gentoo, 15.0.5::gentoo
sys-devel/make:            4.4::gentoo
sys-kernel/linux-headers:  6.0::gentoo (virtual/os-headers)
sys-libs/glibc:            2.36-r5::gentoo
Repositories:

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

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

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

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 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"
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 spell split-usr ssl startup-notification svg test-rust tiff truetype udev udisks unicode upower usb vaapi vdpau vorbis vulkan wxwidgets x264 xattr xcb 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" RUBY_TARGETS="ruby27" 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, LEX, 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


$ emerge -pqv '=sys-libs/compiler-rt-sanitizers-15.0.5::gentoo'
[ebuild  NS   ] sys-libs/compiler-rt-sanitizers-15.0.5 [13.0.1, 14.0.6, 15.0.3] 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 1 Arfrever Frehtes Taifersar Arahesis 2022-11-27 02:38:39 UTC
Is sys-libs/compiler-rt-15.0.5 installed?
Comment 2 Mamadou Babaei 2022-11-28 12:56:18 UTC
$ emerge -s sys-libs/compiler-rt                                                                                   
[ Results for search key : sys-libs/compiler-rt ]
Searching...

*  sys-libs/compiler-rt
      Latest version available: 15.0.5
      Latest version installed: 15.0.2
      Size of files: 108,347 KiB
      Homepage:      https://llvm.org/
      Description:   Compiler runtime library for clang (built-in part)
      License:       Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )

*  sys-libs/compiler-rt-sanitizers
      Latest version available: 15.0.5
      Latest version installed: 15.0.2
      Size of files: 108,347 KiB
      Homepage:      https://llvm.org/
      Description:   Compiler runtime libraries for clang (sanitizers & xray)
      License:       Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )

[ Applications found : 2 ]
Comment 3 Mamadou Babaei 2022-11-28 13:01:49 UTC
It's weird, when I do the world update, it pulls in compiler-rt but never builds it before compiler-rt-sanitizers.



Calculating dependencies... done!
>>> Verifying ebuild manifests
>>> Running pre-merge checks for sys-libs/compiler-rt-sanitizers-15.0.5
>>> Running pre-merge checks for sys-libs/compiler-rt-15.0.5
>>> Running pre-merge checks for dev-qt/qtwebengine-5.15.5_p20220618
 * Checking for at least 18 GiB RAM ...                           [ ok ]
 * Checking for at least 7 GiB disk space at "/var/tmp/portage/dev-qt/qtwebengine-5.15.5_p20220618/temp" ...                               [ ok ]
 * Checking for at least 150 MiB disk space at "/usr" ...         [ ok ]
>>> Running pre-merge checks for app-emulation/wine-vanilla-7.22
>>> Running pre-merge checks for www-client/firefox-107.0
 * Checking for at least 13500 MiB disk space at "/var/tmp/portage/www-client/firefox-107.0/temp" ...                                      [ ok ]
>>> Emerging (1 of 31) sys-libs/compiler-rt-sanitizers-15.0.5::gentoo
>>> Emerging (2 of 31) media-video/mpv-0.35.0::gentoo
>>> Emerging (3 of 31) dev-qt/qtwebengine-5.15.5_p20220618::gentoo
>>> Emerging (4 of 31) media-plugins/gst-plugins-meta-1.20.4::gentoo
>>> Emerging (5 of 31) media-libs/mlt-7.12.0::gentoo
>>> Emerging (6 of 31) media-plugins/gst-plugins-libav-1.20.4::gentoo
>>> Emerging (7 of 31) media-video/obs-studio-28.1.2-r1::gentoo
>>> Installing (4 of 31) media-plugins/gst-plugins-meta-1.20.4::gentoo
>>> Emerging (8 of 31) app-emulation/wine-vanilla-7.22::gentoo
>>> Failed to emerge sys-libs/compiler-rt-sanitizers-15.0.5, Log file:
>>>  '/var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/temp/build.log'
>>> Installing (6 of 31) media-plugins/gst-plugins-libav-1.20.4::gentoo
>>> Installing (5 of 31) media-libs/mlt-7.12.0::gentoo
>>> Installing (2 of 31) media-video/mpv-0.35.0::gentoo
>>> Installing (7 of 31) media-video/obs-studio-28.1.2-r1::gentoo
>>> Installing (8 of 31) app-emulation/wine-vanilla-7.22::gentoo
>>> Jobs: 6 of 31 complete, 1 running, 1 failedLoad avg: 8.12, 8.30, 8.47
Comment 4 Mamadou Babaei 2022-11-28 13:02:13 UTC
I try to emerge the latest version manually and report back.
Comment 5 Mamadou Babaei 2022-11-28 13:08:03 UTC
Created attachment 837965 [details]
new build.log

The broken compiler error is gone, but now I'm getting other build errors.
Comment 6 Arfrever Frehtes Taifersar Arahesis 2022-11-28 19:10:00 UTC
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
In file included from /usr/include/c++/v1/string:535:
/usr/include/c++/v1/string_view:205:10: error: '__string' file not found, did you mean 'string'?
#include <__string>
         ^
/usr/include/c++/v1/string_view:320:38: error: no member named '__char_traits_length_checked' in namespace 'std'
        : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
                              ~~~~~~~^
/usr/include/c++/v1/string_view:320:67: error: '_Traits' does not refer to a value
        : __data(__s), __size(_VSTD::__char_traits_length_checked<_Traits>(__s)) {}
                                                                  ^
/usr/include/c++/v1/string_view:238:30: note: declared here
template<class _CharT, class _Traits>
                             ^
/usr/include/c++/v1/string_view:267:45: error: incomplete type 'std::char_traits<char>' named in nested name specifier
    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                                            ^~~~~~~~~~~~~
/usr/include/c++/v1/string_view:918:29: note: in instantiation of template class 'std::basic_string_view<char>' requested here
    basic_string_view<char> operator "" sv(const char *__str, size_t __len) _NOEXCEPT
                            ^
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
In file included from /usr/include/c++/v1/string:535:
/usr/include/c++/v1/string_view:267:45: error: incomplete type 'std::char_traits<wchar_t>' named in nested name specifier
    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                                            ^~~~~~~~~~~~~
/usr/include/c++/v1/string_view:925:32: note: in instantiation of template class 'std::basic_string_view<wchar_t>' requested here
    basic_string_view<wchar_t> operator "" sv(const wchar_t *__str, size_t __len) _NOEXCEPT
                               ^
/usr/include/c++/v1/iosfwd:117:19: note: forward declaration of 'std::char_traits<wchar_t>'
template<> struct char_traits<wchar_t>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
In file included from /usr/include/c++/v1/string:535:
/usr/include/c++/v1/string_view:267:45: error: incomplete type 'std::char_traits<char16_t>' named in nested name specifier
    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                                            ^~~~~~~~~~~~~
/usr/include/c++/v1/string_view:940:33: note: in instantiation of template class 'std::basic_string_view<char16_t>' requested here
    basic_string_view<char16_t> operator "" sv(const char16_t *__str, size_t __len) _NOEXCEPT
                                ^
/usr/include/c++/v1/iosfwd:114:19: note: forward declaration of 'std::char_traits<char16_t>'
template<> struct char_traits<char16_t>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
In file included from /usr/include/c++/v1/string:535:
/usr/include/c++/v1/string_view:267:45: error: incomplete type 'std::char_traits<char32_t>' named in nested name specifier
    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                                            ^~~~~~~~~~~~~
/usr/include/c++/v1/string_view:946:33: note: in instantiation of template class 'std::basic_string_view<char32_t>' requested here
    basic_string_view<char32_t> operator "" sv(const char32_t *__str, size_t __len) _NOEXCEPT
                                ^
/usr/include/c++/v1/iosfwd:115:19: note: forward declaration of 'std::char_traits<char32_t>'
template<> struct char_traits<char32_t>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
/usr/include/c++/v1/string:1744:44: error: unknown type name '_LIBCPP_EXTERN_TEMPLATE'
    _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE, char)
                                           ^
/usr/include/c++/v1/string:1746:9: error: expected function body after function declarator
        _LIBCPP_STRING_V1_EXTERN_TEMPLATE_LIST(_LIBCPP_EXTERN_TEMPLATE, wchar_t)
        ^
/usr/include/c++/v1/string:4004:16: error: incomplete type 'std::char_traits<char>' named in nested name specifier
        return char_traits<char>::compare(__lp, __rp, __lhs_sz) == 0;
               ^~~~~~~~~~~~~~~~~~~
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
/usr/include/c++/v1/string:691:46: error: incomplete type 'std::char_traits<char>' named in nested name specifier
    static_assert(( is_same<_CharT, typename traits_type::char_type>::value),
                                             ^~~~~~~~~~~~~
/usr/include/c++/v1/string:4473:24: note: in instantiation of template class 'std::basic_string<char>' requested here
    basic_string<char> operator "" s( const char *__str, size_t __len )
                       ^
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
/usr/include/c++/v1/string:691:46: error: incomplete type 'std::char_traits<wchar_t>' named in nested name specifier
    static_assert(( is_same<_CharT, typename traits_type::char_type>::value),
                                             ^~~~~~~~~~~~~
/usr/include/c++/v1/string:4480:27: note: in instantiation of template class 'std::basic_string<wchar_t>' requested here
    basic_string<wchar_t> operator "" s( const wchar_t *__str, size_t __len )
                          ^
/usr/include/c++/v1/iosfwd:117:19: note: forward declaration of 'std::char_traits<wchar_t>'
template<> struct char_traits<wchar_t>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
/usr/include/c++/v1/string:691:46: error: incomplete type 'std::char_traits<char16_t>' named in nested name specifier
    static_assert(( is_same<_CharT, typename traits_type::char_type>::value),
                                             ^~~~~~~~~~~~~
/usr/include/c++/v1/string:4495:28: note: in instantiation of template class 'std::basic_string<char16_t>' requested here
    basic_string<char16_t> operator "" s( const char16_t *__str, size_t __len )
                           ^
/usr/include/c++/v1/iosfwd:114:19: note: forward declaration of 'std::char_traits<char16_t>'
template<> struct char_traits<char16_t>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:11:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDefs.h:20:
/usr/include/c++/v1/string:691:46: error: incomplete type 'std::char_traits<char32_t>' named in nested name specifier
    static_assert(( is_same<_CharT, typename traits_type::char_type>::value),
                                             ^~~~~~~~~~~~~
/usr/include/c++/v1/string:4501:28: note: in instantiation of template class 'std::basic_string<char32_t>' requested here
    basic_string<char32_t> operator "" s( const char32_t *__str, size_t __len )
                           ^
/usr/include/c++/v1/iosfwd:115:19: note: forward declaration of 'std::char_traits<char32_t>'
template<> struct char_traits<char32_t>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:12:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerMutate.h:15:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDictionary.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerUtil.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCommand.h:19:
In file included from /usr/include/c++/v1/sstream:184:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:141:
In file included from /usr/include/c++/v1/locale:204:
/usr/include/c++/v1/streambuf:132:22: error: incomplete type 'std::char_traits<char>' named in nested name specifier
    typedef typename traits_type::int_type int_type;
                     ^~~~~~~~~~~~~
/usr/include/c++/v1/streambuf:490:64: note: in instantiation of template class 'std::basic_streambuf<char>' requested here
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<char>)
                                                               ^
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:12:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerMutate.h:15:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDictionary.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerUtil.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCommand.h:19:
In file included from /usr/include/c++/v1/sstream:184:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:141:
In file included from /usr/include/c++/v1/locale:204:
/usr/include/c++/v1/streambuf:133:22: error: incomplete type 'std::char_traits<char>' named in nested name specifier
    typedef typename traits_type::pos_type pos_type;
                     ^~~~~~~~~~~~~
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:12:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerMutate.h:15:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDictionary.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerUtil.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCommand.h:19:
In file included from /usr/include/c++/v1/sstream:184:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:141:
In file included from /usr/include/c++/v1/locale:204:
/usr/include/c++/v1/streambuf:134:22: error: incomplete type 'std::char_traits<char>' named in nested name specifier
    typedef typename traits_type::off_type off_type;
                     ^~~~~~~~~~~~~
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:12:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerMutate.h:15:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDictionary.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerUtil.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCommand.h:19:
In file included from /usr/include/c++/v1/sstream:184:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:141:
In file included from /usr/include/c++/v1/locale:204:
/usr/include/c++/v1/streambuf:136:45: error: incomplete type 'std::char_traits<char>' named in nested name specifier
    static_assert((is_same<_CharT, typename traits_type::char_type>::value),
                                            ^~~~~~~~~~~~~
/usr/include/c++/v1/iosfwd:110:19: note: forward declaration of 'std::char_traits<char>'
template<> struct char_traits<char>;
                  ^
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCrossOver.cpp:12:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerMutate.h:15:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerDictionary.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerUtil.h:16:
In file included from /var/tmp/portage/sys-libs/compiler-rt-sanitizers-15.0.5/work/compiler-rt/lib/fuzzer/FuzzerCommand.h:19:
In file included from /usr/include/c++/v1/sstream:184:
In file included from /usr/include/c++/v1/istream:163:
In file included from /usr/include/c++/v1/ostream:141:
In file included from /usr/include/c++/v1/locale:204:
/usr/include/c++/v1/streambuf:132:22: error: incomplete type 'std::char_traits<wchar_t>' named in nested name specifier
    typedef typename traits_type::int_type int_type;
                     ^~~~~~~~~~~~~
/usr/include/c++/v1/streambuf:491:64: note: in instantiation of template class 'std::basic_streambuf<wchar_t>' requested here
_LIBCPP_EXTERN_TEMPLATE(class _LIBCPP_EXTERN_TEMPLATE_TYPE_VIS basic_streambuf<wchar_t>)
                                                               ^
/usr/include/c++/v1/iosfwd:117:19: note: forward declaration of 'std::char_traits<wchar_t>'
template<> struct char_traits<wchar_t>;
                  ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.
Comment 7 Arfrever Frehtes Taifersar Arahesis 2022-11-28 19:12:27 UTC
Which versions of sys-libs/libcxx and sys-libs/libcxxabi are installed?
Maybe too old?
If latest (15.0.5), then reinstall them.
Comment 8 Mamadou Babaei 2022-11-28 19:25:24 UTC
Isn't portage suppose to take care of that?

*  sys-libs/libcxx
      Latest version available: 15.0.5
      Latest version installed: 14.0.6
      Size of files: 108,332 KiB
      Homepage:      https://libcxx.llvm.org/
      Description:   New implementation of the C++ standard library, targeting C++11
      License:       Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )

*  sys-libs/libcxxabi
      Latest version available: 15.0.5
      Latest version installed: 14.0.6
      Size of files: 108,332 KiB
      Homepage:      https://libcxxabi.llvm.org/
      Description:   Low level support for a standard C++ library
      License:       Apache-2.0-with-LLVM-exceptions || ( UoI-NCSA MIT )

I'll try and report back.
Comment 9 Mamadou Babaei 2022-11-28 19:37:11 UTC
Thank you! It built after your suggestion. Though, I still have other build issues in regard to LLVM. Like for example Firefox ebuild complains Rust is built with a different version of lld. I guess I have to find and rebuild everything LLVM/Clang related manually.
Comment 10 Arfrever Frehtes Taifersar Arahesis 2022-11-28 21:50:52 UTC
Do you have sys-devel/clang-runtime-15.0.5 installed?
What USE flags? Check mainly "compiler-rt", "libcxx" USE flags.

Which version and USE flags of sys-devel/clang-common?
Comment 11 Mamadou Babaei 2022-11-28 22:41:19 UTC
Yes, I did even re-emerge it. No effects.

I have 3 machines. One built everything fine using your suggestions.

The other two have different use flags from each other:

emerge -pqv '=sys-devel/clang-common-15.0.5::gentoo'
[ebuild   R   ] sys-devel/clang-common-15.0.5  USE="default-compiler-rt default-libcxx default-lld -llvm-libunwind -stricter -verify-sig" 

emerge -pqv '=sys-devel/clang-common-15.0.5::gentoo'
[ebuild   R   ] sys-devel/clang-common-15.0.5  USE="-default-compiler-rt -default-libcxx -default-lld -llvm-libunwind -stricter -verify-sig"

The first one, I use mostly for development, and I'd like to rely on libcxx instead of libstdc++, hence different use flags. Nonetheless, both of these machines fail to build Firefox or Librewolf.
Comment 12 Arfrever Frehtes Taifersar Arahesis 2022-11-28 22:45:09 UTC
And sys-devel/clang-runtime?
Comment 13 Mamadou Babaei 2022-11-28 23:01:14 UTC
First machine with libcxx:
$ emerge -pqv '=sys-devel/clang-runtime-15.0.5::gentoo' 
[ebuild   R   ] sys-devel/clang-runtime-15.0.5  USE="compiler-rt libcxx openmp sanitize" ABI_X86="32 (64) (-x32)" 

The other:
$ emerge -pqv '=sys-devel/clang-runtime-15.0.5::gentoo' 
[ebuild   R   ] sys-devel/clang-runtime-15.0.5  USE="compiler-rt openmp sanitize -libcxx" ABI_X86="32 (64) (-x32)" 

The machine that is building fine:
$ emerge -pqv '=sys-devel/clang-runtime-15.0.5::gentoo'
[ebuild   R   ] sys-devel/clang-runtime-15.0.5  USE="compiler-rt libcxx openmp sanitize" ABI_X86="32 (64) (-x32)"
Comment 14 Arfrever Frehtes Taifersar Arahesis 2022-11-29 00:26:14 UTC
It is safer to update all packages from LLVM group separately from unrelated packages...

sys-devel/clang-common currently has PDEPEND (dependencies which are allowed to be satisfied late) on various packages:
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/clang-common/clang-common-15.0.5.ebuild?id=a2a900396256ce31d23a0b9279b99f5806f98b8f#n19
Until relevant packages are installed (which matters more often if any "default-*" USE flag for sys-devel/clang-common is enabled), Clang is not guaranteed to work.

sys-devel/clang-runtime currently has RDEPEND (dependencies which must be satisfied earlier) on various packages:
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/clang-runtime/clang-runtime-15.0.5.ebuild?id=1031268617b76fc54d486998366a0e6e3112ae0b#n17
Until version of sys-devel/clang-runtime (with its dependencies) matching sys-devel/clang is installed, Clang is not guaranteed to work.

However sys-devel/clang currently again has PDEPEND on sys-devel/clang-runtime:
https://gitweb.gentoo.org/repo/gentoo.git/tree/sys-devel/clang/clang-15.0.5.ebuild?id=bab159a4d469da281800c7111c6343fdf43a73a4#n43

There was attempt to move dependency from PDEPEND to RDEPEND:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=063259edf4ee32738b680757ed853ddcf678e131

But it was reverted:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=194424374ce95cc15ae1a88af6ac4d3bd2819869


1. Rather correct solution for first problem (with sys-libs/compiler-rt-sanitizers / sys-libs/compiler-rt (attachment 837337 [details])) would be to add BDEPEND="sys-libs/compiler-rt:${LLVM_VERSION}" to sys-libs/compiler-rt-sanitizers.
Currently dependency on sys-libs/compiler-rt is only with USE="test".
If suggestion 3 (below) is also implemented, then it would be BDEPEND="sys-libs/compiler-rt:${LLVM_MAJOR}".
However it would be safer to force matching micro version, so I would suggest BDEPEND="~sys-libs/compiler-rt-${PV}".


2. Some workaround for second problem (with sys-libs/compiler-rt-sanitizers / sys-libs/libcxx (attachment 837965 [details])) would be to add "libcxx" USE flag to sys-libs/compiler-rt-sanitizers, and {,R}DEPEND="libcxx? ( >=sys-libs/libcxx-${PV} )".


3. Semi-relatedly, backporting of:
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=33a052fe8f678f242e5ffdb8511c4f50c93961f0
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0b8a2551e016e1bd5c95fc7340ac8e1d4554fc88
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=ec8ab815151e89f15a15335b72e4487a3118b47d
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=fc9a654dcf3f549e1a59d7725cb5986afdc0e75d
https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6eab43f46a97276164c57448bdda31a1813b8a59
To upcoming version 15.0.6 would also avoid "No such file or directory" problems in case of mismatch between micro version of sys-devel/clang, sys-libs/compiler-rt.
Comment 15 Mamadou Babaei 2022-11-29 00:33:48 UTC
Thank you very much for the detail explanation. I will go through it tomorrow using your suggestions and explanation to solve it.
Comment 16 Arfrever Frehtes Taifersar Arahesis 2022-11-29 00:39:51 UTC
Suggestions were for maintainers of these packages.

If you have some valid problem with Firefox etc., then it would be best to file new bug.
Comment 17 Oleg 2023-06-20 09:50:18 UTC
Looks like it was fixed in 16th version but stable thunderbird and firefox requires 15h version.
Comment 18 Gordon Pettey 2024-01-31 00:09:30 UTC
Have experienced the "broken compiler" message across multiple systems on multiple major llvm suite upgrades. compiler-rt-sanitizers needs to have an unconditional dependency on compiler-rt; it needs to NOT be limited to USE="test".