Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 549672 - /usr/lib/debug/.build-id/* consistent conflicts
Summary: /usr/lib/debug/.build-id/* consistent conflicts
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
: 792201 792396 792453 795324 (view as bug list)
Depends on:
Blocks:
 
Reported: 2015-05-16 22:21 UTC by Robin Johnson
Modified: 2022-04-25 22:56 UTC (History)
3 users (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 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-05-16 22:21:41 UTC
Something is not right in toolchain land, many compiled packages are trying to own the same /usr/lib/debug/.build-id/ file.

In my case, these symlinks are the conflicts:
/usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092
/usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47
...
(a dozen more)

I don't think this is a repeat of bug 526144, as my GCC builds (4.7.4, 4.8.4, 4.9.2) are from Feburary, and that bug was supposedly fixed last year.

For the moment I added COLLISION_IGNORE="${COLLISION_IGNORE} /usr/lib/debug/.build-id"
 as a workaround, but a real fix would be nice.

Portage 2.2.18 (python 2.7.8-final-0, default/linux/amd64/13.0/developer, gcc-4.9.2, glibc-2.20-r2, 4.1.0-rc1 x86_64)
=================================================================
System uname: Linux-4.1.0-rc1-x86_64-Intel-R-_Core-TM-_i7-2600K_CPU_@_3.40GHz-with-gentoo-2.2
KiB Mem:    32914240 total,   2377364 free
KiB Swap:          0 total,         0 free
Timestamp of repository gentoo: Sat, 28 Feb 2015 19:00:01 +0000
sh bash 4.3_p33-r2
ld GNU ld (Gentoo 2.25 p1.0) 2.25
ccache version 3.1.9 [enabled]
app-shells/bash:          4.3_p33-r2::gentoo
dev-java/java-config:     2.2.0::gentoo
dev-lang/perl:            5.20.1-r4::gentoo
dev-lang/python:          2.7.8::gentoo, 3.1.5-r1::gentoo, 3.2.5-r4::gentoo, 3.3.5-r1::gentoo, 3.4.0::gentoo
dev-util/ccache:          3.1.9-r3::gentoo
dev-util/cmake:           2.8.12.1-r2::gentoo
dev-util/pkgconfig:       0.28-r2::gentoo
sys-apps/baselayout:      2.2::gentoo
sys-apps/openrc:          9999::gentoo
sys-apps/sandbox:         2.6-r1::gentoo
sys-devel/autoconf:       2.13::gentoo, 2.69::gentoo
sys-devel/automake:       1.4_p6-r1::gentoo, 1.5-r1::gentoo, 1.6.3-r1::gentoo, 1.7.9-r2::gentoo, 1.8.5-r4::gentoo, 1.9.6-r3::gentoo, 1.10.3::gentoo, 1.11.6::gentoo, 1.12.6::gentoo, 1.13.4::gentoo, 1.14.1::gentoo
sys-devel/binutils:       2.25::gentoo
sys-devel/gcc:            4.2.4-r1::gentoo, 4.3.6-r1::gentoo, 4.4.5::gentoo, 4.5.4::gentoo, 4.6.3::gentoo, 4.7.4::gentoo, 4.8.4::gentoo, 4.9.2::gentoo
sys-devel/gcc-config:     1.8::gentoo
sys-devel/libtool:        2.4.6::gentoo
sys-devel/make:           4.1-r1::gentoo
sys-kernel/linux-headers: 4.0::gentoo (virtual/os-headers)
sys-libs/glibc:           2.20-r2::gentoo
Repositories:

gentoo
    location: /code/gentoo/gentoo-cvs/gentoo-x86
    sync-type: rsync
    sync-uri: rsync://rsync.gentoo.org/gentoo-portage
    priority: -1000

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

oss-overlay
    location: /code/layman/oss-overlay
    masters: gentoo
    priority: 1

mysql
    location: /code/gentoo/gentoo-git/mysql
    masters: gentoo
    priority: 2

robbat2
    location: /code/gentoo/gentoo-git/robbat2
    masters: gentoo
    priority: 3

bitcoin
    location: /code/layman/bitcoin
    masters: gentoo
    priority: 4

ACCEPT_KEYWORDS="amd64 ~amd64"
ACCEPT_LICENSE="* @EULA"
CBUILD="x86_64-pc-linux-gnu"
CFLAGS="-march=native -O2 -pipe -frecord-gcc-switches"
CHOST="x86_64-pc-linux-gnu"
CONFIG_PROTECT="/etc /opt/openjms/config /usr/share/config /usr/share/gnupg/qualified.txt /usr/share/maven-bin-2.0/conf /usr/share/maven-bin-2.1/conf /usr/share/maven-bin-2.2/conf /usr/share/maven-bin-3.0/conf /usr/share/maven-bin-3.1/conf /usr/share/polkit-1/actions /var/bind /var/lib/hsqldb /var/spool/munin-async/.ssh"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/dconf /etc/env.d /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/php/apache2-php5.3/ext-active/ /etc/php/apache2-php5.4/ext-active/ /etc/php/apache2-php5.5/ext-active/ /etc/php/cgi-php5.3/ext-active/ /etc/php/cgi-php5.4/ext-active/ /etc/php/cgi-php5.5/ext-active/ /etc/php/cli-php5.3/ext-active/ /etc/php/cli-php5.4/ext-active/ /etc/php/cli-php5.5/ext-active/ /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/language.dat.d /etc/texmf/language.def.d /etc/texmf/updmap.d /etc/texmf/web2c"
CXXFLAGS="-march=native -O2 -pipe"
DISTDIR="/home/gentoo/distfiles"
FCFLAGS="-O2 -pipe"
FEATURES="assume-digests binpkg-logs buildpkg ccache collision-protect config-protect-if-modified distlocks ebuild-locks fixlafiles lmirror merge-sync mirror multilib-strict news parallel-fetch preserve-libs protect-owned sandbox sfperms splitdebug strict test-fail-continue unknown-features-warn unmerge-logs unmerge-orphans userfetch userpriv usersandbox usersync xattr"
FFLAGS="-O2 -pipe"
GENTOO_MIRRORS="http://gentoo.osuosl.org/"
LANG="en_US.UTF-8"
LDFLAGS="-Wl,--hash-style=gnu -Wl,-O1 -Wl,--as-needed -Wl,--build-id"
MAKEOPTS="-j8 -l10"
PKGDIR="/home/gentoo/packages/bohr-int/"
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"
PORTAGE_TMPDIR="/dev/shm"
USE="a52 aac aalib acl acpi adns adplug agg aio alsa amd64 amr animgif ares arts audiofile audit avahi avx bash-completion berkdb bluetooth bonjour bzip2 cairo calendar cdaudio cdda cddb cdio cdparanoia cdr chardet chm clamav cli consolekit cracklib crypt cscope css ctype cups curl curlwrappers cvs cxx d3d daap dbus dc1394 designer-plugin dia diskio djbfft djvu dri dts dv dvb dvd dvdr dvdread ebook emf encode exif expat fam ffmpeg fftw firefox flac fltk fontconfig foomaticdb fortran gd gdbm geoip gif gimp glamor glut gmp gnokii gnutls gps graphviz gsm gstreamer hal ical iconv id3tag idea ieee1394 imagemagick imlib inkjar ipod ipv6 jack java5 java6 javacomm jbig jingle jpeg jpeg2k lash lcms ldap libgcrypt libnotify libsamplerate llvm llvm-shared-libs lm_sensors logitech-mouse lzma lzo mad maildir mhash midi mikmod mmap mmx mmxext mng modplug modules mozilla mp3 mp3tunes mp4 mpeg mplayer mudflap multilib multitarget musepack nas ncurses nls nocd nptl nptlonly nsplugin offensive ofx ogg openal opencl openexr opengl openmp oss otr pam pango pccntl pch pcre pda pdf perl plotutils png policykit posix postscript povray ppds pulseaudio python qt3support quicktime raw rdesktop readline reflection rpc rss ruby savedconfig scanner sdl semantic-desktop session sid simplexml slp smp sms smux sndfile snmp sockets socks5 solver speex spell spl sqlite sqlite3 sse sse2 ssl ssse3 startup-notification subversion svg symlink sysfs syslog sysvipc taglib theora threads tidy tiff timidity truetype tta twolame udev udisks unicode upower urandom usb v4l v4l2 vcd vcdx videos vim-syntax vnc vorbis vorbis-psy wavpack webkit wideband wifi win32codecs wma wmf wxwidgets x264 xanim xattr xcb xcomposite xfs xine xinerama xinetd xml xorg xosd xpm xrandr xscreensaver xsl xulrunner xv xvid zeroconf zlib" ABI_X86="64 32" ALSA_CARDS="hda-intel usb-audio usb-usx2y ad1816a ad1848 ad1848-lib ad1889 serial-u16550 virmidi seq-dummy dummy" APACHE2_MODULES="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 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 asis auth_digest imagemap log_forensic proxy proxy_ajp proxy_balancer proxy_connect proxy_ftp proxy_http cern_meta cgi cgid dbd dumpio ident proxy_scgi reqtimeout substitute version authn_dbd" APACHE2_MPMS="worker" CALLIGRA_FEATURES="kexi words flow plan sheets stage tables krita karbon braindump author" CAMERAS="ptp2" COLLECTD_PLUGINS="df interface irq load memory rrdtool swap syslog" CPU_FLAGS_X86="aes avx mmx mmxext popcnt sse sse2 sse3 sse4_1 sse4_2 ssse3" ELIBC="glibc" FOO2ZJS_DEVICES="hp1020" GPSD_PROTOCOLS="ashtech aivdm earthmate evermore fv18 garmin garmintxt gpsclock itrax mtk3301 nmea ntrip navcom oceanserver oldstyle oncore rtcm104v2 rtcm104v3 sirf superstar2 timing tsip tripmate tnt ublox ubx" GRUB_PLATFORMS="pc efi-32 efi-64" INPUT_DEVICES="evdev keyboard mouse void wacom" KERNEL="linux" LCD_DEVICES="g15 glk graphlcd iowarrior ncurses null png ppm text usbhub usblcd X xosd" LIBREOFFICE_EXTENSIONS="presenter-console presenter-minimizer" LINGUAS="en_CA en_GB en_ZA en_US en af" OFFICE_IMPLEMENTATION="libreoffice" PYTHON_SINGLE_TARGET="python2_7" PYTHON_TARGETS="python2_7 python3_2 python3_3" QEMU_SOFTMMU_TARGETS="x86_64 aarch64 arm i386 mips mips64 mips64el mipsel ppc ppc64" RUBY_TARGETS="ruby19 ruby20 ruby21" USERLAND="GNU" VIDEO_CARDS="dummy fbdev ati radeon v4l vga vesa radeonhd r600 nouveau" 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:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, INSTALL_MASK, LC_ALL, PORTAGE_BUNZIP2_COMMAND, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS, USE_PYTHON
Comment 1 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-05-17 00:42:31 UTC
dilfridge, as requested, here's a subset of them (18 packages):
/var/db/pkg/app-arch/tar-1.28-r1/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/sbin/rmt.debug 1431815124
/var/db/pkg/app-arch/tar-1.28-r1/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/sbin/rmt 1431815124
/var/db/pkg/app-crypt/gnupg-2.1.4/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/symcryptrun.debug 1431814539
/var/db/pkg/app-crypt/gnupg-2.1.4/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/symcryptrun 1431814539
/var/db/pkg/app-emulation/qemu-2.3.0-r1/CONTENTS:sym /usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092.debug -> ../../usr/libexec/qemu-bridge-helper.debug 1431814356
/var/db/pkg/app-emulation/qemu-2.3.0-r1/CONTENTS:sym /usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092 -> /usr/libexec/qemu-bridge-helper 1431814356
/var/db/pkg/app-emulation/xen-tools-4.5.0-r3/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/sbin/xenwatchdogd.debug 1430413358
/var/db/pkg/app-emulation/xen-tools-4.5.0-r3/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/sbin/xenwatchdogd 1430413358
/var/db/pkg/app-portage/portage-utils-0.54/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/q.debug 1430412169
/var/db/pkg/app-portage/portage-utils-0.54/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/q 1430412169
/var/db/pkg/dev-util/boost-build-1.56.0/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/bjam.debug 1430802281
/var/db/pkg/dev-util/boost-build-1.56.0/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/bjam 1430802281
/var/db/pkg/net-libs/gnutls-3.3.15/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/psktool.debug 1431815133
/var/db/pkg/net-libs/gnutls-3.3.15/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/psktool 1431815133
/var/db/pkg/net-misc/iputils-20121221-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../bin/ping6.debug 1431815153
/var/db/pkg/net-misc/iputils-20121221-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /bin/ping6 1431815153
/var/db/pkg/sys-apps/attr-2.4.47-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../bin/attr.debug 1431814900
/var/db/pkg/sys-apps/attr-2.4.47-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /bin/attr 1431814900
/var/db/pkg/sys-apps/dtc-1.4.1-r1/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/fdtget.debug 1431814368
/var/db/pkg/sys-apps/dtc-1.4.1-r1/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/fdtget 1431814368
/var/db/pkg/sys-apps/gawk-4.1.2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/lib64/misc/awk/grcat.debug 1431815106
/var/db/pkg/sys-apps/gawk-4.1.2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/lib64/misc/awk/grcat 1431815106
/var/db/pkg/sys-apps/gentoo-functions-0.10/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../sbin/consoletype.debug 1431814385
/var/db/pkg/sys-apps/gentoo-functions-0.10/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /sbin/consoletype 1431814385
/var/db/pkg/sys-apps/iproute2-4.0.0-r1/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../sbin/nstat.debug 1431814884
/var/db/pkg/sys-apps/iproute2-4.0.0-r1/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /sbin/nstat 1431814884
/var/db/pkg/sys-apps/kmod-20/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../bin/kmod.debug 1430413785
/var/db/pkg/sys-apps/kmod-20/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /bin/kmod 1430413785
/var/db/pkg/sys-apps/less-476/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/lesskey.debug 1431814892
/var/db/pkg/sys-apps/less-476/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/lesskey 1431814892
/var/db/pkg/sys-apps/util-linux-2.26.2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/sbin/readprofile.debug 1431815114
/var/db/pkg/sys-apps/util-linux-2.26.2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/sbin/readprofile 1431815114
/var/db/pkg/sys-fs/udev-219/CONTENTS:sym /usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092.debug -> ../../lib/udev/ata_id.debug 1430413889
/var/db/pkg/sys-fs/udev-219/CONTENTS:sym /usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092 -> /lib/udev/ata_id 1430413889
/var/db/pkg/sys-libs/glibc-2.20-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/lib64/crt1.o.debug 1429668441
/var/db/pkg/sys-libs/glibc-2.20-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/lib64/crt1.o 1429668441
/var/db/pkg/sys-libs/glibc-2.20-r2/CONTENTS:sym /usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092.debug -> ../../usr/lib64/Scrt1.o.debug 1429668441
/var/db/pkg/sys-libs/glibc-2.20-r2/CONTENTS:sym /usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092 -> /usr/lib64/Scrt1.o 1429668441
Comment 2 SpanKY gentoo-dev 2015-05-17 15:17:10 UTC
you should not be seeing the same build-id across all those ELFs.  it's supposed to be unique to the hash of all the input obj code.  they should be the same only if they actually contained the same code.

can you check to see if that is actually the buildid in them ?  run `file` or `readelf -n` to see what is actually stored in there.
Comment 3 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-05-20 01:04:34 UTC
$ file /usr/bin/psktool /usr/bin/q /usr/lib64/Scrt1.o /lib/udev/ata_id
/usr/bin/psktool:   ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=69057a7a5cc5a53bb02a853806167f9a86079d47, stripped
/usr/bin/q:         ELF 64-bit LSB executable, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=69057a7a5cc5a53bb02a853806167f9a86079d47, stripped
/usr/lib64/Scrt1.o: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), for GNU/Linux 2.6.32, BuildID[sha1]=0f45f0877f4eb8d87658b6ad4024dfb83ac0a092, not stripped
/lib/udev/ata_id:   ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), dynamically linked, interpreter /lib64/ld-linux-x86-64.so.2, for GNU/Linux 2.6.32, BuildID[sha1]=0f45f0877f4eb8d87658b6ad4024dfb83ac0a092, stripped
Comment 4 SpanKY gentoo-dev 2015-05-21 02:11:24 UTC
(In reply to Robin Johnson from comment #3)

ok that's clearly incorrect

btw, you're only getting build-id's because you asked for them in LDFLAGS ...
if you don't actually want these, you can simply change your LDFLAGS.
Comment 5 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-05-21 18:32:06 UTC
I do want build-ids, they are actually useful, but they need to work properly. I'm going to try and trace back when this breakage started.
Comment 6 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-05-24 23:14:38 UTC
It seems that the errors started when I installed the new glibc, since then, more and more stuff seems to be duplicate.
Comment 7 SpanKY gentoo-dev 2015-05-25 03:55:13 UTC
(In reply to Robin Johnson from comment #6)

i'd suspect the .o files causing troubles.  what if you build glibc w/out that flag in LDFLAGS ?
Comment 8 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2015-05-30 17:32:20 UTC
(In reply to SpanKY from comment #7)
> (In reply to Robin Johnson from comment #6)
> 
> i'd suspect the .o files causing troubles.  what if you build glibc w/out
> that flag in LDFLAGS ?
Yes, that solved it, but good question why glibc caused that to happen.
I'm rebuilding the affected packages now and they are getting a different build-id.

Relatedly, I see there is a binary in the glibc that's using the old system glibc when building anew: /usr/bin/memusagestat 

This noticed because the prior glibc conflicts were replaced by this one.
/var/db/pkg/sys-libs/glibc-2.20-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47.debug -> ../../usr/bin/memusagestat.debug 1432954416
/var/db/pkg/sys-libs/glibc-2.20-r2/CONTENTS:sym /usr/lib/debug/.build-id/69/057a7a5cc5a53bb02a853806167f9a86079d47 -> /usr/bin/memusagestat 1432954416
Comment 9 SpanKY gentoo-dev 2015-05-30 18:11:28 UTC
(In reply to Robin Johnson from comment #8)

i've moved the memusagestat bug upstream so discussion wrt that can go there:
https://sourceware.org/bugzilla/show_bug.cgi?id=18465
Comment 10 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-29 17:26:31 UTC
*** Bug 792201 has been marked as a duplicate of this bug. ***
Comment 11 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2021-05-29 17:26:45 UTC
*** Bug 792396 has been marked as a duplicate of this bug. ***
Comment 12 Robin Johnson archtester Gentoo Infrastructure gentoo-dev Security 2021-05-31 04:04:08 UTC
For later readers:
if you hit this conflict and you have two packages that ships some common upstream/very-related binaries, you can use RESTRICT=splitdebug in the ebuild as a workaround.

Further improvements to support that case will require changing the layout expected by binutils/gdb to recognize that multiple binaries might have an identical build-id for valid reasons.

One potential solution is that the symlinks like:
/usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092 -> /usr/bin/foo

become directories of links:
/usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092/{hash1} -> /opt/package1/lib/bar
/usr/lib/debug/.build-id/0f/45f0877f4eb8d87658b6ad4024dfb83ac0a092/{hash2} -> /opt/package2/lib/bar

What should be hashed in there? possibly the path? It cannot be anything that in itself is likely to have a collision (so the raw bytes of the ELF are out of the question).
Comment 13 Toralf Förster gentoo-dev 2021-06-10 15:48:40 UTC
*** Bug 792453 has been marked as a duplicate of this bug. ***
Comment 14 Robert G. Siebeck 2021-07-05 17:21:40 UTC
*** Bug 795324 has been marked as a duplicate of this bug. ***
Comment 15 Jeremi Piotrowski 2022-02-17 09:35:51 UTC
I investigated this a bit and the issue is like Robin mentioned back in 2015. The crt*.o files end up having a build-id section defined, and since they get linked into executables, the executables inherit the build-id section and can't overwrite it on their own. So every executable built after glibc ends up having the build-id of one of the startup files.

The reason the crt*.o files have build-ids defined is that the glibc ebuild puts LDFLAGS into CC (https://github.com/gentoo/gentoo/blob/master/sys-libs/glibc/glibc-2.33-r13.ebuild#L579). Removing that removes all the build-id file collisions. Alternatively, the `link-relocatable` rule in ${S}/csu/Makefile could be patched to always pass '-Wl,--build-id=none' but I haven't tried that.
Comment 16 Andreas K. Hüttel archtester gentoo-dev 2022-04-25 22:56:23 UTC
This falls somewhat under self-inflicted pain, since build-ids are rather useless on gentoo...