In my packages, I currently have to manually include the following in debian/rules: export DEB_CFLAGS_MAINT_APPEND +=$(shell getconf LFS_CFLAGS) $(HARDENING_CFLAGS) export DEB_LDFLAGS_MAINT_APPEND +=$(shell getconf LFS_LDFLAGS) $(HARDENING_LDFLAGS) It would be nice if dpkg-buildflags provided these for us. Thanks! Martin-Éric
Hi! The getconf interface is problematic as it does not correctly support cross-building. I clarified this in the lintian tag for the LFS support with: https://salsa.debian.org/lintian/lintian/-/commit/ba9c7fd96801e3c796d0233b4f7432e55dffe057 but now that the lintian LFS tag has been removed, that got lost. In any case, dpkg-buildflags already supports setting LFS flags with: export DEB_BUILD_MAINT_OPTIONS = abi=+lfs which should support cross-building correctly. I was going to close this report as invalid, but I guess I can instead document that the getconf interface should not be used in the dpkg-buildflags man page (although I'm not sure it would have helped here, as I assume the man page was not checked?). Thanks, Guillem
la 11.4.2026 klo 14.03 Guillem Jover (guillem@debian.org) kirjoitti: Noted. I simply typed 'dpkg-buildflags' onto the command line and did not see LFS_CFLAGS or LFS_LDFLAGS among the results, so I filed this bug. Martin-Éric
Hi! Bug #1133272 in package dpkg reported by you has been fixed in the dpkg/dpkg.git Git repository. You can see the changelog below, and you can check the diff of the fix at: https://git.dpkg.org/cgit/dpkg/dpkg.git/diff/?id=006112209 --- man: Document that getconf(1) must not be used for LFS support This interface does not support cross-building, and dpkg-buildflags already has native support to support LFS. Closes: #1133272
la 11.4.2026 klo 22.07 Guillem Jover (guillem@debian.org) kirjoitti: Thanks. I'm not sure that the above really helps. All it says is not to call getconf for LFS_CFLAGS or LFS_LDFLAGS. It doesn't tell what's the proper way of setting them via dpkg-buildflags. What is does say is that using 'abi=+lfs' will append '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64' to CPPFLAGS, which clearly isn't the same thing. It might indeed accomplish the same result, but that really isn't clear in the manual page. Martin-Éric Martin-Éric