Source: libidn2
Version: 2.3.8-1
Severity: important
Justification: architecture cross bootstrap regression
Tags: patch
User: [email protected]
Usertags: ftcbfs
User: [email protected]
Usertags: rebootstrap

Hi Simon,

thanks for your work on ensuring that all build artifacts are properly
rebuilt during a package build. Unfortunately, the cross builds formerly
relied on those semantics and reused pre-generated e.g. lib/data.c and
doc/idn2.1. Now that they get rebuilt, it becomes apparent how the
upstream build system does not support cross building these artifacts.
Rather than fix it, I suggest adding a native build pass and copying the
relevant artifacts between the build folders. Does that work for you?
Patch attached.

Helmut
diff --minimal -Nru libidn2-2.3.8/debian/changelog 
libidn2-2.3.8/debian/changelog
--- libidn2-2.3.8/debian/changelog      2025-03-09 14:29:37.000000000 +0100
+++ libidn2-2.3.8/debian/changelog      2025-03-14 09:32:53.000000000 +0100
@@ -1,3 +1,10 @@
+libidn2 (2.3.8-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Perform a native build pass for generated files. (Closes: #-1)
+
+ -- Helmut Grohne <[email protected]>  Fri, 14 Mar 2025 09:32:53 +0100
+
 libidn2 (2.3.8-1) unstable; urgency=medium
 
   * watch: Look for git-archive source tarball instead.
diff --minimal -Nru libidn2-2.3.8/debian/clean libidn2-2.3.8/debian/clean
--- libidn2-2.3.8/debian/clean  1970-01-01 01:00:00.000000000 +0100
+++ libidn2-2.3.8/debian/clean  2025-03-14 09:32:53.000000000 +0100
@@ -0,0 +1 @@
+build-native
diff --minimal -Nru libidn2-2.3.8/debian/rules libidn2-2.3.8/debian/rules
--- libidn2-2.3.8/debian/rules  2025-03-09 12:54:15.000000000 +0100
+++ libidn2-2.3.8/debian/rules  2025-03-14 09:32:53.000000000 +0100
@@ -1,5 +1,6 @@
 #! /usr/bin/make -f
 
+include /usr/share/dpkg/architecture.mk
 include /usr/share/dpkg/pkg-info.mk
 include /usr/share/gnulib/debian/gnulib-dpkg.mk
 
@@ -17,6 +18,13 @@
        ./bootstrap --gnulib-srcdir=$(GNULIB_DEB_DEBIAN_GNULIB) --gen
 
 execute_before_dh_auto_configure: dh_gnulib_clone pull dh_gnulib_patch gen
+ifneq ($(DEB_BUILD_ARCH),$(DEB_HOST_ARCH))
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_configure 
--reload-all-buildenv-variables --builddirectory=build-native -- 
--disable-gtk-doc
+       dpkg-architecture -a$(DEB_BUILD_ARCH) -f -c dh_auto_build 
--builddirectory=build-native
+       mkdir -p build/lib build/doc
+       cp build-native/lib/data.c build-native/lib/tr46map_data.c build/lib/
+       cp build-native/doc/idn2.1 build-native/doc/idn2-help.texi build/doc/
+endif
 
 CONFIGURE_FLAGS = \
        --disable-rpath \
  • Bug... Helmut Grohne
    • ... Discussion list for GNU Internationalized Domain Name library (Libidn)
    • ... Debian Bug Tracking System
    • ... Discussion list for GNU Internationalized Domain Name library (Libidn)

Reply via email to