Source: bison
Version: 2:2.5.dfsg-3
Severity: normal
Tags: patch
User: debian-...@lists.debian.org
Usertags: port-x32 ftbfs-gnulib

If I try to build the current package with eglibc 2.16 from experimental 
installed, I get this build failure:

gcc -std=gnu99  -I.   -D_FORTIFY_SOURCE=2  -g -O2 -fstack-protector --
param=ssp-buffer-size=4 -Wformat -Werror=format-security -Wall -c -o fseterr.o 
fseterr.c
In file included from fseterr.h:20:0,
                 from fseterr.c:20:
./stdio.h:496:1: error: 'gets' undeclared here (not in a function)
make[5]: *** [fseterr.o] Error 1
make[5]: Leaving directory `/tmp/buildd/bison-2.5.dfsg/lib'
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `/tmp/buildd/bison-2.5.dfsg/lib'
make[3]: *** [all] Error 2
make[3]: Leaving directory `/tmp/buildd/bison-2.5.dfsg/lib'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/tmp/buildd/bison-2.5.dfsg'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/tmp/buildd/bison-2.5.dfsg'
make: *** [debian/stamp-makefile-build] Error 2
dpkg-buildpackage: error: debian/rules build gave error exit status 2

Attached is a debdiff of the changes I made to get it to compile again.  
Alternately, the 1:2.6.2.dfsg-1 version which was briefly in the archive built 
fine against eglibc 2.16.
-- 
Daniel Schepler
diff -Nru bison-2.5.dfsg/debian/changelog bison-2.5.dfsg/debian/changelog
--- bison-2.5.dfsg/debian/changelog	2012-11-01 11:04:49.000000000 -0700
+++ bison-2.5.dfsg/debian/changelog	2012-11-21 11:30:31.000000000 -0800
@@ -1,3 +1,10 @@
+bison (2:2.5.dfsg-3+x32) UNRELEASED; urgency=low
+
+  * Fix gnulib's stdio.in.h to compile against eglibc 2.16, which no longer
+    declares gets() by default.
+
+ -- Daniel Schepler <schep...@debian.org>  Wed, 21 Nov 2012 11:29:58 -0800
+
 bison (2:2.5.dfsg-3) unstable; urgency=low
 
   * Bump epoch to downgrade unstable version from 2.6.2.dfsg-1 back to
diff -Nru bison-2.5.dfsg/debian/patches/01_gnulib_eglibc2_16.diff bison-2.5.dfsg/debian/patches/01_gnulib_eglibc2_16.diff
--- bison-2.5.dfsg/debian/patches/01_gnulib_eglibc2_16.diff	1969-12-31 16:00:00.000000000 -0800
+++ bison-2.5.dfsg/debian/patches/01_gnulib_eglibc2_16.diff	2012-11-21 11:29:19.000000000 -0800
@@ -0,0 +1,14 @@
+Index: bison-2.5.dfsg/lib/stdio.in.h
+===================================================================
+--- bison-2.5.dfsg.orig/lib/stdio.in.h	2011-05-14 22:23:46.000000000 +0000
++++ bison-2.5.dfsg/lib/stdio.in.h	2012-11-21 19:29:15.000000000 +0000
+@@ -181,7 +181,9 @@
+    so any use of gets warrants an unconditional warning.  Assume it is
+    always declared, since it is required by C89.  */
+ #undef gets
++#if 0
+ _GL_WARN_ON_USE (gets, "gets is a security hole - use fgets instead");
++#endif
+ 
+ #if @GNULIB_FOPEN@
+ # if @REPLACE_FOPEN@
diff -Nru bison-2.5.dfsg/debian/patches/series bison-2.5.dfsg/debian/patches/series
--- bison-2.5.dfsg/debian/patches/series	1969-12-31 16:00:00.000000000 -0800
+++ bison-2.5.dfsg/debian/patches/series	2012-11-21 11:28:52.000000000 -0800
@@ -0,0 +1 @@
+01_gnulib_eglibc2_16.diff

Reply via email to