Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 423153 (PR53679) - sys-devel/gcc-4.7.1[go] fails to build due to -Werror
Summary: sys-devel/gcc-4.7.1[go] fails to build due to -Werror
Status: RESOLVED FIXED
Alias: PR53679
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/PR53679
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-06-23 14:35 UTC by Tiziano Müller (RETIRED)
Modified: 2012-07-24 00:22 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Patch from the upstream bug (01-gcc-4.7.1-libgo-runtime.patch,271 bytes, patch)
2012-06-25 00:46 UTC, Marco Leogrande
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Tiziano Müller (RETIRED) gentoo-dev 2012-06-23 14:35:31 UTC
/bin/sh ./libtool  --tag=CC   --mode=compile /var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/xgcc -B/var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include    -DHAVE_CONFIG_H -I. -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo  -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libffi/include -I../libffi/include -pthread  -fexceptions -fplan9-extensions -fsplit-stack -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -minline-all-stringops -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libgcc -I ../../gcc/include -g -mtune=native -O2 -pipe -O2 -MT runtime.lo -MD -MP -MF .deps/runtime.Tpo -c -o runtime.lo `test -f 'runtime/runtime.c' || echo '/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/'`runtime/runtime.c
libtool: compile:  /var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/xgcc -B/var/tmp/paludis/sys-devel-gcc-4.7.1/work/build/./gcc/ -B/usr/x86_64-pc-linux-gnu/bin/ -B/usr/x86_64-pc-linux-gnu/lib/ -isystem /usr/x86_64-pc-linux-gnu/include -isystem /usr/x86_64-pc-linux-gnu/sys-include -DHAVE_CONFIG_H -I. -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime -I/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libffi/include -I../libffi/include -pthread -fexceptions -fplan9-extensions -fsplit-stack -Wall -Wextra -Wwrite-strings -Wcast-qual -Werror -minline-all-stringops -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/../libgcc -I ../../gcc/include -g -mtune=native -O2 -pipe -O2 -MT msize.lo -MD -MP -MF .deps/msize.Tpo -c /var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime/msize.c -o msize.o >/dev/null 2>&1
yes
/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime/print.c: In function 'gwrite':
/var/tmp/paludis/sys-devel-gcc-4.7.1/work/gcc-4.7.1/libgo/runtime/print.c:20:3: error: ignoring return value of 'write', declared with attribute warn_unused_result [-Werror=unused-result]
cc1: all warnings being treated as errors
make[4]: *** [print.lo] Error 1
Comment 1 Ryan Hill (RETIRED) gentoo-dev 2012-06-24 00:24:09 UTC
I guess go ignores --disable-werror.
Comment 2 SpanKY gentoo-dev 2012-06-24 00:40:27 UTC
wouldn't be the first time :/

see bug 229059 for similar issue.  should be easy to get upstream to fix though.
Comment 3 Marco Leogrande 2012-06-25 00:44:37 UTC
Upstream bug: http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53679

I am using the patch attached to that bug and it works.
Comment 4 Marco Leogrande 2012-06-25 00:46:57 UTC
Created attachment 316203 [details, diff]
Patch from the upstream bug

This patch does not remove the strict -Werror enforcement, but adds dummy code to work around the specific warning.
Comment 5 SpanKY gentoo-dev 2012-07-23 16:14:07 UTC
should be all set now in the tree; thanks for the report!

i queued this for all 4.6/4.7 versions, and pushed out for 4.6.3 and 4.7.1

Commit message: Drop -Werror while building go
http://sources.gentoo.org/gentoo/src/patchsets/gcc/4.7.1/gentoo/16_all_libgo-Werror-pr53679.patch?rev=1.1
http://sources.gentoo.org/sys-devel/gcc/gcc-4.6.3.ebuild?r1=1.10&r2=1.11
http://sources.gentoo.org/sys-devel/gcc/gcc-4.7.1.ebuild?r1=1.2&r2=1.3
Comment 6 Marco Leogrande 2012-07-24 00:22:36 UTC
Works like a charm here, thank you.