Package: apr
Tags: ftbfs, hppa, lfs
Version: 1.7.2-2
On 32-bit platforms it's necessary to compile programs and libraries
with Large File Support (LFS) in order to allow them to function correctly on
filesystems with > 2GB or 4GB size.
This can be solved by adding "-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64" to
the CFLAGS variable when compiling.
apr is currently missing this LFS support and as such it triggers
build-from-source errors in other packages like "subversion" or "devscripts"
on such 32-bit platforms.
There are various possibilities how to add those two defines,
e.g. adding
DEB_BUILD_MAINT_OPTIONS = future=+lfs
or by manually adding the output of
getconf LFS_CFLAGS
to the CFLAGS variable. Please note, on 64-bit platforms the return value
will be empty which is correct as those flags are not needed on 64-bit arches.
Here is one suggested patch for apr from me:
diff -up ./debian/rules.org ./debian/rules
--- ./debian/rules.org 2023-02-10 16:20:07.911340588 +
+++ ./debian/rules 2023-02-10 15:54:17.992511554 +
@@ -11,6 +11,9 @@ DEB_HOST_ARCH_OS?= $(shell dpkg-arch
DEB_HOST_ARCH_BITS ?= $(shell dpkg-architecture -qDEB_HOST_ARCH_BITS)
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
+# Enable Large File Support (LFS) if necessary: -D_LARGEFILE_SOURCE
-D_FILE_OFFSET_BITS=64
+CFLAGS := $(shell dpkg-buildflags --get CFLAGS) $(shell getconf LFS_CFLAGS)
+
# The 'build' target needs special handling because there there is a directory
# named 'build'.
.PHONY: build
Please apply this (or another patch) to allow apr to build with LFS support.
Thanks,
Helge