From e4e972fe54ebe4b59eb1cece162804153163b32f Mon Sep 17 00:00:00 2001 From: Khem Raj Date: Mon, 9 Nov 2026 08:42:14 -0800 Subject: [PATCH] dante: Fix build with lld getipnodebyname() and freehostent() are only interposed when the platform has getipnodebyname(), which glibc and musl do not, but they are always exported, so lld fails with: error: version script assignment of 'global' to symbol 'freehostent' failed: symbol not defined Only export them when configure finds getipnodebyname(). AI-Generated: Uses Claude Code Signed-off-by: Khem Raj --- ...pnodebyname-and-freehostent-where-th.patch | 39 +++++++++++++++++++ .../recipes-protocols/dante/dante_1.4.4.bb | 3 +- 2 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch diff --git a/meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch b/meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch new file mode 100644 index 0000000000..a00ef9ef8d --- /dev/null +++ b/meta-networking/recipes-protocols/dante/dante/0001-Only-export-getipnodebyname-and-freehostent-where-th.patch @@ -0,0 +1,39 @@ +From d873c1b2ddf6818e3f814ab7f9c1ae34fe3da847 Mon Sep 17 00:00:00 2001 +From: Khem Raj +Date: Mon, 9 Nov 2026 08:37:30 -0800 +Subject: [PATCH] Only export getipnodebyname and freehostent where they exist + +dlib only interposes getipnodebyname() and freehostent() when the +platform has getipnodebyname() (Solaris), but they are always listed in +the exported symbols, so with glibc linkers that check the version +script, like lld, fail with: + + error: version script assignment of 'global' to symbol 'freehostent' failed: symbol not defined + +Leave them out of the symbol list when getipnodebyname() is not found. + +Upstream-Status: Pending +Signed-off-by: Khem Raj +--- + mapfile.m4 | 8 +++++++- + 1 file changed, 7 insertions(+), 1 deletion(-) + +diff --git a/mapfile.m4 b/mapfile.m4 +index 644a94b..5daa801 100644 +--- a/mapfile.m4 ++++ b/mapfile.m4 +@@ -13,7 +13,13 @@ if test x"$sol64" = xt; then + PLDDIRS="$PLDDIRS dlib64/" + fi + for symdir in $PLDDIRS; do +- cat include/symbols_preload.txt >> $symdir/$MAPFILE ++ #getipnodebyname() and freehostent() are only interposed where they exist ++ if test x"$ac_cv_func_getipnodebyname" = xyes; then ++ cat include/symbols_preload.txt >> $symdir/$MAPFILE ++ else ++ grep -v -e '^freehostent$' -e '^getipnodebyname$' \ ++ include/symbols_preload.txt >> $symdir/$MAPFILE ++ fi + + #platform dependent symbols + case $host in diff --git a/meta-networking/recipes-protocols/dante/dante_1.4.4.bb b/meta-networking/recipes-protocols/dante/dante_1.4.4.bb index 6a1eed3edb..8554c4610f 100644 --- a/meta-networking/recipes-protocols/dante/dante_1.4.4.bb +++ b/meta-networking/recipes-protocols/dante/dante_1.4.4.bb @@ -12,7 +12,8 @@ LICENSE = "BSD-3-Clause" LIC_FILES_CHKSUM = "file://LICENSE;md5=b3a8e7dc09bb720460f28c9d3796afa5" SRC_URI = "https://www.inet.no/dante/files/dante-${PV}.tar.gz \ - " + file://0001-Only-export-getipnodebyname-and-freehostent-where-th.patch \ + " SRC_URI[sha256sum] = "1973c7732f1f9f0a4c0ccf2c1ce462c7c25060b25643ea90f9b98f53a813faec" # without --without-gssapi, config.log will contain reference to /usr/lib