Summary: | /usr/lib/debug/.build-id/* consistent conflicts | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Robin Johnson <robbat2> |
Component: | [OLD] Core system | Assignee: | Gentoo Toolchain Maintainers <toolchain> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | gentoo.2019, sam, toralf |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
See Also: | https://bugs.gentoo.org/show_bug.cgi?id=593912 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- |
Description
Robin Johnson
2015-05-16 22:21:41 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 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. $ 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 (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. 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. It seems that the errors started when I installed the new glibc, since then, more and more stuff seems to be duplicate. (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 ? (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 (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 *** Bug 792201 has been marked as a duplicate of this bug. *** *** Bug 792396 has been marked as a duplicate of this bug. *** 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). *** Bug 792453 has been marked as a duplicate of this bug. *** *** Bug 795324 has been marked as a duplicate of this bug. *** 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. This falls somewhat under self-inflicted pain, since build-ids are rather useless on gentoo... |