Summary: | [gnome overlay] >=x11-wm/metacity-2.25.144 fails to compile due to -Werror | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Alois Hammer <aloishammer> |
Component: | [OLD] GNOME | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED FIXED | ||
Severity: | normal | CC: | maxbritov |
Priority: | High | ||
Version: | unspecified | ||
Hardware: | x86 | ||
OS: | Linux | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Bug Depends on: | |||
Bug Blocks: | 263083 | ||
Attachments: |
Output
build log for x11-wm/metacity-2.25.144 |
Description
Alois Hammer
2009-02-16 06:30:09 UTC
Created attachment 182204 [details]
Output
(In reply to comment #1) > Created an attachment (id=182204) [edit] > Output > I cannot reproduce this, please post the full build.log please get back to us. gnome 2.25.92 release is expected on next wednesday but since tarballs due is on monday it would be useful to have this info as early as possible. Created attachment 183532 [details]
build log for x11-wm/metacity-2.25.144
Alright, the full build.log didn't help at all. The anomalous line I see is "cc1: warnings being treated as errors" Which I don't see here (same gcc). How is that getting enabled? Could you try to disable CFLAGS for metacity and try again? It compiles with -w in CFLAGS (CXXFLAGS="${CFLAGS}"). I have no idea how -Werror or whatever the specific flag was got turned on. I have same issue with metacity-2.26.0: x86_64-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I../.. -DORBIT2=1 -pthread -I/usr/include/gtk-2.0 -I/usr/lib64/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12 -I/usr/include/gconf/2 -I/usr/include/orbit-2.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/startup-notification-1.0 -O3 -march=k8 -pipe -g -Wall -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wcast-align -Wsign-compare -Wall -Werror -ansi -MT test-resizing.o -MD -MP -MF .deps/test-resizing.Tpo -c -o test-resizing.o test-resizing.c cc1: warnings being treated as errors test-resizing.c: In function 'main': test-resizing.c:82: error: 'height' is used uninitialized in this function test-resizing.c:94: note: 'height' was declared here -Werror enabled in configure.in:486 # Warnings are there for a reason if test "x$GCC" = "xyes"; then CFLAGS="$CFLAGS -Wall -Werror -ansi" fi Add the following to the ebuild to get rid of -Werror: src_unpack() { find . -name Makefile.in -print0 | xargs -0 sed -i -e 's:-Werror::g' } But as always the real cause should be removed, of course (uninitialized variables). reopening (In reply to comment #8) > Add the following to the ebuild to get rid of -Werror: > > src_unpack() { > find . -name Makefile.in -print0 | xargs -0 sed -i -e 's:-Werror::g' > } This is unsafe for future. Need to patch Makefile.am too, but made sure that it's always done before the matching Makefile.in. Of course a call to gnome2_src_unpack would need to be there as well. > But as always the real cause should be removed, of course (uninitialized > variables). > It is not metacity's business to force a -Werror on us. It must not be done from release tarballs and the standard GNOME m4 macros for maintainers use ensure that won't happen, but will be if prepared through ./autogen.sh as is commonly done by developers while working from SVN instead of tarballs. Tarballs built normally from the pre-generated ./configure mustn't enable -Werror, it is not future proof even if it happens to compile right now with current gcc. Different gcc versions will have different warnings triggered on the same code. I use patch for myself: files/nowerr.patch --- metacity-2.26.0/configure.in 2009-03-16 19:58:12.000000000 +0200 +++ metacity-2.26.0-1/configure.in 2009-03-27 22:50:00.000000000 +0200 @@ -485,7 +485,7 @@ # Warnings are there for a reason if test "x$GCC" = "xyes"; then - CFLAGS="$CFLAGS -Wall -Werror -ansi" + CFLAGS="$CFLAGS -Wall -ansi" fi # Use gnome-doc-utils: and ebuild: --- metacity-2.26.0.ebuild 2009-04-05 23:50:28.000000000 +0300 +++ metacity-2.26.0.ebuild2 2009-04-12 17:19:14.000000000 +0300 @@ -4,7 +4,7 @@ EAPI="2" -inherit eutils gnome2 +inherit autotools eutils gnome2 DESCRIPTION="GNOME default window manager" HOMEPAGE="http://blogs.gnome.org/metacity/" @@ -55,3 +55,9 @@ --enable-xsync $(use_enable xinerama)" } + +src_unpack() { + gnome2_src_unpack + epatch "${FILESDIR}/nowerr.patch" + eautoreconf +} fixed in overlay without a bump. Thanks for reporting. |