Bug 2280 - Build fails during frysk-core
Summary: Build fails during frysk-core
Status: RESOLVED FIXED
Alias: None
Product: frysk
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Adam Jocksch
URL:
Keywords:
Depends on:
Blocks: 2235 2104
  Show dependency treegraph
 
Reported: 2006-02-06 18:41 UTC by Adam Jocksch
Modified: 2006-02-08 20:52 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam Jocksch 2006-02-06 18:41:16 UTC
The build fails on FC5 with the follwing message:
cc1: warnings being treated as errors
frysk/pkglibexecdir/funit-modify.c: In function 'main':
frysk/pkglibexecdir/funit-modify.c:87: warning: ignoring return value of
'fwrite', declared with attribute warn_unused_result
make[3]: *** [frysk/pkglibexecdir/funit-modify.o] Error 1

gcc (GCC) 4.1.0 20060131 (Red Hat 4.1.0-0.20)
Comment 1 Adam Jocksch 2006-02-06 18:42:56 UTC
Correction, this only happens when running make i386 when building an rpm
locally. Frysk builds fine out of cvs.
Comment 2 Andrew Cagney 2006-02-06 19:21:24 UTC
The original GCC line, and not just the output would be useful here.

rpm builds things with more, and more pedantic, flags.  Likely one of them is
enabling the warning and that in turn causing a fail.

Examine the CC line and see if anything obvious is different (likely either
-D_... or -W...).  Any way the warning can be fixed.
Comment 3 Adam Jocksch 2006-02-06 19:48:10 UTC
This is the command executed by rpmbuild:
if /usr/bin/gcc -DPACKAGE_NAME=\"frysk\" -DPACKAGE_TARNAME=\"frysk\"
-DPACKAGE_VERSION=\"0.0.1.2006.02.06\" -DPACKAGE_STRING=\"frysk\
0.0.1.2006.02.06\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"frysk\"
-DVERSION=\"0.0.1.2006.02.06\"  -I. -I.  -I. -I. -Werror -Wall -fPIC  -O2 -g
-pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=pentium4
-fasynchronous-unwind-tables -MT frysk/pkglibexecdir/funit-print-argc.o -MD -MP
-MF "$depbase.Tpo" -c -o frysk/pkglibexecdir/funit-print-argc.o
frysk/pkglibexecdir/funit-print-argc.c;

And this is from cvs:
if gcc -DPACKAGE_NAME=\"frysk\" -DPACKAGE_TARNAME=\"frysk\"
-DPACKAGE_VERSION=\"0.0.1.2006.02.06\" -DPACKAGE_STRING=\"frysk\
0.0.1.2006.02.06\" -DPACKAGE_BUGREPORT=\"\" -DPACKAGE=\"frysk\"
-DVERSION=\"0.0.1.2006.02.06\"  -I. -I/home/ajocksch/src/frysk/frysk-core   
-I/home/ajocksch/src/frysk/frysk-core -I. -Werror -Wall -fPIC  -g -O -MT
frysk/pkglibexecdir/funit-print-argc.o -MD -MP -MF "$depbase.Tpo" -c -o
frysk/pkglibexecdir/funit-print-argc.o
/home/ajocksch/src/frysk/frysk-core/frysk/pkglibexecdir/funit-print-argc.c;

It seems the extra parameters are
-pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=pentium4
Comment 4 Adam Jocksch 2006-02-06 22:22:08 UTC
Tried building frysk from cvs with {CFLAGS,GCJFLAGS} set to:
 -Werror -Wall -fPIC  -O2 -pipe -fexceptions -fstack-protector
--param=ssp-buffer-size=4 -m32 -march=i386 -mtune=pentium4 -MT -MD -MP -MF

Was unable to reproduce the error. Adding -Wp,-D_FORTIFY_SOURCE=2 breaks the
build as in trying to build the rpm
Comment 5 Adam Jocksch 2006-02-08 20:52:27 UTC
2006-02-08  Adam Jocksch  <ajocksch@toothpaste.toronto.redhat.com>

        * funit-syscallint.c (main): Fix compiler warnings.
        * funit-modify.c (main): Now checks return value of fwrite, aborts
        if it is != 1.

Closing bug.