package/bind: fix compile/linking failure
authorPeter Seiderer <ps.report@gmx.net>
Mon, 14 Dec 2020 22:24:07 +0000 (23:24 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Wed, 23 Dec 2020 13:24:08 +0000 (14:24 +0100)
Fixes:

  - http://autobuild.buildroot.net/results/966a3de94aa97fa8e9895eede29c9cbfb4bd7301

  .../host/lib/gcc/arm-buildroot-linux-musleabihf/9.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: warning: libisccfg.so.163, needed by ../../lib/bind9/.libs/libbind9.so, not found (try using -rpath or -rpath-link)
  .../host/lib/gcc/arm-buildroot-linux-musleabihf/9.3.0/../../../../arm-buildroot-linux-musleabihf/bin/ld: ../../lib/bind9/.libs/libbind9.so: undefined reference to `cfg_obj_line'

Signed-off-by: Peter Seiderer <ps.report@gmx.net>
[Peter: replace by upstream patches]
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
package/bind/0002-update-link-order-of-libbind9.patch [new file with mode: 0644]
package/bind/0003-fix-LIB0-for-isc-hmac-fixup-and-named-nzd2nzf.patch [new file with mode: 0644]
package/bind/0004-Handle-shared-library-platforms-that-don-t-support-i.patch [new file with mode: 0644]

diff --git a/package/bind/0002-update-link-order-of-libbind9.patch b/package/bind/0002-update-link-order-of-libbind9.patch
new file mode 100644 (file)
index 0000000..32c0776
--- /dev/null
@@ -0,0 +1,26 @@
+From f63b2d8fbd010d60f2a07f4f69b11d7a10c48ae5 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 15 Dec 2020 12:07:03 +1100
+Subject: [PATCH] update link order of libbind9
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ lib/bind9/Makefile.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/lib/bind9/Makefile.in b/lib/bind9/Makefile.in
+index 2634451b15..704259dde1 100644
+--- a/lib/bind9/Makefile.in
++++ b/lib/bind9/Makefile.in
+@@ -61,7 +61,7 @@ libbind9.la: ${OBJS} ${ISCCFGDEPLIBS} ${ISCDEPLIBS} ${DNSDEPLIBS}
+       ${LIBTOOL_MODE_LINK} \
+               ${CC} ${ALL_CFLAGS} ${LDFLAGS} -o libbind9.la -rpath ${libdir} \
+               -version-info ${LIBINTERFACE}:${LIBREVISION}:${LIBAGE} \
+-              ${OBJS} ${DNSLIBS} ${ISCCFGLIBS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ \
++              ${OBJS} ${ISCCFGLIBS} ${DNSLIBS} ${ISCLIBS} @DNS_CRYPTO_LIBS@ \
+               ${LIBS}
+ timestamp: libbind9.@A@
+-- 
+2.20.1
+
diff --git a/package/bind/0003-fix-LIB0-for-isc-hmac-fixup-and-named-nzd2nzf.patch b/package/bind/0003-fix-LIB0-for-isc-hmac-fixup-and-named-nzd2nzf.patch
new file mode 100644 (file)
index 0000000..92573f1
--- /dev/null
@@ -0,0 +1,38 @@
+From d744db22f3f0b1fa604517e4414c54531d98eb87 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 15 Dec 2020 12:16:37 +1100
+Subject: [PATCH] fix LIB0 for isc-hmac-fixup and named-nzd2nzf
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ bin/tools/Makefile.in | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in
+index b12f80a334..6f984f121a 100644
+--- a/bin/tools/Makefile.in
++++ b/bin/tools/Makefile.in
+@@ -87,7 +87,7 @@ nsec3hash@EXEEXT@: nsec3hash.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
+ isc-hmac-fixup@EXEEXT@: isc-hmac-fixup.@O@ ${ISCDEPLIBS}
+       export BASEOBJS="isc-hmac-fixup.@O@"; \
+-      export LIBS0="${ISCLIBS}"; \
++      export LIBS0=""; \
+       ${FINALBUILDCMD}
+ genrandom@EXEEXT@: genrandom.@O@
+@@ -104,9 +104,9 @@ dnstap-read@EXEEXT@: dnstap-read.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
+       export LIBS0="${DNSLIBS}"; \
+       ${FINALBUILDCMD}
+-named-nzd2nzf@EXEEXT@: named-nzd2nzf.@O@ ${NZDDEPLIBS}
++named-nzd2nzf@EXEEXT@: named-nzd2nzf.@O@ ${ISCDEPLIBS}
+       export BASEOBJS="named-nzd2nzf.@O@"; \
+-      export LIBS0="${ISCCFGLIBS} ${ISCCCLIBS} ${BIND9LIBS} ${DNSLIBS}"; \
++      export LIBS0=""; \
+       ${FINALBUILDCMD}
+ doc man:: ${MANOBJS}
+-- 
+2.20.1
+
diff --git a/package/bind/0004-Handle-shared-library-platforms-that-don-t-support-i.patch b/package/bind/0004-Handle-shared-library-platforms-that-don-t-support-i.patch
new file mode 100644 (file)
index 0000000..3e00e41
--- /dev/null
@@ -0,0 +1,30 @@
+From 5cec1ba2fa2f18e9d9e926eab923e0b1b7b8d226 Mon Sep 17 00:00:00 2001
+From: Mark Andrews <marka@isc.org>
+Date: Tue, 15 Dec 2020 19:18:41 +1100
+Subject: [PATCH] Handle shared library platforms that don't support inter
+ library dependancies
+
+Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
+---
+ bin/tools/Makefile.in | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/bin/tools/Makefile.in b/bin/tools/Makefile.in
+index 6f984f121a..d34bac1192 100644
+--- a/bin/tools/Makefile.in
++++ b/bin/tools/Makefile.in
+@@ -94,9 +94,9 @@ genrandom@EXEEXT@: genrandom.@O@
+       ${LIBTOOL_MODE_LINK} ${PURIFY} ${CC} ${CFLAGS} ${LDFLAGS} \
+               -o $@ genrandom.@O@ @GENRANDOMLIB@ ${LIBS}
+-mdig@EXEEXT@: mdig.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS}
++mdig@EXEEXT@: mdig.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS} ${BIND9DEPLIBS} ${ISCCFGDEPLIBS}
+       export BASEOBJS="mdig.@O@"; \
+-      export LIBS0="${DNSLIBS} ${BIND9LIBS}"; \
++      export LIBS0="${BIND9LIBS} ${ISCCFGLIBS} ${DNSLIBS}"; \
+       ${FINALBUILDCMD}
+ dnstap-read@EXEEXT@: dnstap-read.@O@ ${ISCDEPLIBS} ${DNSDEPLIBS}
+-- 
+2.20.1
+