Bug#1070125: dmucs FTCBFS: uses the build architecture compiler
Source: dmucs
Version: 0.6.1+dfsg-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs
dmucs fails to cross build from source, because it uses the build
architecture compiler. override_dh_auto_configure now invokes
./configure without passing --host and hence configure uses the wrong
compiler. Moreover, the upstream build system fails to forward the
detected compiler to the COSMIC subdirectory. I'm attaching a patch to
fix both for your convenience.
Helmut
diff -Nru dmucs-0.6.1+dfsg/debian/changelog dmucs-0.6.1+dfsg/debian/changelog
--- dmucs-0.6.1+dfsg/debian/changelog 2024-04-22 02:19:52.000000000 +0200
+++ dmucs-0.6.1+dfsg/debian/changelog 2024-04-30 13:31:33.000000000 +0200
@@ -1,3 +1,11 @@
+dmucs (0.6.1+dfsg-2) UNRELEASED; urgency=medium
+
+ * Fix FTCBFS: (Closes: #-1)
+ + Pass --host to configure.
+ + cross.patch: Forward CC to COSMIC subdir.
+
+ -- Helmut Grohne <helmut@subdivi.de> Tue, 30 Apr 2024 13:31:33 +0200
+
dmucs (0.6.1+dfsg-1) unstable; urgency=medium
* QA upload.
diff -Nru dmucs-0.6.1+dfsg/debian/patches/cross.patch dmucs-0.6.1+dfsg/debian/patches/cross.patch
--- dmucs-0.6.1+dfsg/debian/patches/cross.patch 1970-01-01 01:00:00.000000000 +0100
+++ dmucs-0.6.1+dfsg/debian/patches/cross.patch 2024-04-30 13:31:33.000000000 +0200
@@ -0,0 +1,19 @@
+--- dmucs-0.6.1+dfsg.orig/COSMIC/Makefile
++++ dmucs-0.6.1+dfsg/COSMIC/Makefile
+@@ -29,7 +29,7 @@
+ # One may also start up the PortMaster (Spm -f firewallfilename).
+ # Please read the documentation on this.
+
+-CC = cc
++CC ?= cc
+
+ OBJ = Saccept.o Sprintf.o Stest.o outofmem.o \
+ Sclose.o Sprtskt.o Stimeoutwait.o rdcolor.o \
+--- dmucs-0.6.1+dfsg.orig/Makefile.am
++++ dmucs-0.6.1+dfsg/Makefile.am
+@@ -1,3 +1,5 @@
++export CC
++
+ SUBDIRS = COSMIC
+
+ bin_PROGRAMS = gethost loadavg monitor remhost
diff -Nru dmucs-0.6.1+dfsg/debian/patches/series dmucs-0.6.1+dfsg/debian/patches/series
--- dmucs-0.6.1+dfsg/debian/patches/series 2024-04-20 05:31:05.000000000 +0200
+++ dmucs-0.6.1+dfsg/debian/patches/series 2024-04-30 13:31:33.000000000 +0200
@@ -3,3 +3,4 @@
03_gcc-7.patch
40_reproducible.patch
50_fix-FTBS-GCC-13.patch
+cross.patch
diff -Nru dmucs-0.6.1+dfsg/debian/rules dmucs-0.6.1+dfsg/debian/rules
--- dmucs-0.6.1+dfsg/debian/rules 2024-04-22 02:09:44.000000000 +0200
+++ dmucs-0.6.1+dfsg/debian/rules 2024-04-30 13:31:30.000000000 +0200
@@ -3,11 +3,13 @@
export DEB_BUILD_MAINT_OPTIONS = hardening=+all
export DEB_CFLAGS_MAINT_APPEND = -Wall
+include /usr/share/dpkg/architecture.mk
+
override_dh_auto_install:
cp -a remhost addhost
override_dh_auto_configure:
- ./configure
+ ./configure --build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE)
override_dh_clean:
dh_clean
Reply to: