Package: zlib
Version: 1:1.2.3.3.dfsg-5
Severity: important
User: [EMAIL PROTECTED]
Usertags: ftbfs-gcc-4.2
Tags: patch

From my pbuilder build log, using a chroot with packages mostly from sid,
except that gcc-defaults is from experimental:

...
cd debian/64 && CC="i486-linux-gnu-gcc -m64" CFLAGS="-Wall -g -D_REENTRANT -O3 
-DUNALIGNED_OK" ./configure --shared --prefix=/usr  
--libdir=\${prefix}/usr/lib64
Checking for shared library support...
Tested i486-linux-gnu-gcc -m64 -c -Wall -g -D_REENTRANT -O3 -DUNALIGNED_OK 
-fPIC ztest21094.c
Tested i486-linux-gnu-gcc -m64 -shared 
-Wl,-soname,libz.so.1,--version-script,zlib.map -o ztest21094.so ztest21094.o
/usr/bin/ld: error in 
/usr/lib/gcc/i486-linux-gnu/4.2.1/64/crtendS.o(.eh_frame); no .eh_frame_hdr 
table will be created.
No shared library support; try without defining CC and CFLAGS
Building static library libz.a version 1.2.3.3 with i486-linux-gnu-gcc -m64.
Checking for off64_t... Yes.
Checking for fseeko... Yes.
Checking for unistd.h... Yes.
Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf().
Checking for vsnprintf() in stdio.h... No.
  WARNING: vsnprintf() not found, falling back to vsprintf(). zlib
  can build but will be open to possible buffer-overflow security
  vulnerabilities.
Checking for return value of vsprintf()... Yes.
Checking for errno.h... Yes.
Checking for mmap support... Yes.
touch configure64-stamp
...
dh_install -s --sourcedir=debian/tmp
dh_install: lib64z1 missing files (usr/lib64/libz.so.*), aborting
make: *** [binary-arch] Error 1

This is because gcc-4.2-multilib is noisy compiling any 64-bit program on
i386, always outputting the message about "no .eh_frame_hdr table will be
created".  That shouldn't cause the configure script to choke, since the
compilation process does complete successfully.  I've attached a patch which
fixes the configure script to check for an actual error return code, instead
of barfing on any output whatsoever.
-- 
Daniel Schepler
diff -urN zlib-1.2.3.3.dfsg/debian/patches/configure_errorcheck zlib-1.2.3.3.dfsg.new/debian/patches/configure_errorcheck
--- zlib-1.2.3.3.dfsg/debian/patches/configure_errorcheck	2007-06-26 19:03:07.000000000 +0000
+++ zlib-1.2.3.3.dfsg.new/debian/patches/configure_errorcheck	1970-01-01 00:00:00.000000000 +0000
@@ -1,122 +0,0 @@
-diff -urN zlib-1.2.3.3.dfsg/configure zlib-1.2.3.3.dfsg.new/configure
---- zlib-1.2.3.3.dfsg/configure	2007-06-19 10:26:13.000000000 +0000
-+++ zlib-1.2.3.3.dfsg.new/configure	2007-06-26 19:02:14.000000000 +0000
-@@ -190,8 +190,8 @@
- if test $shared -eq 1; then
-   echo Checking for shared library support...
-   # we must test in two steps (cc then ld), required at least on SunOS 4.x
--  if test "`($CC -c $SFLAGS $test.c) 2>&1`" = "" &&
--     test "`($LDSHARED -o $test$shared_ext $test.o) 2>&1`" = ""; then
-+  if $CC -c $SFLAGS $test.c &&
-+     $LDSHARED -o $test$shared_ext $test.o; then
-     LIBS="$LIBS $SHAREDLIBV"
-     echo Building shared library $SHAREDLIBV with $CC.
-   elif test -z "$old_cc" -a -z "$old_cflags"; then
-@@ -228,7 +228,7 @@
- #include <sys/types.h>
- off64_t dummy = 0;
- EOF
--if test "`($CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c) 2>&1`" = ""; then
-+if $CC -c $CFLAGS -D_LARGEFILE64_SOURCE=1 $test.c; then
-   CFLAGS="${CFLAGS} -D_LARGEFILE64_SOURCE=1"
-   SFLAGS="${SFLAGS} -D_LARGEFILE64_SOURCE=1"
-   echo "Checking for off64_t... Yes."
-@@ -242,7 +242,7 @@
-   return 0;
- }
- EOF
--  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-+  if $CC $CFLAGS -o $test $test.c; then
-     echo "Checking for fseeko... Yes."
-   else
-     CFLAGS="${CFLAGS} -DNO_FSEEKO"
-@@ -255,7 +255,7 @@
- #include <unistd.h>
- int main() { return 0; }
- EOF
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if $CC -c $CFLAGS $test.c; then
-   cat >> zlibdefs.h <<EOF
- #include <sys/types.h>	/* for off_t */
- #include <unistd.h>	/* for SEEK_* and off_t */
-@@ -292,7 +292,7 @@
- }
- EOF
- 
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if $CC -c $CFLAGS $test.c; then
-   echo "Checking whether to use vs[n]printf() or s[n]printf()... using vs[n]printf()."
- 
-   cat > $test.c <<EOF
-@@ -316,7 +316,7 @@
- }
- EOF
- 
--  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-+  if $CC $CFLAGS -o $test $test.c; then
-     echo "Checking for vsnprintf() in stdio.h... Yes."
- 
-     cat >$test.c <<EOF
-@@ -341,7 +341,7 @@
- }
- EOF
- 
--    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+    if $CC -c $CFLAGS $test.c; then
-       echo "Checking for return value of vsnprintf()... Yes."
-     else
-       CFLAGS="$CFLAGS -DHAS_vsnprintf_void"
-@@ -379,7 +379,7 @@
- }
- EOF
- 
--    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+    if $CC -c $CFLAGS $test.c; then
-       echo "Checking for return value of vsprintf()... Yes."
-     else
-       CFLAGS="$CFLAGS -DHAS_vsprintf_void"
-@@ -409,7 +409,7 @@
- }
- EOF
- 
--  if test "`($CC $CFLAGS -o $test $test.c) 2>&1`" = ""; then
-+  if $CC $CFLAGS -o $test $test.c; then
-     echo "Checking for snprintf() in stdio.h... Yes."
- 
-     cat >$test.c <<EOF
-@@ -428,7 +428,7 @@
- }
- EOF
- 
--    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+    if $CC -c $CFLAGS $test.c; then
-       echo "Checking for return value of snprintf()... Yes."
-     else
-       CFLAGS="$CFLAGS -DHAS_snprintf_void"
-@@ -460,7 +460,7 @@
- }
- EOF
- 
--    if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+    if $CC -c $CFLAGS $test.c; then
-       echo "Checking for return value of sprintf()... Yes."
-     else
-       CFLAGS="$CFLAGS -DHAS_sprintf_void"
-@@ -476,7 +476,7 @@
- #include <errno.h>
- int main() { return 0; }
- EOF
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if $CC -c $CFLAGS $test.c; then
-   echo "Checking for errno.h... Yes."
- else
-   echo "Checking for errno.h... No."
-@@ -491,7 +491,7 @@
-   return mmap((caddr_t)0, (off_t)0, PROT_READ, MAP_SHARED, 0, (off_t)0);
- }
- EOF
--if test "`($CC -c $CFLAGS $test.c) 2>&1`" = ""; then
-+if $CC -c $CFLAGS $test.c; then
-   CFLAGS="$CFLAGS -DUSE_MMAP"
-   echo Checking for mmap support... Yes.
- else

Reply via email to