Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 919745 - musl+clang/llvm: Erroneous .gnu_debuglink entry copied from C runtime files
Summary: musl+clang/llvm: Erroneous .gnu_debuglink entry copied from C runtime files
Status: CONFIRMED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: LLVM support project
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2023-12-12 02:45 UTC by Haelwenn (lanodan) Monnier
Modified: 2023-12-13 19:00 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Haelwenn (lanodan) Monnier 2023-12-12 02:45:19 UTC
Setup:
- amd64
- LLVM 16.0.6
- musl 1.2.4-r1
- binutils 2.40-r9
- FEATURES=splitdebug in /etc/portage/make.conf
- portage 3.0.51

Got:
- Packaged executables/commands getting an erroneous .gnu_debuglink entry like Scrt1.o.debug (from musl) or clang_rt.crtbegin-x86_64.o.debug (from compiler-rt)
- objcopy (GNU and LLVM flavor) failing to add .gnu_debuglink at merge time, "debuglink section already exists"
- Executables in $WORKDIR correctly lack a .gnu_debuglink entry

Workaround: FEATURES=nostrip on sys-libs/musl *and* sys-libs/compiler-rt

Reproducible: Always
Comment 1 Haelwenn (lanodan) Monnier 2023-12-12 02:46:11 UTC
$ emerge --info
Portage 3.0.51 (python 3.11.6-final-0, platforms/pc, gcc-11, musl-1.2.4-r1, 6.1.57-gentoo x86_64)
=================================================================
System uname: Linux-6.1.57-gentoo-x86_64-AMD_Ryzen_5_PRO_3500U_w-_Radeon_Vega_Mobile_Gfx-with-libc
KiB Mem:    14939736 total,   2025232 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo-bootstrap: Thu, 23 Nov 2023 15:17:38 +0000
Head commit of repository gentoo-bootstrap: cdd6b1a6c49c892db7e0796325de3dfb57f69bc2

Head commit of repository guru: 44947df30df20740656d4745273dd7ebf9ff2376

Timestamp of repository musl: Mon, 27 Nov 2023 11:16:56 +0000
Head commit of repository musl: 1ed977f0a1749fef17a8576cd45e2c6eca115dd9

Timestamp of repository pentoo: Fri, 01 Dec 2023 01:01:54 +0000
Head commit of repository pentoo: daa3a1ee2f73844fea2bbfda0e2dbee9ab147c4e

Head commit of repository gentoo: eff095a1f6080ccb2c7cd5a27a55f58b3c7c2cec

Head commit of repository lanodanOverlay: ec7b3a1089009e48ba3178eda72f406687028721

sh lksh
ld GNU ld (Gentoo 2.40 p7) 2.40.0
app-misc/pax-utils:        1.3.5::gentoo
app-shells/bash:           5.1_p16-r6::gentoo
dev-lang/perl:             5.38.0-r1::gentoo
dev-lang/python:           3.10.13::gentoo, 3.11.6::gentoo, 3.12.0_p1::gentoo
dev-util/cmake:            3.27.7::gentoo
dev-util/meson:            1.2.3::gentoo
sys-apps/baselayout:       2.14::gentoo
sys-apps/openrc:           0.48::gentoo
sys-apps/sandbox:          2.38::gentoo
sys-devel/autoconf:        2.71-r6::gentoo
sys-devel/automake:        1.16.5-r1::gentoo
sys-devel/binutils:        2.40-r9::gentoo
sys-devel/binutils-config: 5.5::gentoo
sys-devel/clang:           16.0.6::gentoo
sys-devel/gcc:             11.3.1_p20230427::gentoo
sys-devel/gcc-config:      2.11::gentoo
sys-devel/libtool:         2.4.7-r1::gentoo
sys-devel/lld:             16.0.6::gentoo
sys-devel/llvm:            16.0.6::gentoo
sys-devel/make:            4.4.1-r1::gentoo
sys-kernel/linux-headers:  6.6::gentoo (virtual/os-headers)
sys-libs/musl:             1.2.4-r1::gentoo
Repositories:

gentoo-bootstrap
    location: /repo/gentoo-bootstrap
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/gentoo-bootstrap.git
    masters: gentoo
    priority: 0
    volatile: True

guru
    location: /repo/guru
    sync-type: git
    sync-uri: https://anongit.gentoo.org/git/repo/proj/guru.git
    masters: gentoo
    priority: 0
    volatile: True

musl
    location: /repo/musl
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/musl.git
    masters: gentoo
    priority: 0
    volatile: True

pentoo
    location: /repo/pentoo
    sync-type: git
    sync-uri: https://github.com/gentoo-mirror/pentoo.git
    masters: gentoo
    priority: 0
    volatile: True

crossdev
    location: /repo/portage-crossdev
    masters: gentoo
    priority: 10
    volatile: True

gentoo
    location: /repo/gentoo
    sync-type: git
    sync-uri: https://github.com/lanodan/gentoo.git
    priority: 100
    volatile: True

lanodanOverlay
    location: /repo/lanodanOverlay
    sync-type: git
    sync-uri: https://hacktivis.me/git/overlay.git
    masters: gentoo guru gentoo-bootstrap
    priority: 200
    volatile: True

