Source: isc-dhcp
Version: 4.4.3-2.1
Tags: patch
User: [email protected]
Usertags: ftcbfs

isc-dhcp fails to cross build from source, because it uses the build
architecture compiler for embedded bind build. This is difficult to
observe, because the complete build log for the bind build (including
configure output and all compiler invocation) is hidden from the build
log (which violates a Debian policy should). Consider making the build
verbose by default. In any case, I'm attaching a patch to fix the
compiler for your convenience.

Helmut
diff --minimal -Nru isc-dhcp-4.4.3-P1/debian/changelog 
isc-dhcp-4.4.3-P1/debian/changelog
--- isc-dhcp-4.4.3-P1/debian/changelog  2022-10-13 14:12:54.000000000 +0200
+++ isc-dhcp-4.4.3-P1/debian/changelog  2022-11-16 08:13:20.000000000 +0100
@@ -1,3 +1,12 @@
+isc-dhcp (4.4.3-P1-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + cross.patch: forward build/host/CC to inner configure
+    + export BUILD_CC for bind build
+
+ -- Helmut Grohne <[email protected]>  Wed, 16 Nov 2022 08:13:20 +0100
+
 isc-dhcp (4.4.3-P1-1) unstable; urgency=low
 
   * New upstream version 4.4.3-P1
diff --minimal -Nru isc-dhcp-4.4.3-P1/debian/patches/cross.patch 
isc-dhcp-4.4.3-P1/debian/patches/cross.patch
--- isc-dhcp-4.4.3-P1/debian/patches/cross.patch        1970-01-01 
01:00:00.000000000 +0100
+++ isc-dhcp-4.4.3-P1/debian/patches/cross.patch        2022-11-16 
08:13:20.000000000 +0100
@@ -0,0 +1,20 @@
+--- isc-dhcp-4.4.3-P1.orig/bind/Makefile.in
++++ isc-dhcp-4.4.3-P1/bind/Makefile.in
+@@ -21,14 +21,15 @@
+ prefix = @prefix@
+ exec_prefix = @exec_prefix@
+ 
+-bindconfig = --without-openssl --without-libxml2 --without-libjson \
++bindconfig = --build=@build_alias@ --host=@host_alias@ CC=@CC@ \
++      --without-openssl --without-libxml2 --without-libjson \
+       --without-gssapi --disable-threads --without-lmdb \
+       --includedir=@includedir@ --libdir=@libdir@  --without-python\
+       @BINDLT@ @BINDIOMUX@ @BINDCONFIG@ --enable-full-report
+ 
+ @BIND_ATF_FALSE@cleandirs = ./lib ./include
+ @BIND_ATF_TRUE@cleandirs = ./lib ./include ./atf
+-cleanfiles = ./configure.log ./build.log ./install.log
++cleanfiles = /configure.log ./build.log ./install.log
+ 
+ bindlibs = isc dns isccfg irs
+ installdirs = includedir=${binddir}/include libdir=${binddir}/lib
diff --minimal -Nru isc-dhcp-4.4.3-P1/debian/patches/series 
isc-dhcp-4.4.3-P1/debian/patches/series
--- isc-dhcp-4.4.3-P1/debian/patches/series     2022-10-13 10:43:53.000000000 
+0200
+++ isc-dhcp-4.4.3-P1/debian/patches/series     2022-11-16 08:12:42.000000000 
+0100
@@ -17,3 +17,4 @@
 
 configure.patch
 
+cross.patch
diff --minimal -Nru isc-dhcp-4.4.3-P1/debian/rules 
isc-dhcp-4.4.3-P1/debian/rules
--- isc-dhcp-4.4.3-P1/debian/rules      2022-05-30 12:23:10.000000000 +0200
+++ isc-dhcp-4.4.3-P1/debian/rules      2022-11-16 08:13:20.000000000 +0100
@@ -25,9 +25,11 @@
 
 CONFFLAGS+=--prefix=/usr --enable-log-pid --enable-paranoia
 
+include /usr/share/dpkg/buildtools.mk
 # cross-architecture building
 ifneq ($(DEB_HOST_GNU_TYPE),$(DEB_BUILD_GNU_TYPE))
 CONFFLAGS+=--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) 
--with-randomdev=/dev/random
+export BUILD_CC=$(CC_FOR_BUILD)
 endif
 
 # hurd support

Reply via email to