pkgsrc-Bugs archive

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

pkg/45541: devel/binutils: compile error with gcc-4.6.1



>Number:         45541
>Category:       pkg
>Synopsis:       devel/binutils: compile error with gcc-4.6.1
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    pkg-manager
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Oct 30 07:30:01 +0000 2011
>Originator:     Andrey N. Oktyabrski
>Release:        OpenIndiana 151a
>Organization:
>Environment:
$ uname -a
SunOS thinkpot 5.11 oi_151a i86pc i386 i86pc Solaris
$ isainfo 
amd64 i386
$ which gcc
/usr/bin/gcc
$ /usr/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/usr/bin/gcc
COLLECT_LTO_WRAPPER=/usr/gcc/4.6/lib/gcc/i386-pc-solaris2.11/4.6.1/lto-wrapper
Target: i386-pc-solaris2.11
Configured with: ../gcc-4.6.1/configure --prefix=/usr/gcc/4.6 
--libdir=/usr/gcc/4.6/lib --libexecdir=/usr/gcc/4.6/lib 
--mandir=/usr/gcc/4.6/share/man --infodir=/usr/gcc/4.6/info 
--with-build-time-tools=/usr/sfw --with-as=/usr/sfw/bin/gas --with-gnu-as 
--with-ld=/opt/dtbld/bin/ld-wrapper --without-gnu-ld 
--enable-languages=c,c++,fortran,objc --enable-shared --disable-static 
--enable-decimal-float --with-gmp=/usr/gnu --with-mpfr=/usr/gnu 
--with-mpc=/usr/gnu --with-libiconv-prefix=/usr/gnu -enable-nls
Thread model: posix
gcc version 4.6.1 (GCC)
>Description:
gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -I. -I.././bfd -I.././bfd/../include 
-I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes 
-Werror -O -c archive.c -o archive.o
archive.c: In function 'bfd_generic_archive_p':
archive.c:669:16: error: variable 'fail' set but not used 
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

...

gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -I. -I.././bfd -I.././bfd/../include 
-I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes 
-Werror -O -c tekhex.c -o tekhex.o
tekhex.c: In function 'tekhex_write_object_contents':
tekhex.c:754:7: error: variable 'bytes_written' set but not used 
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

...

gcc -DHAVE_CONFIG_H -I. -I.././bfd -I. -I. -I.././bfd -I.././bfd/../include 
-I.././bfd/../intl -I../intl -W -Wall -Wstrict-prototypes -Wmissing-prototypes 
-Werror -O -c dwarf2.c -o dwarf2.o
dwarf2.c: In function 'decode_line_info':
dwarf2.c:1120:11: error: variable 'basic_block' set but not used 
[-Werror=unused-but-set-variable]
cc1: all warnings being treated as errors

... and so on
>How-To-Repeat:
$ cd /usr/pkgsrc/devel/binutils
$ bmake
>Fix:
It seems this patch solves the problem, but I'm not sure - is it correct?

--- Makefile.orig       2011-10-30 10:21:03.905265125 +0300
+++ Makefile    2011-10-30 10:16:50.316983367 +0300
@@ -31,6 +31,8 @@
 BUILD_DEFS+=           GNU_PROGRAM_PREFIX
 BINUTILS_PREFIX=       ${PREFIX}/${MACHINE_GNU_PLATFORM}

+CONFIGURE_ARGS+=       --disable-werror
+
 PLIST_SRC=     ${PKGDIR}/PLIST.common
 PLIST_SRC+=    ${WRKDIR}/PLIST_DYNAMIC



Home | Main Index | Thread Index | Old Index