Package: knot
Version: 3.0.5-1
Severity: serious
Tags: patch ftbfs
Justification: fails to build from source (but built successfully in the past)
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu  ubuntu-patch
X-Debbugs-Cc: sl...@ubuntu.com

Dear Maintainer,

knot fails to build from source with newer autotools:


libtool: link: gcc -g -O2 -ffile-prefix-map=/<<PKGBUILDDIR>>=. -flto=auto 
-ffat-lto-objects -fstack-protector-strong -Wformat -Werror=format-security 
-Wall -DNDEBUG -Wall -Wshadow -Werror=format-security -Werror=implicit 
-Werror=attributes -Wstrict-prototypes -Wl,-Bsymbolic-functions -flto=auto 
-Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--as-needed -o .libs/kxdpgun 
utils/kxdpgun/kxdpgun-load_queries.o utils/kxdpgun/kxdpgun-main.o 
utils/kxdpgun/kxdpgun-popenve.o none required  ./.libs/libcontrib.a 
./.libs/libknot.so -lcap-ng
/usr/bin/ld: cannot find none: No such file or directory
/usr/bin/ld: cannot find required: No such file or directory
collect2: error: ld returned 1 exit status
make[4]: *** [Makefile:3354: kxdpgun] Error 1


The problem was fixed upstream:
https://gitlab.nic.cz/knot/knot-dns/-/commit/70dc4a5c85b65678662854c18a3475371ef4a8eb

In Ubuntu, the attached patch was applied to achieve the following:

  * Fix FTBFS with new automake, using upstream commit
    + debian/patches/70dc4a5c85b65678662854c18a3475371ef4a8eb.patch


Thanks for considering the patch.

Cheers,
  Lukas

-- System Information:
Debian Release: 11.0
  APT prefers impish
  APT policy: (500, 'impish')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 5.13.0-16-generic (SMP w/4 CPU threads)
Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_WARN, TAINT_OOT_MODULE
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8), 
LANGUAGE=de_DE:en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled
diff -Nru 
knot-3.0.5/debian/patches/70dc4a5c85b65678662854c18a3475371ef4a8eb.patch 
knot-3.0.5/debian/patches/70dc4a5c85b65678662854c18a3475371ef4a8eb.patch
--- knot-3.0.5/debian/patches/70dc4a5c85b65678662854c18a3475371ef4a8eb.patch    
1970-01-01 01:00:00.000000000 +0100
+++ knot-3.0.5/debian/patches/70dc4a5c85b65678662854c18a3475371ef4a8eb.patch    
2021-10-15 15:14:17.000000000 +0200
@@ -0,0 +1,60 @@
+From 70dc4a5c85b65678662854c18a3475371ef4a8eb Mon Sep 17 00:00:00 2001
+From: Daniel Salzman <daniel.salz...@nic.cz>
+Date: Wed, 14 Jul 2021 14:29:13 +0200
+Subject: [PATCH] configure: fix AC_SEARCH_LIBS usage if the result is cached
+ with value 'none required'
+
+---
+ configure.ac | 14 +++++++++-----
+ 1 file changed, 9 insertions(+), 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 0d3552045..c8f1f4548 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -613,9 +613,10 @@ AS_IF([test "$enable_cap_ng" != "no"],[
+     AC_CHECK_HEADER([cap-ng.h], [
+       save_LIBS="$LIBS"
+       AC_SEARCH_LIBS([capng_apply], [cap-ng], [
+-        enable_cap_ng=yes
+-        cap_ng_LIBS="$ac_cv_search_capng_apply"
++        AS_IF([test "$ac_cv_search_capng_apply" != "none required"],
++          [cap_ng_LIBS="$ac_cv_search_capng_apply"], [cap_ng_LIBS=])
+         AC_SUBST([cap_ng_LIBS])
++        enable_cap_ng=yes
+       ])
+       LIBS="$save_LIBS"
+     ])
+@@ -631,7 +632,8 @@ AS_IF([test "$enable_cap_ng" = yes],
+ 
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS([pthread_create], [pthread], [
+-  pthread_LIBS="$ac_cv_search_pthread_create"
++  AS_IF([test "$ac_cv_search_pthread_create" != "none required"],
++    [pthread_LIBS="$ac_cv_search_pthread_create"], [pthread_LIBS=])
+   AC_SUBST([pthread_LIBS])
+ ],[
+   AC_MSG_ERROR([pthreads not found])
+@@ -640,7 +642,8 @@ LIBS="$save_LIBS"
+ 
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS([dlopen], [dl], [
+-  dlopen_LIBS="$ac_cv_search_dlopen"
++  AS_IF([test "$ac_cv_search_dlopen" != "none required"],
++    [dlopen_LIBS="$ac_cv_search_dlopen"], [dlopen_LIBS=])
+   AC_SUBST([dlopen_LIBS])
+ ],[
+   AC_MSG_ERROR([dlopen not found])
+@@ -649,7 +652,8 @@ LIBS="$save_LIBS"
+ 
+ save_LIBS="$LIBS"
+ AC_SEARCH_LIBS([pow], [m], [
+-  math_LIBS="$ac_cv_search_pow"
++  AS_IF([test "$ac_cv_search_pow" != "none required"],
++    [math_LIBS="$ac_cv_search_pow"], [math_LIBS=])
+   AC_SUBST([math_LIBS])
+ ],[
+   AC_MSG_ERROR([math not found])
+-- 
+GitLab
+
diff -Nru knot-3.0.5/debian/patches/series knot-3.0.5/debian/patches/series
--- knot-3.0.5/debian/patches/series    1970-01-01 01:00:00.000000000 +0100
+++ knot-3.0.5/debian/patches/series    2021-10-15 15:14:17.000000000 +0200
@@ -0,0 +1 @@
+70dc4a5c85b65678662854c18a3475371ef4a8eb.patch

Reply via email to