In a clang/libcxx/llvm profile, software might print out debug messages related to libunwind on the command line, such as in the following example: --- ~% mpv empty.wav libunwind: __unw_add_dynamic_fde: bad fde: FDE is really a CIE libunwind: __unw_add_dynamic_fde: bad fde: FDE is really a CIE [ffmpeg/demuxer] wav: Cannot check for SPDIF (+) Audio --aid=1 (pcm_s16le 2ch 44100Hz) Exiting... (Errors when loading file) --- Adding "-DNDEBUG" to CPPFLAGS during the emerge of sys-libs/llvm-libunwind prevents this from happening, so I suggest updating the ebuild accordingly. ~% emerge --info \=sys-libs/llvm-libunwind-16.0.6 Portage 3.0.49 (python 3.11.4-final-0, default/linux/amd64/17.1/systemd/clang/merged-usr, gcc-12, glibc-2.37-r3, 6.1.38-gentoo x86_64) ================================================================= System Settings ================================================================= System uname: Linux-6.1.38-gentoo-x86_64-Intel-R-_Core-TM-_i7-3770_CPU_@_3.40GHz-with-glibc2.37 KiB Mem: 16315928 total, 10022744 free KiB Swap: 20578296 total, 20578296 free Timestamp of repository gentoo: Sat, 15 Jul 2023 22:00:01 +0000 Head commit of repository gentoo: 895452b9395d9367db2e971ad5ef78974bfd9275 Timestamp of repository ROKO__: Wed, 12 Jul 2023 06:31:45 +0000 Head commit of repository ROKO__: 0fc2d6766a253beffc2a33750bfd2ddee9f10ed5 Timestamp of repository guru: Thu, 13 Jul 2023 09:46:36 +0000 Head commit of repository guru: 6c8caf5e28e8a16578eada4cb83a5a44676eaa3d Timestamp of repository jjakob: Wed, 12 Jul 2023 06:31:53 +0000 Head commit of repository jjakob: 3c2b7a38489031e5920e56f1c53eb6648634f927 sh bash 5.1_p16-r6 ld GNU ld (Gentoo 2.40 p5) 2.40.0 app-misc/pax-utils: 1.3.5::gentoo app-shells/bash: 5.1_p16-r6::gentoo dev-java/java-config: 2.3.1-r1::gentoo dev-lang/perl: 5.36.1-r3::gentoo dev-lang/python: 3.11.4::gentoo dev-lang/rust: 1.69.0-r1::gentoo dev-util/cmake: 3.26.4-r1::gentoo dev-util/meson: 1.1.1::gentoo sys-apps/baselayout: 2.13-r1::gentoo sys-apps/sandbox: 2.32::gentoo sys-apps/systemd: 253.3-r1::gentoo sys-devel/autoconf: 2.13-r7::gentoo, 2.71-r6::gentoo sys-devel/automake: 1.16.5::gentoo sys-devel/binutils: 2.40-r5::gentoo sys-devel/binutils-config: 5.5::gentoo sys-devel/clang: 15.0.7-r3::gentoo, 16.0.6::gentoo sys-devel/gcc: 12.3.1_p20230526::gentoo sys-devel/gcc-config: 2.11::gentoo sys-devel/libtool: 2.4.7-r1::gentoo sys-devel/lld: 15.0.7::gentoo, 16.0.6::gentoo sys-devel/llvm: 15.0.7-r3::gentoo, 16.0.6::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-extra-opts: sync-rsync-verify-max-age: 24 sync-rsync-verify-jobs: 1 sync-rsync-verify-metamanifest: yes ROKO__ location: /var/db/repos/ROKO__ sync-type: git sync-uri: https://github.com/gentoo-mirror/ROKO__.git masters: gentoo volatile: False guru location: /var/db/repos/guru sync-type: git sync-uri: https://github.com/gentoo-mirror/guru.git masters: gentoo volatile: False jjakob location: /var/db/repos/jjakob sync-type: git sync-uri: https://github.com/gentoo-mirror/jjakob.git masters: guru gentoo volatile: False ACCEPT_KEYWORDS="amd64" ACCEPT_LICENSE="*" ADDR2LINE="llvm-addr2line" AR="llvm-ar" AS="clang -c" CBUILD="x86_64-pc-linux-gnu" CC="clang" CFLAGS="-O2 -march=native -pipe -flto" 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/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c" CPP="clang-cpp" CXX="clang++" CXXFLAGS="-O2 -march=native -pipe -flto" DISTDIR="/var/cache/distfiles" EMERGE_DEFAULT_OPTS="--keep-going --with-bdeps=y --binpkg-changed-deps=n" 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 -march=native -pipe" FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs buildpkg buildpkg-live config-protect-if-modified distlocks ebuild-locks fail-clean 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 -march=native -pipe" GENTOO_MIRRORS="https://mirror.init7.net/gentoo/ http://mirror.init7.net/gentoo/ rsync://mirror.init7.net/gentoo/" LANG="en_US.utf8" LD="ld.lld" LDFLAGS="-fuse-ld=lld -rtlib=compiler-rt -unwindlib=libunwind -Wl,-O2 -Wl,--as-needed" LEX="flex" MAKEOPTS="-j4" NM="llvm-nm" OBJCOPY="llvm-objcopy" OBJDUMP="llvm-objdump" 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" RANLIB="llvm-ranlib" READELF="llvm-readelf" RUSTFLAGS="-C opt-level=3 -C linker=clang -C target-cpu=native -C codegen-units=1 -C linker-plugin-lto -C link-args=-fuse-ld=lld" SHELL="/bin/zsh" STRINGS="llvm-strings" STRIP="llvm-strip" USE="aac acl acpi amd64 bluetooth bzip2 clang cli crypt dbus djvu dri dvi egl epub exif ffmpeg flac fontconfig fortran gdbm gdk-pixbuf gif gnome gnome-keyring gnome-online-accounts gtk hardened heif iconv icu introspection jpeg jumbo-build kmod lcms libtirpc llvm-libunwind lto lzma mad mp3 mp4 multilib nautilus ncurses networkmanager nls nptl ogg opengl openmp opus pam pcre pdf pgo pipewire png policykit readline rubberband seccomp smp ssl svg systemd test-rust threads tiff tracker truetype udev udisks unicode upower usb vaapi vim-syntax vorbis vpx vulkan wayland webp wireplumber x264 x265 xattr xml zip zlib zsh-completion zstd" ABI_X86="64" 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 aes avx f16c pclmul popcnt rdrand 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" GRUB_PLATFORMS="efi-64" INPUT_DEVICES="libinput" KERNEL="linux" L10N="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="php8-1" POSTGRES_TARGETS="postgres12 postgres13" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" RUBY_TARGETS="ruby31" VIDEO_CARDS="amdgpu radeonsi intel" 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: ARFLAGS, ASFLAGS, CCLD, CONFIG_SHELL, CPPFLAGS, CTARGET, CXXFILT, ELFEDIT, EXTRA_ECONF, F77FLAGS, FC, GCOV, GPROF, INSTALL_MASK, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, SIZE, YACC, YFLAGS ================================================================= Package Settings ================================================================= sys-libs/llvm-libunwind-16.0.6::gentoo was built with the following: USE="(clang) static-libs -debug -test -verify-sig" ABI_X86="(32) (64) (-x32)" CFLAGS="-O2 -march=native -pipe" CXXFLAGS="-O2 -march=native -pipe" FEATURES="network-sandbox news buildpkg xattr config-protect-if-modified sfperms sandbox unmerge-orphans ipc-sandbox binpkg-dostrip fail-clean usersandbox unmerge-logs parallel-fetch unknown-features-warn binpkg-logs assume-digests binpkg-docompress multilib-strict ebuild-locks preserve-libs distlocks userpriv usersync strict pid-sandbox fixlafiles userfetch protect-owned merge-sync buildpkg-live qa-unresolved-soname-deps"
I can confirm that this is required, upstream has also confirmed https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826
Sorry, I meant to look at this one when handling the clang-common bits.
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f8fa80bed10eacdc4269f6d8a08985a6cf6df1dc commit f8fa80bed10eacdc4269f6d8a08985a6cf6df1dc Author: Sam James <sam@gentoo.org> AuthorDate: 2023-09-10 14:16:03 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2023-09-10 14:16:59 +0000 sys-libs/llvm-libunwind: avoid spurious assertions with USE=-debug Respect upstream build type assumptions where they do: * -DLIBUNWIND_ENABLE_ASSERTIONS=ON => -DCMAKE_BUILD_TYPE=DEBUG => -UNDEBUG -DCMAKE_BUILD_TYPE!=debug => -DNDEBUG * -DLIBUNWIND_ENABLE_ASSERTIONS=OFF => -UNDEBUG See also https://github.com/llvm/llvm-project/issues/86#issuecomment-1649668826. Bug: https://github.com/libunwind/libunwind/issues/138 Bug: https://github.com/llvm/llvm-project/issues/86 Bug: https://github.com/llvm/llvm-project/issues/55584 Closes: https://bugs.gentoo.org/910436 Signed-off-by: Sam James <sam@gentoo.org> ...m-libunwind-16.0.6.ebuild => llvm-libunwind-16.0.6-r1.ebuild} | 9 +++++++++ sys-libs/llvm-libunwind/llvm-libunwind-17.0.0.9999.ebuild | 9 +++++++++ ...ind-17.0.0_rc4.ebuild => llvm-libunwind-17.0.0_rc4-r1.ebuild} | 9 +++++++++ sys-libs/llvm-libunwind/llvm-libunwind-18.0.0.9999.ebuild | 9 +++++++++ ...230906.ebuild => llvm-libunwind-18.0.0_pre20230906-r1.ebuild} | 9 +++++++++ 5 files changed, 45 insertions(+)