Source: skalibs
Version: 2.14.0.0-3
Tags: patch
User: debian-cr...@lists.debian.org
Usertags: ftcbfs

skalibs fails to cross build from source for multiple reasons. The
immediate failure is during the clean override that runs a bare
configure. Being bare, it is a native configure, but the environment
contains host compiler flags and the amd64 gcc doesn't particularly like
e.g. -mbranch-protection=standard as given on arm64. Hence, compiler
flags should be unset for a native invocation. Then the real configure
invocation misses the important --build and --host flags and it also
fails unless one tells it whether posixspawn works as expected. I'm
attaching a patch fixing all of these and it makes skalibs cross
buildable. Please consider applying it.

Helmut
diff --minimal -Nru skalibs-2.14.0.0/debian/changelog 
skalibs-2.14.0.0/debian/changelog
--- skalibs-2.14.0.0/debian/changelog   2023-11-08 08:20:50.000000000 +0100
+++ skalibs-2.14.0.0/debian/changelog   2024-02-18 12:25:33.000000000 +0100
@@ -1,3 +1,13 @@
+skalibs (2.14.0.0-3.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Do not pass host compiler flags to native configure during clean.
+    + Pass --build and --host to configure.
+    + Seed result of posixspawnearlyreturn: We do not work with old glibc.
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sun, 18 Feb 2024 12:25:33 +0100
+
 skalibs (2.14.0.0-3) unstable; urgency=medium
 
   * Fix building on arch:all
diff --minimal -Nru skalibs-2.14.0.0/debian/rules skalibs-2.14.0.0/debian/rules
--- skalibs-2.14.0.0/debian/rules       2023-11-08 08:20:50.000000000 +0100
+++ skalibs-2.14.0.0/debian/rules       2024-02-18 12:25:33.000000000 +0100
@@ -5,13 +5,14 @@
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 export LDFLAGS += -Wl,--fatal-warnings
 
+CONFIG_OPT += --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
 CONFIG_OPT += --dynlibdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 CONFIG_OPT += --libdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)
 CONFIG_OPT += --includedir=\$${prefix}/include/$(DEB_HOST_MULTIARCH)
 CONFIG_OPT += --sysdepdir=\$${prefix}/lib/$(DEB_HOST_MULTIARCH)/skalibs/sysdeps
 
 ifneq (,$(filter cross,$(DEB_BUILD_PROFILES)))
-CONFIG_OPT += --with-sysdep-devurandom=yes
+CONFIG_OPT += --with-sysdep-devurandom=yes 
--with-sysdep-posixspawnearlyreturn=no
 endif
 
 %:
@@ -19,7 +20,7 @@
 
 # `make distclean` needs config.mak file
 override_dh_auto_clean-arch:
-       ./configure
+       env -u CFLAGS -u CPPFLAGS -u CXXFLAGS -u LDFLAGS ./configure
        dh_auto_clean
 
 override_dh_auto_configure-arch:

Reply via email to