ACCEPT_KEYWORDS="amd64"
ACCEPT_LICENSE="@FREE"
ADDR2LINE="llvm-addr2line"
AR="llvm-ar"
AS="clang-as"
CBUILD="x86_64-gentoo-linux-musl"
CC="clang"
CFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC -Qunused-arguments"
CHOST="x86_64-gentoo-linux-musl"
CONFIG_PROTECT="/etc /lib/udev/rules.d/ /usr/share/config /var/games/atris/ /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/angband/gamedata/ /etc/ca-certificates.conf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo"
CPP="clang-cpp"
CXX="clang++"
CXXFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC -Qunused-arguments"
DISTDIR="/var/cache/distfiles"
EMERGE_DEFAULT_OPTS="--keep-going --usepkg --binpkg-changed-deps=y --misspell-suggestions=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 -pipe -march=native -mtune=native -ggdb -Wall -fPIC"
FEATURES="assume-digests binpkg-docompress binpkg-dostrip binpkg-logs binpkg-multi-instance buildpkg-live config-protect-if-modified distlocks downgrade-backup ebuild-locks fixlafiles ipc-sandbox merge-sync mount-sandbox network-sandbox news noinfo parallel-fetch parallel-install pid-sandbox preserve-libs protect-owned python-trace qa-unresolved-soname-deps sandbox sfperms splitdebug strict strict-keepdir suidctl unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync warn-on-large-env xattr"
FFLAGS="-O2 -pipe -march=native -mtune=native -ggdb -Wall -fPIC"
GENTOO_MIRRORS="http://ftp.free.fr/mirrors/ftp.gentoo.org/ https://mirrors.dotsrc.org/gentoo/ https://gentoo.osuosl.org/ http://distfiles.gentoo.org"
INSTALL_MASK="charset.alias /usr/share/locale/locale.alias /sbin/reboot /sbin/poweroff /sbin/shutdown /usr/share/applications/"
LANG="C.utf8"
LD="ld.lld"
LDFLAGS="-Wl,-z,relro -Wl,-z,now -Wl,-O1 -Wl,--as-needed -fuse-ld=lld"
LEX="flex"
MAKEOPTS="-j8"
NM="llvm-nm"
OBJCOPY="x86_64-gentoo-linux-musl-objcopy"
OBJDUMP="llvm-objdump"
PKGDIR="/var/cache/binpkgs"
PORTAGE_COMPRESS="true"
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"
SHELL="/bin/mksh"
STRINGS="strings"
STRIP="x86_64-gentoo-linux-musl-strip"
USE="(cuda) (pgo) acl acpi alsa amd64 avif bzip2 cacert caps ccache cet cjk clang cli crypt cryptsetup d3d9 dane device-mapper dri egl eglfs eme-free fortran gentoo-dev glamor gles gles1 gles2 gtk3 hardened harfbuzz iconv icu idn iproute2 ipv6 jingle jpeg jumbo-build libcxx libproxy libtirpc libtommath libzfs llvm-libunwind lm-sensors luajit mandoc metric mikmod modplug modules-sign multitarget ncurses nls nptl opencl opengl openmp opus pcre pie pipewire png qt3support readline sanitize sasl seatd seccomp smp spell split-usr ssl ssp symlink syslog system-* system-act system-av1 system-boost system-bootloader system-bootstrap system-cairo system-crontab system-ffmpeg system-glew system-glfw system-harfbuzz system-heimdal system-icu system-info system-ipxe system-jpeg system-kopia system-lcms system-leveldb system-libcxx system-libevent system-libfmt system-librnp system-libs system-libsecp256k1 system-libvpx system-libyaml system-llvm system-lua system-lz4 system-man system-mathjax system-mimalloc system-miniaudio system-mitkrb5 system-mongodb system-mspack system-openjfx system-png system-protoc system-python-libs system-qemu system-quazip system-rocksdb system-seabios system-service system-sqlite system-ssl system-stb system-vulkan system-webp system-wfconfig system-wide system-wlroots system-xxhash system-zlib system-zstd theora threads tre truetype udev unicode urandom usb uvm vaapi vhosts vorbis vulkan wayland wayland-only webp xattr xcsecurity xtpax zfs zlib zstd" 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 f16c fma3 mmx mmxext pclmul popcnt sha sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3" ELIBC="musl" 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 wacom" KERNEL="linux" L10N="en en-US en-GB fr fr-CA ja is jbo de de-DE ru br" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LUA_SINGLE_TARGET="lua5-4" LUA_TARGETS="lua5-4" NGINX_MODULES_HTTP="access autoindex brotli charset fastcgi gzip gzip_static limit_conn limit_req map memcached metrics mirror proxy scgi split_clients ssi upstream_hash upstream_ip_hash upstream_keepalive upstream_least_conn upstream_zone userid uwsgi vhost_traffic_status headers_more stub_status" OFFICE_IMPLEMENTATION="libreoffice" PHP_TARGETS="php8-1" POSTGRES_TARGETS="postgres15" PYTHON_SINGLE_TARGET="python3_11" PYTHON_TARGETS="python3_11" QEMU_SOFTMMU_TARGETS="x86_64 i386" RUBY_TARGETS="ruby31" SANE_BACKENDS="snapcan" VIDEO_CARDS="radeonsi amdgpu" 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, LC_ALL, LFLAGS, LIBTOOL, LINGUAS, MAKE, MAKEFLAGS, PORTAGE_BINHOST, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, RUSTFLAGS, SIZE, YACC, YFLAGS