Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 196103 - [4.2/regression] dev-libs/qof-0.7.2 compile failure w/ -O? -finline-functions
Summary: [4.2/regression] dev-libs/qof-0.7.2 compile failure w/ -O? -finline-functions
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL: http://gcc.gnu.org/bugzilla/show_bug....
Whiteboard:
Keywords:
Depends on:
Blocks: gcc-4.2
  Show dependency tree
 
Reported: 2007-10-16 22:31 UTC by Ed Catmur
Modified: 2007-11-06 12:06 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ed Catmur 2007-10-16 22:31:39 UTC
if /bin/sh ../libtool --tag=CC --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPREFIX=\""/usr"\" -DDATADIR=\""/usr/share"\"   -g -Werror -Wdeclaration-after-statement -Wno-pointer-sign -I/usr/include/libgda-1.2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -ggdb -O1 -O2 -O3 -pipe -march=athlon-xp -mmmx -msse -m3dnow -g2 -Wall -MT md5.lo -MD -MP -MF ".deps/md5.Tpo" -c -o md5.lo md5.c; \
        then mv -f ".deps/md5.Tpo" ".deps/md5.Plo"; else rm -f ".deps/md5.Tpo"; exit 1; fi
 i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPREFIX=\"/usr\" -DDATADIR=\"/usr/share\" -g -Werror -Wdeclaration-after-statement -Wno-pointer-sign -I/usr/include/libgda-1.2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -ggdb -O1 -O2 -O3 -pipe -march=athlon-xp -mmmx -msse -m3dnow -g2 -Wall -MT kvpframe.lo -MD -MP -MF .deps/kvpframe.Tpo -c kvpframe.c -o kvpframe.o >/dev/null 2>&1
make[3]: *** [kvpframe.lo] Error 1
make[3]: Leaving directory `/var/tmp/portage/dev-libs/qof-0.7.2/work/qof-0.7.2/qof'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/var/tmp/portage/dev-libs/qof-0.7.2/work/qof-0.7.2/qof'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/var/tmp/portage/dev-libs/qof-0.7.2/work/qof-0.7.2'
make: *** [all] Error 2
 * 
 * ERROR: dev-libs/qof-0.7.2 failed.
(etc.)

Yes, it's sending stderr to the bit bucket.  WTF.  I'll fix that and then update this with the actual error.
Comment 1 Ed Catmur 2007-10-16 22:34:26 UTC
Wow.  Not only is it discarding all compiler output, it's compiling with -Wall -Werror:

i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPREFIX=\"/usr\" -DDATADIR=\"/usr/share\" -g -Werror -Wdeclaration-after-statement -Wno-pointer-sign -I/usr/include/libgda-1.2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -ggdb -O1 -O2 -O3 -pipe -march=athlon-xp -mmmx -msse -m3dnow -g2 -Wall -MT kvpframe.lo -MD -MP -MF .deps/kvpframe.Tpo -c kvpframe.c -o kvpframe.o
cc1: warnings being treated as errors
kvpframe.c: In function ‘kvp_frame_compare’:
kvpframe.c:1778: warning: passing argument 1 of ‘kvp_frame_for_each_slot’ discards qualifiers from pointer target type
kvpframe.c:1786: warning: passing argument 1 of ‘kvp_frame_for_each_slot’ discards qualifiers from pointer target type

I /really/ hope the code isn't as bad as the build system.
Comment 2 Ed Catmur 2007-10-16 22:40:32 UTC
Sorry, the libtool line up at top is the wrong one, 'cos of parallel make.  Should be:

if /bin/sh ../libtool --tag=CC --mode=compile i686-pc-linux-gnu-gcc -DHAVE_CONFIG_H -I. -I. -I.. -DPREFIX=\""/usr"\" -DDATADIR=\""/usr/share"\"   -g -Werror -Wdeclaration-after-statement -Wno-pointer-sign -I/usr/include/libgda-1.2 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2   -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include    -ggdb -O1 -O2 -O3 -pipe -march=athlon-xp -mmmx -msse -m3dnow -g2 -Wall -MT kvpframe.lo -MD -MP -MF ".deps/kvpframe.Tpo" -c -o kvpframe.lo kvpframe.c; \
        then mv -f ".deps/kvpframe.Tpo" ".deps/kvpframe.Plo"; else rm -f ".deps/kvpframe.Tpo"; exit 1; fi

Using -j1 doesn't change anything, mind.
Comment 3 Ed Catmur 2007-10-16 23:00:59 UTC
OK, my bad.  Seems there's a gcc bug at work here, with -fPIC -dPIC preventing the compile warning/error from happening on the first compile.  (Also arguably a libtool bug, but whatever).

Anyway, the fix here is to pass --disable-error-on-warning to configure.
Comment 4 Ed Catmur 2007-10-16 23:34:04 UTC
right: gcc bug is http://gcc.gnu.org/bugzilla/show_bug.cgi?id=29478

The package is still bad, compiling with -Werror in released code, but this bug will only be hit by people compiling with gcc 4.2.x and -O -finline-functions (or -O3, etc.)
Comment 5 Christian Faulhammer (RETIRED) gentoo-dev 2007-10-17 05:38:28 UTC
(In reply to comment #3)
> Anyway, the fix here is to pass --disable-error-on-warning to configure.

 Or to strip -Wall and -Werror from the configure file?  Think  I will do that.
Comment 6 Christian Faulhammer (RETIRED) gentoo-dev 2007-11-04 11:06:15 UTC
All -W flags are not used anymore.  Closing.  Reopen if you disagree.
Comment 7 Christian Faulhammer (RETIRED) gentoo-dev 2007-11-06 12:06:04 UTC
This has been reported upstream (to not build with all those -W flags), but has been rejected: "The flags are carefully chosen and are important to the build - both for developers and packagers."