Bug#1031034: apr: Missing LFS support triggers FTBFS on other packages
It seems a large transition will be needed for 64bit time_t, anyway. And glibc enforces _FILE_OFFSET_BITS=64 if _TIME_BITS=64 is set. apr should do both transitions at the same time. It seems there won't be a transition for i386 but the whole point of i386 is running old binaries. https://wiki.debian.org/ReleaseGoals/64bit-time
Bug#1031034: apr: Missing LFS support triggers FTBFS on other packages
Hi Helge, Am 10.02.23 um 17:24 schrieb Helge Deller: 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. apr sets -D_LARGEFILE_SOURCE but not -D_FILE_OFFSET_BITS=64 . Unfortunately, it exposes those flags to programs built with apr via apr-1-config and apr-1.pc . And, AFAICS, ino_t and with it apr_ino_t would change size if -D_FILE_OFFSET_BITS=64 was added. So this would be an ABI break and require a soname bump and a library transition. As we are in transition freeze already, I think this has to wait until after bookworm release. Or am I missing something here? From reading the source, it seems apr uses readdir internally. Maybe some problems could also be solved if it used readdir64 and only failed if the inode number was requested. Not sure if readdir is the only problem, though. Cheers, Stefan
Bug#1031034: apr: Missing LFS support triggers FTBFS on other packages
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