#1153324 libowfat FTCBFS: multiple reasons

#1153324#5
Date:
2026-11-06 19:21:42 UTC
From:
To:
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.