Article View: linux.debian.bugs.dist
Article #3318Bug#1153084: 0xffff FTCBFS: fails running mangen
From: Helmut Grohne
Date: Thu, 05 Nov 2026 09:30
Date: Thu, 05 Nov 2026 09:30
122 lines
6361 bytes
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--
Technical Details
Message-ID:
<NW1Xb-9XUD-21@gated-at.bofh.it>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomodShow Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!news.samoylyk.net!gothmog.csi.it!bofh.it!news.nic.it!robomod From: Helmut Grohne <helmut@subdivi.de> Newsgroups: linux.debian.bugs.dist Subject: Bug#1153084: 0xffff FTCBFS: fails running mangen Date: Thu, 05 Nov 2026 10:30:01 +0100 Message-ID: <NW1Xb-9XUD-21@gated-at.bofh.it> X-Original-To: Debian Bug Tracking System <submit@bugs.debian.org> X-Mailbox-Line: From debian-bugs-dist-request@lists.debian.org Thu Nov 5 09:29:11 2026 Old-Return-Path: <debbugs@buxtehude.debian.org> X-Spam-Flag: NO X-Spam-Score: -1.45 Reply-To: Helmut Grohne <helmut@subdivi.de>, 1153084@bugs.debian.org Resent-To: debian-bugs-dist@lists.debian.org Resent-Cc: sre@debian.org X-Debian-Pr-Message: report 1153084 X-Debian-Pr-Package: src:0xffff X-Debian-Pr-Keywords: patch X-Debian-Pr-Source: 0xffff MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="0KLpClHtMpOg9TFZ" Content-Disposition: inline X-Reportbug-Version: 13.2.0 X-Debian-Message: from BTS X-Mailing-List: <debian-bugs-dist@lists.debian.org> archive/latest/2000763 List-ID: <debian-bugs-dist.lists.debian.org> List-URL: <https://lists.debian.org/debian-bugs-dist/> Approved: robomod@news.nic.it Lines: 122 Organization: linux.* mail to news gateway Sender: robomod@news.nic.it X-Original-Date: Wed, 4 Nov 2026 07:02:35 +0100 X-Original-Message-ID: <20261104060235.GA3665126@subdivi.de>