Source: libzstd
Version: 1.5.2+dfsg2-2
Severity: important
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

libzstd fails to cross build from source, because it detects a change in
build environment during dh_auto_install, changes its build directory
and starts the build from scratch. That change is due to dh_auto_install
not supplying a cross compiler. I propose just exporting it for all
targets from dpkg's buildtools.mk and attach a patch for your
convenience.

Helmut
diff -Nru libzstd-1.5.2+dfsg2/debian/changelog 
libzstd-1.5.2+dfsg2/debian/changelog
--- libzstd-1.5.2+dfsg2/debian/changelog        2022-12-27 21:54:45.000000000 
+0100
+++ libzstd-1.5.2+dfsg2/debian/changelog        2022-12-28 08:30:35.000000000 
+0100
@@ -1,3 +1,10 @@
+libzstd (1.5.2+dfsg2-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Export build tools for all targets. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Wed, 28 Dec 2022 08:30:35 +0100
+
 libzstd (1.5.2+dfsg2-2) unstable; urgency=medium
 
   * Fix a FTBFS on i386 (and on any arch where DEB_HOST_MULTIARCH is not
diff -Nru libzstd-1.5.2+dfsg2/debian/rules libzstd-1.5.2+dfsg2/debian/rules
--- libzstd-1.5.2+dfsg2/debian/rules    2022-12-27 21:47:36.000000000 +0100
+++ libzstd-1.5.2+dfsg2/debian/rules    2022-12-28 08:30:34.000000000 +0100
@@ -1,5 +1,9 @@
 #!/usr/bin/make -f
 
+# Export build tools for all targets to avoid build hash changes.
+DPKG_EXPORT_BUILDTOOLS=1
+include /usr/share/dpkg/buildtools.mk
+
 export DH_VERBOSE=1
 
 arch ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)

Reply via email to