🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.debian.bugs.dist
Article #3647

Bug#1153324: libowfat FTCBFS: multiple reasons

#3647
From: Helmut Grohne
Date: Sat, 07 Nov 2026 10:10
82 lines
4929 bytes
--TLdOjyeQ1QcPqT0v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

Source: libowfat
Version: 0.34-2
Tags: patch
User: debian-cross@lists.debian.org
Usertags: ftcbfs

libowfat fails to cross build from source. Initially, it looks like it
builds for the build architecture. The upstream GNUmakefile uses CC for
the build architecture compiler and CCC for the host architecture
compiler. debian/rules leaves CC at its default (good) and overrides CCC
with its own $(CC), which happens to be the build architecture compiler
as a make default. To get a cross compiler in debian/rules, one can
include buildtools.mk. This mostly fixes the cross build except that the
json tool cannot be compiled for amd64 and arm64. Unlike the ent tool,
there is no dedicated make rule for json. Therefore, the builtin rule is
picked up and combines $(CC) (a build architecture compiler from the
upstream build system's point of view) with $(CFLAGS) (host architecture
compiler flags) and this doesn't go well. I suggest adding a rule for
json similar to the one that already exists for ent without $(CFLAGS).
Once doing so, the cross build succeeds. I'm attaching a patch for your
convenience.

--TLdOjyeQ1QcPqT0v
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="libowfat_0.34-2.1.debdiff"

diff -Nru libowfat-0.34/debian/changelog libowfat-0.34/debian/changelog
--- libowfat-0.34/debian/changelog	2025-10-04 15:35:59.000000000 +0200
+++ libowfat-0.34/debian/changelog	2026-11-06 20:02:14.000000000 +0100
@@ -1,3 +1,12 @@
+libowfat (0.34-2.1) UNRELEASED; urgency=medium
+
+  * Non-maintainer upload.
+  * Fix FTCBFS: (Closes: #-1)
+    + Let dpkg's buildtools.mk initialize debian/rules' CC.
+    + cross.patch: Don't pass host flags for the json tool.
+
+ -- Helmut Grohne <helmut@subdivi.de>  Fri, 06 Nov 2026 20:02:14 +0100
+
 libowfat (0.34-2) unstable; urgency=medium
 
   * Simplify Makefile patch to build shared library
diff -Nru libowfat-0.34/debian/patches/cross.patch libowfat-0.34/debian/patches/cross.patch
--- libowfat-0.34/debian/patches/cross.patch	1970-01-01 01:00:00.000000000 +0100
+++ libowfat-0.34/debian/patches/cross.patch	2026-11-06 20:02:14.000000000 +0100
@@ -0,0 +1,11 @@
+--- libowfat-0.34.orig/GNUmakefile
++++ libowfat-0.34/GNUmakefile
+@@ -48,6 +48,8 @@
+ 
+ ent: ent.c haveuint128.h headers
+ 	$(CC) -g -o ent ent.c -I.
++json: json.c
++	$(CC) -g -o json json.c
+ 
+ # CFLAGS += -fstrict-aliasing -Wstrict-aliasing=2
+ 
diff -Nru libowfat-0.34/debian/patches/series libowfat-0.34/debian/patches/series
--- libowfat-0.34/debian/patches/series	2025-10-04 15:27:14.000000000 +0200
+++ libowfat-0.34/debian/patches/series	2026-11-06 20:02:14.000000000 +0100
@@ -8,3 +8,4 @@
 0008-buffer-export-missing-symbols.patch
 0009-fix-typos-in-man-pages.patch
 0010-GNUmakefile-do-not-override-CFLAGS.patch
+cross.patch
diff -Nru libowfat-0.34/debian/rules libowfat-0.34/debian/rules
--- libowfat-0.34/debian/rules	2025-10-04 15:29:42.000000000 +0200
+++ libowfat-0.34/debian/rules	2026-11-06 20:02:12.000000000 +0100
@@ -1,5 +1,6 @@
 #!/usr/bin/make -f
 
+include /usr/share/dpkg/buildtools.mk
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 DPKG_EXPORT_BUILDFLAGS = 1
 include /usr/share/dpkg/buildflags.mk

--TLdOjyeQ1QcPqT0v--
Technical Details
Message-ID: <NWLx0-an6Y-15@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!robomod

Show 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#1153324: libowfat FTCBFS: multiple reasons
Date: Sat, 07 Nov 2026 11:10:02 +0100
Message-ID: <NWLx0-an6Y-15@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  Sat Nov  7 10:03:16 2026
Old-Return-Path: <debbugs@buxtehude.debian.org>
X-Spam-Flag: NO
X-Spam-Score: -1.45
Reply-To: Helmut Grohne <helmut@subdivi.de>, 1153324@bugs.debian.org
Resent-To: debian-bugs-dist@lists.debian.org
Resent-Cc: gagath@debian.org
X-Debian-Pr-Message: report 1153324
X-Debian-Pr-Package: src:libowfat
X-Debian-Pr-Keywords: patch
X-Debian-Pr-Source: libowfat
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="TLdOjyeQ1QcPqT0v"
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/2001228
List-ID: <debian-bugs-dist.lists.debian.org>
List-URL: <https://lists.debian.org/debian-bugs-dist/>
Approved: robomod@news.nic.it
Lines: 82
Organization: linux.* mail to news gateway
Sender: robomod@news.nic.it
X-Original-Date: Fri, 6 Nov 2026 20:21:42 +0100
X-Original-Message-ID: <20261106192142.GA3726159@subdivi.de>