Hello,

On Fri, Dec 16, 2022 at 09:13:44AM +0100, Helge Deller wrote:
> Package: tar
> Version: 1.34+dfsg-1.1
> Tags: hppa, patch, ftbfs, lfs
[...]
> I've found, that changing the line 12 in debian/rules from
> CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
> to:
> CPPFLAGS = `dpkg-buildflags --get CPPFLAGS` -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -D__USE_TIME_BITS64
> does solve the issue.
[...]

Thanks for identifying the solution already.
Here's a slightly different patch to implement basically the same thing
(and I can confirm it builds in an i386 chroot which previously failed).

(Note: The initial two lines in debian/rules could also be replaced by
`include /usr/share/dpkg/architecture.mk` for further slight modernization.)

Regards,
Andreas Henriksson

--- a/debian/rules      2023-01-14 19:20:32.572449385 +0000
+++ b/debian/rules      2023-01-14 19:19:02.745766528 +0000
@@ -6,10 +6,12 @@
 CONFARGS = --host=$(DEB_HOST_GNU_TYPE)
 endif
 
-CFLAGS = `dpkg-buildflags --get CFLAGS`
-CFLAGS += -Wall -Wno-analyzer-null-argument
-LDFLAGS += `dpkg-buildflags --get LDFLAGS`
-CPPFLAGS = `dpkg-buildflags --get CPPFLAGS`
+export DEB_BUILD_MAINT_OPTIONS = future=+lfs
+export DEB_CFLAGS_MAINT_APPEND = -Wall -Wno-analyzer-null-argument
+export DEB_CPPFLAGS_MAINT_APPEND = -D_TIME_BITS=64
+
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
 export BUILD_DATE = $(shell dpkg-parsechangelog | sed -n -e 's/^Date: //p')
 

Reply via email to