🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: linux.debian.bugs.dist
1 messages
1 total messages Started by Helmut Grohne Thu, 05 Nov 2026 09:30
Bug#1153084: 0xffff FTCBFS: fails running mangen
#3318
Author: Helmut Grohne
Date: Thu, 05 Nov 2026 09:30
122 lines
6361 bytes
--0KLpClHtMpOg9TFZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: 0xffff
Version: 0.9-1
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs

0xffff fails to cross build from source, because it builds mangen with
the host architecture compiler and thus fails running it. The upstream
build system gets a lot right. It differentiates between CC and HOST_CC
and uses the latter for mangen. Unfortunately, dpkg/debhelper call that
thing CC_FOR_BUILD, so we need some renaming here. Additionally, the
upstream build system does not differentiate between flags of the
compilers, but on Debian the flags have become architecture-specific. So
we additionally need to set e.g. HOST_CFLAGS (upstream) as
CFLAGS_FOR_BUILD (Debian). The difference in nomenclature is
unfortunate, but not something to be fixed here. I'm attaching a patch
for your convenience. Can you try upstreaming the cross.patch?

Helmut

--0KLpClHtMpOg9TFZ
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="0xffff_0.9-1.1.debdiff"

diff -Nru 0xffff-0.9/debian/changelog 0xffff-0.9/debian/changelog
--- 0xffff-0.9/debian/changelog	2021-01-05 21:40:00.000000000 +0100
+++ 0xffff-0.9/debian/changelog	2026-11-03 22:55:10.000000000 +0100
@@ -1,3 +1,12 @@
+0xffff (0.9-1.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS:
+    + Pass HOST_* flags to make.
+    + cross.patch: Make additional HOST_* variables substitutable.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Tue, 03 Nov 2026 22:55:10 +0100
+
 0xffff (0.9-1) unstable; urgency=medium
 
   [ Debian Janitor ]
diff -Nru 0xffff-0.9/debian/patches/cross.patch 0xffff-0.9/debian/patches/cross.patch
--- 0xffff-0.9/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ 0xffff-0.9/debian/patches/cross.patch	2026-11-03 22:55:10.000000000 +0100
@@ -0,0 +1,46 @@
+--- 0xffff-0.9.orig/src/Makefile
++++ 0xffff-0.9/src/Makefile
+@@ -9,8 +9,11 @@
+ CROSS_CC ?= $(CROSS_COMPILE)$(CC)
+ HOST_CC ?= $(HOST_COMPILE)$(CC)
+ 
+-CPPFLAGS += -DVERSION=\"$(VERSION)\" -DBUILD_DATE="\"$(BUILD_DATE)\"" -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64
+-CFLAGS += -W -Wall -O2 -pedantic -std=c99
++EXTRA_CPPFLAGS = -DVERSION=\"$(VERSION)\" -DBUILD_DATE="\"$(BUILD_DATE)\"" -D_POSIX_C_SOURCE=200809L -D_FILE_OFFSET_BITS=64
++HOST_CPPFLAGS ?= $(CPPFLAGS)
++EXTRA_CFLAGS += -W -Wall -O2 -pedantic -std=c99
++HOST_CFLAGS ?= $(CFLAGS)
++HOST_LDFLAGS ?= $(LDFLAGS)
+ LIBS += -lusb -ldl
+ 
+ DEPENDS = Makefile ../config.mk
+@@ -22,10 +25,10 @@
+ all: $(BIN) $(BIN).1
+ 
+ $(BIN): $(OBJS) $(DEPENDS)
+-	$(CROSS_CC) $(CFLAGS) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS)
++	$(CROSS_CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -o $(BIN) $(OBJS) $(LIBS)
+ 
+ $(MANGEN): $(MANGEN).c $(DEPENDS)
+-	$(HOST_CC) $(CFLAGS) $(CPPFLAGS) $(LDFLAGS) -o $@ $<
++	$(HOST_CC) $(HOST_CFLAGS) $(EXTRA_CFLAGS) $(HOST_CPPFLAGS) $(EXTRA_CPPFLAGS) $(HOST_LDFLAGS) -o $@ $<
+ 
+ $(BIN).1: $(BIN) $(MANGEN) $(DEPENDS) ../doc/examples
+ 	./$(MANGEN) > $@.tmp
+@@ -33,13 +36,13 @@
+ 	mv $@.tmp $@
+ 
+ libusb-sniff-32.so: libusb-sniff.c $(DEPENDS)
+-	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC $< -ldl -shared -m32 -o $@
++	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -fPIC $< -ldl -shared -m32 -o $@
+ 
+ libusb-sniff-64.so: libusb-sniff.c $(DEPENDS)
+-	$(CC) $(CFLAGS) $(LDFLAGS) -fPIC $< -ldl -shared -m64 -o $@
++	$(CC) $(CFLAGS) $(EXTRA_CFLAGS) $(LDFLAGS) -fPIC $< -ldl -shared -m64 -o $@
+ 
+ %.o: %.c $(DEPENDS)
+-	$(CROSS_CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<
++	$(CROSS_CC) $(CFLAGS) $(EXTRA_CFLAGS) $(CPPFLAGS) $(EXTRA_CPPFLAGS) -c -o $@ $<
+ 
+ install: $(BIN) $(BIN).1
+ 	$(INSTALL) -D -m 755 $(BIN) $(DESTDIR)$(PREFIX)/bin/$(BIN)
diff -Nru 0xffff-0.9/debian/patches/series 0xffff-0.9/debian/patches/series
--- 0xffff-0.9/debian/patches/series	1970-01-01 01:00:00.000000000 +0100
+++ 0xffff-0.9/debian/patches/series	2026-11-03 22:55:10.000000000 +0100
@@ -0,0 +1 @@
+cross.patch
diff -Nru 0xffff-0.9/debian/rules 0xffff-0.9/debian/rules
--- 0xffff-0.9/debian/rules	2021-01-05 21:40:00.000000000 +0100
+++ 0xffff-0.9/debian/rules	2026-11-03 22:55:10.000000000 +0100
@@ -3,6 +3,7 @@
 DEB_BUILD_MAINT_OPTIONS = hardening=+bindnow
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk
+include /usr/share/dpkg/buildtools.mk
 include /usr/share/dpkg/pkg-info.mk
 
 export BUILD_DATE = $(shell LC_ALL=C date -u --date="@${SOURCE_DATE_EPOCH}" +'%b %e %Y')
@@ -10,5 +11,8 @@
 %:
 	dh $@
 
+override_dh_auto_build:
+	dh_auto_build -- HOST_CC='$(CC_FOR_BUILD)' HOST_CFLAGS='$(CFLAGS_FOR_BUILD)' HOST_CPPFLAGS='$(CPPFLAGS_FOR_BUILD)'
+
 override_dh_auto_install:
 	dh_auto_install -- PREFIX=/usr

--0KLpClHtMpOg9TFZ--
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads