When building Emacs, I hit: ``` /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_uri_ge t_attribute@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_space_ strdup@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_uri_ma tch_module_info@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_strerr or@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_uri_pa rse@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_uri_fr ee@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_iter_f ree@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_messag e@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_uri_se t_attribute@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_uri_ge t_pin_source@LIBP11_KIT_1.0' /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../x86_64-pc-linux-gnu/bin/ld.bfd: /usr/lib/gcc/x86_64-pc-linux-gnu/15/../../../../lib64/libgnutls.so: undefined reference to `p11_kit_module s_load_and_initialize@LIBP11_KIT_1.0' ``` (using bfd for Emacs, but I'd used mold for gnutls and I think p11-kit.)
I'm not debugging this right now, I plan to come back to it but someone else can/should if they want to.
``` $ rg mold:.* gnutls-3.8.* [...] 9707:mold: warning: /var/tmp/portage/net-libs/gnutls-3.8.7.1/work/gnutls-3.8.7/lib/libgnutls.map: cannot assign version `GNUTLS_FIPS140_3_4` to symbol `_gnutls_dh_compute_key`: symbol not found 9708:mold: warning: /var/tmp/portage/net-libs/gnutls-3.8.7.1/work/gnutls-3.8.7/lib/libgnutls.map: cannot assign version `GNUTLS_FIPS140_3_4` to symbol `_gnutls_dh_generate_key`: symbol not found 9709:mold: warning: /var/tmp/portage/net-libs/gnutls-3.8.7.1/work/gnutls-3.8.7/lib/libgnutls.map: cannot assign version `GNUTLS_FIPS140_3_4` to symbol `_gnutls_ecdh_generate_key`: symbol not found 9710:mold: warning: /var/tmp/portage/net-libs/gnutls-3.8.7.1/work/gnutls-3.8.7/lib/libgnutls.map: cannot assign version `GNUTLS_FIPS140_3_4` to symbol `_gnutls_ecdh_compute_key`: symbol not found 9711:mold: warning: /var/tmp/portage/net-libs/gnutls-3.8.7.1/work/gnutls-3.8.7/lib/libgnutls.map: cannot assign version `GNUTLS_PRIVATE_3_4` to symbol `_gnutls_pbkdf2_sha1`: symbol not found 9712:mold: warning: /var/tmp/portage/net-libs/gnutls-3.8.7.1/work/gnutls-3.8.7/lib/libgnutls.map: cannot assign version `GNUTLS_PRIVATE_3_4` to symbol `_gnutls_mpi_release`: symbol not found 18740:mold: warning: symbol type mismatch: err 19079:mold: warning: symbol type mismatch: err 19602:mold: warning: symbol type mismatch: err 20128:mold: warning: symbol type mismatch: err [...] ```
The bug has been referenced in the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=3a538523c8039763c9c3bdea27095115cf728c01 commit 3a538523c8039763c9c3bdea27095115cf728c01 Author: Sam James <sam@gentoo.org> AuthorDate: 2025-05-01 01:37:48 +0000 Commit: Sam James <sam@gentoo.org> CommitDate: 2025-05-01 01:40:15 +0000 sys-devel/mold: backport 2 fixes to 2.38.1 * Fix -Wl,--default-symver vs -Wl,--version-script which shows up as breakage in dev-libs/jansson vs dev-libs/json-c in net-firewall/firewalld (like in bug #812119). Thanks to Chewi for digging into it & reporting it upstream. There's a chance that it may help with bug #937990 too and maybe (but less likely?) bug #933197. * Fix --omagic hang (upstream report says it was a regression in 2.38.1 vs 2.38.0, so let's fix it while here). * Skip test failing for me on one machine (seems to be Clang not picking up that it should use mold/lld for the test, or the plugin maybe not being around; not going to worry about it for now). Bug: https://bugs.gentoo.org/812119 Bug: https://bugs.gentoo.org/933197 Bug: https://bugs.gentoo.org/937990 Signed-off-by: Sam James <sam@gentoo.org> .../mold/files/mold-2.38.1-default-symver.patch | 70 ++++++++++++ sys-devel/mold/files/mold-2.38.1-omagic-loop.patch | 28 +++++ sys-devel/mold/mold-2.38.1-r1.ebuild | 122 +++++++++++++++++++++ sys-devel/mold/mold-9999.ebuild | 5 + 4 files changed, 225 insertions(+)