Source: binfmtc
Version: 0.17-2
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

binfmtc fails to cross build from source, because it configures for the
build architecture. The easiest way of passing the relevant --host flag
is using dh_auto_configure. Even then, the build fails during
installation as the packaging passes -s to install and it uses the build
architecture strip by default. Beyond breaking cross compilation, this
also breaks generation of -dbgsym packages. dh_strip already takes care
of stripping and handling DEB_BUILD_OPTIONS=nostrip. Simply skipping it
at the installation phase is the way to go. Please consider applying the
attached patch to fix all mentioned issues.

Helmut
diff -u binfmtc-0.17/debian/changelog binfmtc-0.17/debian/changelog
--- binfmtc-0.17/debian/changelog
+++ binfmtc-0.17/debian/changelog
@@ -1,3 +1,12 @@
+binfmtc (0.17-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dh_auto_configure pass --host to ./configure.
+    + Defer stripping to dh_strip.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Thu, 10 Sep 2020 22:24:22 +0200
+
 binfmtc (0.17-2) unstable; urgency=medium
 
   * Update debheper compat level 9, and check with debdiff.
diff -u binfmtc-0.17/debian/rules binfmtc-0.17/debian/rules
--- binfmtc-0.17/debian/rules
+++ binfmtc-0.17/debian/rules
@@ -17,16 +17,12 @@
 else
 CFLAGS += -O2
 endif
-ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
-INSTALL_PROGRAM += -s
-endif
-
 
 configure: configure-stamp
 configure-stamp:
        dh_testdir
        INSTALL_PROGRAM='${INSTALL_PROGRAM}' CFLAGS='${CFLAGS}' \
-        ./configure --prefix=/usr --mandir=/usr/share/man
+        dh_auto_configure
        touch configure-stamp
 
 build: build-stamp

Reply via email to