pkgsrc-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

pkg/45210: bootstrap fails with gcc-4.6 in libfetch (debian wheezy)



>Number:         45210
>Category:       pkg
>Synopsis:       bootstrap fails with gcc-4.6 in libfetch (debian wheezy)
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Tue Aug 02 08:30:00 +0000 2011
>Originator:     Kai-Uwe Eckhardt
>Release:        
>Organization:
>Environment:
Linux asusi3 2.6.39-2-amd64 #1 SMP Tue Jul 5 02:51:22 UTC 2011 x86_64 GNU/Linux

>Description:
Running env SH=/bin/bash ./bootstrap --abi 64 fails on debian wheezy
while compiling libfetch:

gcc -Wno-error -Wno-format -fno-builtin -Wno-error -Wno-format -fno-builtin  
-Wall -Wstrict-prototypes -Wmissing-prototypes -Wpointer-arith 
-Wno-uninitialized -Wreturn-type -Wcast-qual -Wpointer-arith -Wwrite-strings 
-Wswitch -Wshadow -Werror  -D_LARGEFILE_SOURCE -D_LARGE_FILES 
-D_FILE_OFFSET_BITS=64 -DDEF_UMASK=022 
-I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/bzip2 
-I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/zlib 
-I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libarchive/libarchive
 -I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch 
-DHAVE_NBCOMPAT_H=1 
-I/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libnbcompat -I. 
-D_LARGEFILE_SOURCE -D_LARGE_FILES -DFTP_COMBINE_CWDS -c ftp.c
ftp.c: In function 'ftp_closefn':
ftp.c:622:6: error: variable 'r' set but not used 
[-Werror=unused-but-set-variable]
ftp.c: In function 'ftp_transfer':
ftp.c:680:6: error: variable 'low' set but not used 
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

*** Error code 1

Stop.
bmake: stopped in 
/usr/pkgsrc/bootstrap/work/wrk/pkgtools/pkg_install/work/libfetch
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/pkgtools/pkg_install
*** Error code 1

Stop.
bmake: stopped in /usr/pkgsrc/pkgtools/pkg_install
===> exited with status 1
aborted.
>How-To-Repeat:
bootstrap on debian wheezy and presumably other Linuces like Fedora
which also use gcc-4.6 as default compiler.
gcc -v:  gcc version 4.6.1 (Debian 4.6.1-4) 

>Fix:
bootstrap uses a copy of pkgsrc/net/libfetch, so I used the following
patch in pkgsrc/net/libfetch/files successfully. The fix for r could
be cleaned up by using (void)ftp_chkerr and deleting the declaration
of r, but low is used depending on some macros defined, so +0 is
ugly but necessary.

--- ftp.c.orig  2011-08-02 09:49:59.978654868 +0200
+++ ftp.c       2011-08-02 10:00:34.878654547 +0200
@@ -636,6 +636,7 @@
        io->dconn = NULL;
        io->dir = -1;
        r = ftp_chkerr(io->cconn);
+       r = r + 0; /* fix for -Werror=unused-but-set-variable */
        fetch_cache_put(io->cconn, ftp_disconnect);
        free(io);
        return;
@@ -685,6 +686,7 @@
 
        /* check flags */
        low = CHECK_FLAG('l');
+       low = low + 0; /* fix for -Werror=unused-but-set-variable */
        pasv = !CHECK_FLAG('a');
        verbose = CHECK_FLAG('v');
 



Home | Main Index | Thread Index | Old Index