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)
Correction, this only happens when running make i386 when building an rpm locally. Frysk builds fine out of cvs.
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.
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
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
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.