[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#1124709: lsp-plugins FTCBFS for some architectures



Source: lsp-plugins
Version: 1.2.26-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs

Thanks for applying my earlier cross build patch. This made lsp-plugins
cross build for some architectures such as armhf and arm64. It still
fails e.g. for ppc64el, riscv64 and s390x. The reason is that
debian/rules only assigns an ARCHITECTURE value for some architectures
and for the other ones the autodetection selects the build architecture.
Initializing ARCHITECTURE (which defaults to uname -m) with
DEB_HOST_GNU_CPU is a relatively good approximation given the matching
in the upstream build system and the special cases in debian/rules.

While at it, I also fixed a bit of host vs target confusion and removed
a bit of unnecessary shell usage. You'll find it all in the attached
patch. I tested the cross build for all release architectures now.

Helmut
diff -Nru lsp-plugins-1.2.26/debian/changelog lsp-plugins-1.2.26/debian/changelog
--- lsp-plugins-1.2.26/debian/changelog	2025-12-26 14:52:18.000000000 +0100
+++ lsp-plugins-1.2.26/debian/changelog	2026-01-03 09:39:52.000000000 +0100
@@ -1,3 +1,12 @@
+lsp-plugins (1.2.26-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: Always export ARCHITECTURE. (Closes: #-1)
+  * Fix host vs target confusion.
+  * Avoid use of shell in d/rules.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Sat, 03 Jan 2026 09:39:52 +0100
+
 lsp-plugins (1.2.26-1) unstable; urgency=medium
 
   * Team upload
diff -Nru lsp-plugins-1.2.26/debian/rules lsp-plugins-1.2.26/debian/rules
--- lsp-plugins-1.2.26/debian/rules	2025-12-26 13:25:12.000000000 +0100
+++ lsp-plugins-1.2.26/debian/rules	2026-01-03 09:39:52.000000000 +0100
@@ -6,34 +6,34 @@
 
 export VERBOSE=1
 
-noatomicarch = $(shell dpkg-architecture -qDEB_HOST_ARCH | egrep -x "(armel|powerpc|powerpcspe|m68k|mips|mipsel|sh4|riscv64)")
 # link with libatomic on architectures without built-in atomic
-ifeq ($(if $(noatomicarch),atomic), atomic)
+ifneq (,$(filter $(DEB_HOST_ARCH),armel powerpc powerpcspe m68k mips mipsel sh4 riscv64))
         LIBS += -latomic
 endif
 
-ifeq ($(DEB_TARGET_ARCH),armel)
+ARCHITECTURE=$(DEB_HOST_GNU_CPU)
+
+ifeq ($(DEB_HOST_ARCH),armel)
 	ARCHITECTURE=arm32
-	ARCHITECTURE_FAMILY=generic
 	ARCHITECTURE_CFLAGS='-march=armv5t -marm'
 endif
 
-ifeq ($(DEB_TARGET_ARCH),armhf)
+ifeq ($(DEB_HOST_ARCH),armhf)
 	ARCHITECTURE=armhf
 	ARCHITECTURE_CFLAGS='-march=armv7-a+fp -marm'
 endif
 
-ifeq ($(DEB_TARGET_ARCH),arm64)
+ifeq ($(DEB_HOST_ARCH),arm64)
 	ARCHITECTURE=aarch64
 	ARCHITECTURE_CFLAGS='-march=armv8-a'
 endif
 
-ifeq ($(DEB_TARGET_ARCH),i386)
+ifeq ($(DEB_HOST_ARCH),i386)
 	ARCHITECTURE=i586
 	ARCHITECTURE_CFLAGS='-march=i586 -m32'
 endif
 
-ifeq ($(DEB_TARGET_ARCH),x32)
+ifeq ($(DEB_HOST_ARCH),x32)
 	ARCHITECTURE=i586
 	ARCHITECTURE_CFLAGS='-march=i586 -m32'
 endif

Reply to: