Skip to contentSkip to conversation

libidn: Enable linker version script explicitly

PATCH New Khem Raj 1 participant 4 messages Nov 19

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/4 libidn: Enable linker version script explicitly

configure's linker version script check links an empty program with a script that assigns versions to an undefined symbol 'sym'. lld defaults to --no-undefined-version and rejects it, so with ld-is-lld configure decides version scripts are unsupported and the library is built without any symbol versions, silently changing its ABI. Consumers linked earlier against the versioned library then fail file-rdeps QA, e.g. openldap:

libldap.so.2 requires libgnutls.so.30(GNUTLS_3_4)(64bit), but no providers found in RDEPENDS:openldap? [file-rdeps]

Every supported linker handles version scripts, so enable them explicitly instead of relying on the broken probe.

AI-Generated: Uses Claude Code

---
 meta-oe/recipes-extended/libidn/libidn_1.44.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta-oe/recipes-extended/libidn/libidn_1.44.bb +1 -1
index 652d67fb69..f8e152aa31 100644
@@ -29,7 +29,7 @@ FILES:idn = "${bindir}/*"
 LICENSE:${PN} = "LGPL-2.1-or-later OR LGPL-3.0-only"
 LICENSE:idn = "GPL-3.0-or-later"
 
-EXTRA_OECONF = "--disable-csharp"
+EXTRA_OECONF = "--disable-csharp --enable-ld-version-script"
 
 do_install:append() {
 	rm -rf ${D}${datadir}/emacs
author
#1 lore raw

PATCH 2/4 libcdio-paranoia: Enable linker version script explicitly

configure's linker version script check links an empty program with a script that assigns versions to an undefined symbol 'sym'. lld defaults to --no-undefined-version and rejects it, so with ld-is-lld configure decides version scripts are unsupported and the library is built without any symbol versions, silently changing its ABI. Consumers linked earlier against the versioned library then fail file-rdeps QA, e.g. openldap:

libldap.so.2 requires libgnutls.so.30(GNUTLS_3_4)(64bit), but no providers found in RDEPENDS:openldap? [file-rdeps]

Every supported linker handles version scripts, so enable them explicitly instead of relying on the broken probe.

AI-Generated: Uses Claude Code

---
 .../recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.2.bb   | 2 ++
 1 file changed, 2 insertions(+)
meta-oe/recipes-multimedia/libcdio/libcdio-paranoia_10.2+2.0.2.bb +2 -0
index b880f3f090..3fbd40e7e2 100644
@@ -15,6 +15,8 @@ UPSTREAM_CHECK_REGEX = "release-(?P<pver>\d+(\.\d+)+\+\d+(\.\d+)+)"
 
 inherit autotools pkgconfig github-releases
 
+EXTRA_OECONF += "--enable-ld-version-script"
+
 PACKAGES += "${PN}-utils"
 
 FILES:${PN} = "${libdir}/${BPN}${SOLIB}"
author
#2 lore raw

PATCH 3/4 lldpd: Enable linker version script explicitly

In reply to Khem Raj

configure's linker version script check links an empty program with a script that assigns versions to an undefined symbol 'sym'. lld defaults to --no-undefined-version and rejects it, so with ld-is-lld configure decides version scripts are unsupported and the library is built without any symbol versions, silently changing its ABI. Consumers linked earlier against the versioned library then fail file-rdeps QA, e.g. openldap:

libldap.so.2 requires libgnutls.so.30(GNUTLS_3_4)(64bit), but no providers found in RDEPENDS:openldap? [file-rdeps]

Every supported linker handles version scripts, so enable them explicitly instead of relying on the broken probe.

AI-Generated: Uses Claude Code

---
 meta-networking/recipes-daemons/lldpd/lldpd_1.0.23.bb | 1 +
 1 file changed, 1 insertion(+)
meta-networking/recipes-daemons/lldpd/lldpd_1.0.23.bb +1 -0
index 3d623bcf5b..8962554df4 100644
@@ -26,6 +26,7 @@ EXTRA_OECONF += "--without-embedded-libevent \
                  --with-privsep-group=lldpd \
                  --with-systemdsystemunitdir=${systemd_system_unitdir} \
                  --without-sysusersdir \
+                 --enable-ld-version-script \
 "
 
 PACKAGECONFIG ??= "cdp fdp edp sonmp lldpmed dot1 dot3"
author
#3 lore raw

PATCH 4/4 neon: Enable linker version script and drop stale map entry

In reply to Khem Raj

configure's linker version script check links an empty program with a script that assigns versions to an undefined symbol 'sym'. lld defaults to --no-undefined-version and rejects it, so with ld-is-lld libneon was built without the NEON_* symbol versions, silently changing its ABI. Enable version scripts explicitly instead of relying on the probe.

neon.vers also lists ne_sock_writev, which has never existed (the API is ne_sock_fullwritev), and lld fails the link on it. Remove it.

AI-Generated: Uses Claude Code

---
 .../0001-neon.vers-Drop-ne_sock_writev.patch  | 31 +++++++++++++++++++
 meta-oe/recipes-support/neon/neon_0.37.1.bb   |  3 +-
 2 files changed, 33 insertions(+), 1 deletion(-)
 create mode 100644 meta-oe/recipes-support/neon/neon/0001-neon.vers-Drop-ne_sock_writev.patch
meta-oe/recipes-support/neon/neon/0001-neon.vers-Drop-ne_sock_writev.patch new file +31 -0
new file mode 100644
index 0000000000..94f63cf299
@@ -0,0 +1,31 @@
+From ef1f415170cfbb891a04af68852c9ea85c63d2c3 Mon Sep 17 00:00:00 2001
+From: Khem Raj <[email protected]>
+Date: Wed, 18 Nov 2026 01:52:06 -0800
+Subject: [PATCH] neon.vers: Drop ne_sock_writev
+
+There is no ne_sock_writev() function; the vectored write API is
+ne_sock_fullwritev(), which is already listed in the same version
+node. GNU ld silently ignores the stale entry, but lld defaults to
+--no-undefined-version and fails the link:
+
+  ld.lld: error: version script assignment of 'NEON_0_29' to symbol
+  'ne_sock_writev' failed: symbol not defined
+
+Upstream-Status: Submitted [https://github.com/notroj/neon/pull/255]
+Signed-off-by: Khem Raj <[email protected]>
+---
+ src/neon.vers | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/src/neon.vers b/src/neon.vers
+index c2a4dcb..ce5339a 100644
+--- a/src/neon.vers
++++ b/src/neon.vers
+@@ -3,7 +3,6 @@
+
+ NEON_0_29 {
+     ne_iaddr_raw;
+-    ne_sock_writev;
+     ne_sock_fullwritev;
+     ne_sock_set_error;
+     ne_sock_proxy;
meta-oe/recipes-support/neon/neon_0.37.1.bb +2 -1
index 53790e6ac2..0516ca9be7 100644
@@ -8,6 +8,7 @@ LIC_FILES_CHKSUM = "file://src/COPYING.LIB;md5=f30a9716ef3762e3467a2f62bf790f0a
 SRC_URI = "https://notroj.github.io/neon/neon-${PV}.tar.gz \
            file://pkgconfig.patch \
            file://0001-Disable-installing-documentation.patch \
+           file://0001-neon.vers-Drop-ne_sock_writev.patch \
            file://run-ptest \
            "
 
@@ -30,7 +31,7 @@ PACKAGECONFIG[openssl] = "--with-ssl=openssl,,openssl"
 PACKAGECONFIG[webdav] = "--enable-webdav,--disable-webdav,"
 PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
 
-EXTRA_OECONF += "--enable-shared --enable-threadsafe-ssl=posix"
+EXTRA_OECONF += "--enable-shared --enable-threadsafe-ssl=posix --enable-ld-version-script"
 
 do_configure:prepend() {
     echo "${PV}" > ${S}/.version