Package: src:findutils
Version: 4.4.2-8
Severity: normal
Tags: patch
User: helm...@debian.org
Usertags: rebootstrap

findutils currently FTBFS on x32. Relevant build log excerpt:

| x86_64-linux-gnux32-gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../..  -I../../intl 
-D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --param=ssp-buffer-size=4 
-Wformat -Werror=format-security -Wall -MT mktime.o -MD -MP -MF $depbase.Tpo -c 
-o mktime.o mktime.c &&\
| mv -f $depbase.Tpo $depbase.Po
| mktime.c: In function 'ydhms_diff':
| mktime.c:105:52: error: size of array 'a' is negative
|  #define verify(name, assertion) struct name { char a[(assertion) ? 1 : -1]; }
|                                                     ^
| mktime.c:168:3: note: in expansion of macro 'verify'
|    verify (long_int_year_and_yday_are_wide_enough,
|    ^
| Makefile:890: recipe for target 'mktime.o' failed
| make[5]: *** [mktime.o] Error 1

The compile-time assertion in question verifies that sizeof(time_t) <=
sizeof(long), which is wrong on x32. The issue is solved in a later
gnulib release. I am attaching a patch that updates mktime.c to a more
recent gnulib version, which fixes this issue.

Helmut
diff -Nru findutils-4.4.2/debian/changelog findutils-4.4.2/debian/changelog
--- findutils-4.4.2/debian/changelog    2014-04-20 19:34:33.000000000 +0200
+++ findutils-4.4.2/debian/changelog    2014-07-05 22:43:55.000000000 +0200
@@ -1,3 +1,10 @@
+findutils (4.4.2-8.1) UNRELEASED; urgency=low
+
+  * Non-maintainer upload.
+  * Update gnulib's mktime.c to fix FTBFS on x32. (Closes: #-1)
+
+ -- Helmut Grohne <hel...@subdivi.de>  Sat, 05 Jul 2014 22:43:30 +0200
+
 findutils (4.4.2-8) unstable; urgency=low
 
   * Point Vcs-* to GIT repository.
diff -Nru findutils-4.4.2/debian/clean findutils-4.4.2/debian/clean
--- findutils-4.4.2/debian/clean        2014-04-13 19:25:06.000000000 +0200
+++ findutils-4.4.2/debian/clean        2014-07-05 22:42:49.000000000 +0200
@@ -1,3 +1,5 @@
 doc/stamp-vti
 doc/version.texi
 gnulib/lib/getdate.c
+gnulib/lib/mktime.c
+gnulib/lib/mktime-internal.h
diff -Nru findutils-4.4.2/debian/control findutils-4.4.2/debian/control
--- findutils-4.4.2/debian/control      2014-04-20 19:21:09.000000000 +0200
+++ findutils-4.4.2/debian/control      2014-07-05 22:41:29.000000000 +0200
@@ -4,7 +4,7 @@
 Maintainer: Andreas Metzler <ametz...@debian.org>
 Uploaders: Chuan-kai Lin <ck...@debian.org>
 Build-Depends: texinfo, debhelper (>= 9), autotools-dev, dejagnu,
- bison
+ bison, gnulib
 Standards-Version: 3.9.5
 Vcs-Git: git://anonscm.debian.org/pkg-findutils/pkg-findutils.git
 Vcs-Browser: 
http://anonscm.debian.org/gitweb/?p=pkg-findutils/pkg-findutils.git
diff -Nru findutils-4.4.2/debian/rules findutils-4.4.2/debian/rules
--- findutils-4.4.2/debian/rules        2014-04-13 19:25:06.000000000 +0200
+++ findutils-4.4.2/debian/rules        2014-07-05 22:43:27.000000000 +0200
@@ -27,6 +27,7 @@
 config.status: configure
        rm -vf build-aux/config.guess build-aux/config.sub
        ln -s /usr/share/misc/config.sub /usr/share/misc/config.guess build-aux/
+       cp /usr/share/gnulib/lib/mktime* gnulib/lib/
 
        dh_testdir
        # Configure the package.

Reply via email to