Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 259179

Summary: [gnome overlay] >=x11-wm/metacity-2.25.144 fails to compile due to -Werror
Product: Gentoo Linux Reporter: Alois Hammer <aloishammer>
Component: [OLD] GNOMEAssignee: 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
Compilation error in test-resizing.c while compiling x11-wm/metacity-2.25.144.

Reproducible: Always




Portage 2.2_rc23 (default/linux/x86/2008.0, gcc-4.3.3, glibc-2.9_p20081201-r1, 2.6.28.4 i686)
=================================================================
System uname: Linux-2.6.28.4-i686-Intel-R-_Core-TM-2_Duo_CPU_E8400_@_3.00GHz-with-gentoo-2.0.0
Timestamp of tree: Sun, 15 Feb 2009 21:30:01 +0000
app-shells/bash:     3.2_p48-r1
dev-java/java-config: 1.3.7-r1, 2.1.7
dev-lang/python:     2.6.1
dev-python/pycrypto: 2.0.1-r6
dev-util/cmake:      2.6.2-r1
sys-apps/baselayout: 2.0.0
sys-apps/openrc:     0.4.3-r1
sys-apps/sandbox:    1.3.7
sys-devel/autoconf:  2.13, 2.63
sys-devel/automake:  1.4_p6, 1.5, 1.6.3, 1.7.9-r1, 1.8.5-r3, 1.9.6-r2, 1.10.2
sys-devel/binutils:  2.19.1
sys-devel/gcc-config: 1.4.1
sys-devel/libtool:   2.2.6a
virtual/os-headers:  2.6.28-r1
ACCEPT_KEYWORDS="x86 ~x86"
CBUILD="i686-pc-linux-gnu"
CFLAGS="-O3 -march=core2 -mssse3 -msse4.1 -mcx16 -fomit-frame-pointer -pipe -mfpmath=sse"
CHOST="i686-pc-linux-gnu"
CONFIG_PROTECT="/etc /var/bind /var/lib/hsqldb"
CONFIG_PROTECT_MASK="/etc/ca-certificates.conf /etc/env.d /etc/env.d/java/ /etc/fonts/fonts.conf /etc/gconf /etc/gentoo-release /etc/revdep-rebuild /etc/sandbox.d /etc/terminfo /etc/texmf/web2c /etc/udev/rules.d /opt/sun-jdk-1.4.2.18/jre/lib/i386"
CXXFLAGS="-O3 -march=core2 -mssse3 -msse4.1 -mcx16 -fomit-frame-pointer -pipe -mfpmath=sse"
DISTDIR="/usr/portage/distfiles"
FEATURES="distlocks fixpackages parallel-fetch preserve-libs protect-owned sandbox sfperms strict unmerge-orphans userfetch"
GENTOO_MIRRORS="http://spatha.bcas.lan/ http://mirror.mcs.anl.gov/pub/gentoo/ http://open-systems.ufl.edu/mirrors/gentoo http://www.gtlib.gatech.edu/pub/gentoo http://mirror.datapipe.net/gentoo http://gentoo.osuosl.org/ http://gentoo.mirrors.tds.net/gentoo"
LANG="en_US"
LC_ALL="en_US"
LDFLAGS="-Wl,--as-needed"
LINGUAS="en en_US"
MAKEOPTS="-j3"
PKGDIR="/usr/portage/packages"
PORTAGE_RSYNC_OPTS="--recursive --links --safe-links --perms --times --compress --force --whole-file --delete --stats --timeout=180 --exclude=/distfiles --exclude=/local --exclude=/packages"
PORTAGE_TMPDIR="/var/tmp"
PORTDIR="/usr/portage"
PORTDIR_OVERLAY="/usr/portage/local/layman/gnome /usr/portage/local/layman/gnome /usr/portage/local/layman/jokey /usr/portage/local/layman/jokey /usr/portage/local/layman/sunrise /usr/portage/local/layman/sunrise /usr/portage/local/layman/secondlife /usr/portage/local/layman/secondlife /usr/portage/local/layman/vmware /usr/portage/local/layman/vmware /usr/portage/local/layman/x11 /usr/portage/local/layman/x11 /usr/portage/local/aloishammer /usr/portage/local/java-experimental /usr/portage/local/layman/java-overlay"
SYNC="rsync://spatha.bcas.lan/gentoo-portage"
USE="16bit 16bit-indices 64bit 7zip S3TC X a52 aac acct ace acl acpi addbookmarks additions adns adplug aim aio alias alisp alsa amazon amr amrnb amrwb animgif ao aoss aotuv apache2 ares asf asm aspnet2 async audiofile authlib bash-completion bdf berkdb bgpclassless binary-drivers binfilter bl bluetooth bonobo bookmarks boost branding bzip2 cairo captury cardbus catalogs cdda cddax cddb cdparanoia cdr chardet chm chroot clamav cli colordiff connectionstatus console contactnotes corba courier cpudetection cracklib crypt css cups curl curlwrappers custom-cflags custom-cxxflags dbus dbx deprecated depth32 device-mapper devil dga disk-partition divx djvu dmi domain-aware dri dts dv dvd dvdr dvdread dvi dynamic ecc emf emovix enca enchant encode erandom exif extensions extraengine extrafilters fam fame fat ffmpeg fftw fix-connected-rt flac flash flexresp2 fltk fluidsynth font-server fontconfig foomaticdb fpx freetts ftp fuse galago gd gdbm geoip gif gimp glib glibc-omitfp glitz glut gmedia gmp gnome gnome-keyring gnutls gphoto2 gps graphviz gs gstreamer gtk guile gzip hal hddtemp hdri hfs highlight history howl howl-compat hpn html hyperestraier ibam iconv icq icu idea idn ignore-case imagemagick imap injection inkjar inline innodb inotify insecure-savers ipv6 irc ithreads jabber jack java java-external java5 javascript jbig jce jfs jikes jingle joystick jpeg jpeg2k jrtplib kdeenablefinal kdehiddenvisibility kdexdeltas keyring kipi ladspa lame lash libclamav libffi libnotify libsamplerate libsexy linuxthreads-tls live lm_sensors log4j logitech-mouse logrotate lua lzma lzo lzw mad madwifi magic maildir matroska mbrola mecab memlimit metalink mfd-rewrites midi mikmod mime mjpeg mmap mmkeys mmx mng mod modplug mozdom mp2 mp3 mp4 mpeg mplayer msn mudflap musepack music musicbrainz nautilus ncurses nemesi netcdf network network-cron new-reg-alloc newspr nls nodrm nolvm1 nolvmstatic nptl nptlonly nspr nss ntfs ntp nut obex odbc offensive ofx ogg ole openal openexr opengl openssl osc oscar pam pam_timestamp pango parse-clocks pch pci pcntl pcre pcsc-lite pdf perl plugin png policykit posix postfix postscript ppds pppd pth pwdb python q32 quotes rar rc5 rdesktop readline realmedia reflection reiserfs remix replaygain rle rpm rtc rtsp samba sametime sdl session sharedmem shorten shout slang smp sms sndfile snmp sockets sound sox speex spell spl sqlite sqlite3 srt sse sse2 ssl ssse3 startup-notification subtitles svg svgz symlink sysfs sysvipc szip t1lib tagwriting texteffect theora threads threadsafe tiff timidity tntc trayicon truetype tta type1 unicode urandom usb userlocales utempter uuencode vcd voice vorbis vorbis-psy wavpack webdav webpresence wideband win32codecs winpopup wma wmf wmp x264 x86 xanim xattr xcb xcomposite xext xfs xft xgetdefault xml xmldoclet xmlreader xmlrpc xmlwriter xorg xosd xpm xprint xrandr xscreensaver xsl xslt xulrunner xv xvid xvmc yahoo yv12 zip zlib" ALSA_CARDS="maestro3 asihpi darla20 darla24 echo3g gina20 gina24 hdsp hdspm indigo indigoio korg1212 layla20 layla24 mia mixart mona pcxhr sb16 usbusx2y vx222" ALSA_PCM_PLUGINS="adpcm alaw asym copy dmix dshare dsnoop empty extplug file hooks iec958 ioplug ladspa lfloat linear meter mmap_emul mulaw multi null plug rate route share shm softvol" APACHE2_MODULES="actions alias auth_basic authn_alias authn_anon authn_dbm authn_default authn_file authz_dbm authz_default authz_groupfile authz_host authz_owner authz_user autoindex cache dav dav_fs dav_lock deflate dir disk_cache env expires ext_filter file_cache filter headers include info log_config logio mem_cache mime mime_magic negotiation rewrite setenvif speling status unique_id userdir usertrack vhost_alias" CAMERAS="canon" ELIBC="glibc" INPUT_DEVICES="evdev" KERNEL="linux" LCD_DEVICES="bayrad cfontz cfontz633 glk hd44780 lb216 lcdm001 mtxorb ncurses text" LINGUAS="en en_US" USERLAND="GNU" VIDEO_CARDS="none radeon"
Unset:  CPPFLAGS, CTARGET, EMERGE_DEFAULT_OPTS, FFLAGS, INSTALL_MASK, PORTAGE_COMPRESS, PORTAGE_COMPRESS_FLAGS, PORTAGE_RSYNC_EXTRA_OPTS
Comment 1 Alois Hammer 2009-02-16 06:30:50 UTC
Created attachment 182204 [details]
Output
Comment 2 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-02-22 16:33:09 UTC
(In reply to comment #1)
> Created an attachment (id=182204) [edit]
> Output
> 

I cannot reproduce this, please post the full build.log
Comment 3 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-02-28 13:49:52 UTC
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.
Comment 4 Alois Hammer 2009-03-01 04:05:42 UTC
Created attachment 183532 [details]
 build log for x11-wm/metacity-2.25.144
Comment 5 Nirbheek Chauhan (RETIRED) gentoo-dev 2009-03-01 06:05:12 UTC
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?
Comment 6 Alois Hammer 2009-03-01 06:59:01 UTC
It compiles with -w in CFLAGS (CXXFLAGS="${CFLAGS}").  I have no idea how -Werror or whatever the specific flag was got turned on.
Comment 7 Maxim Britov 2009-04-03 11:01:40 UTC
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
Comment 8 Florian Faber 2009-04-11 09:41:11 UTC
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).

Comment 9 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-04-11 09:51:57 UTC
reopening
Comment 10 Mart Raudsepp gentoo-dev 2009-04-12 10:53:41 UTC
(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.
Comment 11 Maxim Britov 2009-04-12 14:27:28 UTC
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
+}
Comment 12 Gilles Dartiguelongue (RETIRED) gentoo-dev 2009-04-12 21:39:54 UTC
fixed in overlay without a bump. Thanks for reporting.