[Debian-med-packaging] Bug#1152222: gbwt FTCBFS: uses build architecture build tools

Helmut Grohne helmut at subdivi.de
Mon Oct 26 16:02:17 GMT 2026


Source: gbwt
Version: 1.6-1
Tags: patch
User: debian-cross at lists.debian.org
Usertags: ftcbfs

gbwt fails to cross build from source, because it hard codes build
architecture build tools such as g++ and pkg-config without a triplet
prefix. I'm attaching a combined upstream/debian patch to fix this.
Please consider applying it and forwarding the upstream portion.

Helmut
-------------- next part --------------
diff -Nru gbwt-1.6/debian/changelog gbwt-1.6/debian/changelog
--- gbwt-1.6/debian/changelog	2026-10-22 11:41:18.000000000 +0200
+++ gbwt-1.6/debian/changelog	2026-10-26 16:41:23.000000000 +0100
@@ -1,3 +1,10 @@
+gbwt (1.6-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Use host tools. (Closes: #-1)
+
+ -- Helmut Grohne <helmut at subdivi.de>  Mon, 26 Oct 2026 16:41:23 +0100
+
 gbwt (1.6-1) unstable; urgency=medium
 
   * Initial release. (Closes: #1151617)
diff -Nru gbwt-1.6/debian/patches/cross.patch gbwt-1.6/debian/patches/cross.patch
--- gbwt-1.6/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ gbwt-1.6/debian/patches/cross.patch	2026-10-26 16:41:23.000000000 +0100
@@ -0,0 +1,50 @@
+--- gbwt-1.6.orig/Makefile
++++ gbwt-1.6/Makefile
+@@ -3,6 +3,8 @@
+ BUILD_OBJ=obj
+ SOURCE_DIR=src
+ 
++PKG_CONFIG ?= pkg-config
++
+ # Multithreading with OpenMP.
+ PARALLEL_FLAGS=-fopenmp -pthread
+ 
+@@ -11,10 +13,10 @@
+ LIBS=-L$(LIB_DIR) -lsdsl
+ 
+ # Use pkg-config to find system dependencies.
+-ifeq ($(shell pkg-config --exists libzstd && echo 1), 1)
++ifeq ($(shell $(PKG_CONFIG) --exists libzstd && echo 1), 1)
+     $(info Found libzstd.)
+-    INCLUDES += $(shell pkg-config --cflags libzstd)
+-    LIBS += $(shell pkg-config --libs libzstd)
++    INCLUDES += $(shell $(PKG_CONFIG) --cflags libzstd)
++    LIBS += $(shell $(PKG_CONFIG) --libs libzstd)
+ else
+     $(error Could not find libzstd. Please update PKG_CONFIG_PATH to include zstd development files)
+ endif
+--- gbwt-1.6.orig/tests/Makefile
++++ gbwt-1.6/tests/Makefile
+@@ -1,6 +1,8 @@
+ MAIN_DIR=..
+ LIBRARY=$(MAIN_DIR)/lib/libgbwt.a
+ 
++PKG_CONFIG ?= pkg-config
++
+ # Multithreading with OpenMP.
+ PARALLEL_FLAGS=-fopenmp -pthread
+ 
+@@ -9,10 +11,10 @@
+ LIBS=-L$(LIB_DIR) -lsdsl -lgtest -lgtest_main
+ 
+ # Use pkg-config to find system dependencies.
+-ifeq ($(shell pkg-config --exists libzstd && echo 1), 1)
++ifeq ($(shell $(PKG_CONFIG) --exists libzstd && echo 1), 1)
+     $(info Found libzstd.)
+-    INCLUDES += $(shell pkg-config --cflags libzstd)
+-    LIBS += $(shell pkg-config --libs libzstd)
++    INCLUDES += $(shell $(PKG_CONFIG) --cflags libzstd)
++    LIBS += $(shell $(PKG_CONFIG) --libs libzstd)
+ else
+     $(error Could not find libzstd. Please update PKG_CONFIG_PATH to include zstd development files)
+ endif
diff -Nru gbwt-1.6/debian/patches/series gbwt-1.6/debian/patches/series
--- gbwt-1.6/debian/patches/series	2026-10-22 11:41:18.000000000 +0200
+++ gbwt-1.6/debian/patches/series	2026-10-26 16:40:41.000000000 +0100
@@ -1,3 +1,4 @@
 build_shared_library
 use_debian_sdsl
 add_ldflags_cppflags
+cross.patch
diff -Nru gbwt-1.6/debian/rules gbwt-1.6/debian/rules
--- gbwt-1.6/debian/rules	2026-10-22 11:41:18.000000000 +0200
+++ gbwt-1.6/debian/rules	2026-10-26 16:41:23.000000000 +0100
@@ -4,6 +4,8 @@
 export LC_ALL=C.UTF-8
 
 include /usr/share/dpkg/default.mk
+DPKG_EXPORT_BUILDTOOLS := 1
+include /usr/share/dpkg/buildtools.mk
 
 # for hardening you might like to uncomment this:
 export DEB_BUILD_MAINT_OPTIONS=hardening=+all
@@ -15,7 +17,7 @@
 	dh $@
 
 override_dh_auto_build:
-	dh_auto_build -- CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" MY_CXX=g++ INC_DIR=/usr/include LIB_DIR=/usr/lib
+	dh_auto_build -- CPPFLAGS="$(CPPFLAGS)" CXXFLAGS="$(CXXFLAGS)" LDFLAGS="$(LDFLAGS)" MY_CXX=$(CXX) INC_DIR=/usr/include LIB_DIR=/usr/lib
 
 execute_after_dh_install:
 	d-shlibmove --commit \


More information about the Debian-med-packaging mailing list