GNOME Bugzilla – Bug 301166
GStreamer 0.8 CVS compilation fails on GCC4 warning
Last modified: 2006-01-13 11:01:08 UTC
Please describe the problem: gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-common -g -Wall -Werror -DGST_DISABLE_DEPRECATED -mpreferred-stack-boundary=2 -I/usr/include/valgrind -I/usr/include/valgrind/x86 -I/usr/include/valgrind/linux -I/usr/include/valgrind/x86-linux -I../.. -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -MT libgstxmlregistry_la-gstlibxmlregistry.lo -MD -MP -MF .deps/libgstxmlregistry_la-gstlibxmlregistry.Tpo -c gstlibxmlregistry.c -fPIC -DPIC -o .libs/libgstxmlregistry_la-gstlibxmlregistry.o cc1: warnings being treated as errors gstlibxmlregistry.c: In function 'read_string': gstlibxmlregistry.c:590: warning: pointer targets in passing argument 1 of 'g_strdup' differ in signedness gstlibxmlregistry.c: In function 'read_uint': gstlibxmlregistry.c:613: warning: pointer targets in passing argument 1 of 'strtol' differ in signedness gstlibxmlregistry.c: In function 'read_enum': gstlibxmlregistry.c:644: warning: pointer targets in passing argument 2 of 'g_enum_get_value_by_nick' differ in signedness gstlibxmlregistry.c: In function 'load_pad_template': gstlibxmlregistry.c:674: warning: pointer targets in initialization differ in signedness gstlibxmlregistry.c: In function 'load_feature': gstlibxmlregistry.c:726: warning: pointer targets in initialization differ in signedness gstlibxmlregistry.c: In function 'load_plugin': gstlibxmlregistry.c:821: warning: pointer targets in initialization differ in signedness gstlibxmlregistry.c: In function 'load_paths': gstlibxmlregistry.c:868: warning: pointer targets in initialization differ in signedness make[4]: *** [libgstxmlregistry_la-gstlibxmlregistry.lo] Error 1 make[4]: Leaving directory `/home/cschalle/RPMS/BUILD/gstreamer-0.8.9.1/gst/registries' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/cschalle/RPMS/BUILD/gstreamer-0.8.9.1/gst' make[2]: *** [all] Error 2 make[2]: Leaving directory `/home/cschalle/RPMS/BUILD/gstreamer-0.8.9.1/gst' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/cschalle/RPMS/BUILD/gstreamer-0.8.9.1' make: *** [all] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.81631 (%build) Steps to reproduce: Actual results: Expected results: Does this happen every time? Other information:
Created attachment 45438 [details] [review] proposed patch
Kjartan, didn't you have a patch for this already?
Attaching patches for both gst-plugins and gstreamer. Not sure they are in an acceptable shape yet...
Created attachment 45535 [details] [review] warning fixes for gst-plugins
Created attachment 45536 [details] [review] fixes for gst core
Comment on attachment 45536 [details] [review] fixes for gst core - specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (object), &nspecs); + specs = g_object_class_list_properties (G_OBJECT_GET_CLASS (object), (guint *)&nspecs); Can that be done differently? E.g. by making nspecs a guint already? As for the rest, I see libxml insanity, which apparently requires this fix. The rest is sane.
The core patch is committed with the above one slightly modified. Looking at plugins patch now.
Just tried compiling core CVS and got the following: cc1: warnings being treated as errors gstpad.c: In function 'gst_pad_event_default': gstpad.c:4124: warning: pointer targets in passing argument 3 of 'gst_event_discont_get_value' differ in signedness gstpad.c:4134: warning: pointer targets in passing argument 5 of 'gst_pad_convert' differ in signedness make[4]: *** [libgstreamer_0.8_la-gstpad.lo] Error 1
Above fixed by Ronalds Guint to gint change, Here is the next one cc1: warnings being treated as errors gsttrace.c: In function 'gst_trace_flush': gsttrace.c:114: warning: ignoring return value of 'write', declared with attribute warn_unused_result gsttrace.c: In function 'gst_trace_text_flush': gsttrace.c:136: warning: ignoring return value of 'write', declared with attribute warn_unused_result
Created attachment 45543 [details] [review] fixes the rest for gstreamer core
Git/did this when applying this patch patching file gst/indexers/gstfileindex.c can't find file to patch at input line 413 Perhaps you used the wrong -p or --strip option? The text leading up to this was: -------------------------- |Index: gst/schedulers/gstoptimalscheduler.c |=================================================================== |RCS file: /cvs/gstreamer/gstreamer/gst/schedulers/Attic/gstoptimalscheduler.c,v|retrieving revision 1.109 |diff -u -p -r1.109 gstoptimalscheduler.c |--- gst/schedulers/gstoptimalscheduler.c 2 Feb 2005 16:15:18 -0000 1.109 |+++ gst/schedulers/gstoptimalscheduler.c 22 Apr 2005 11:09:05 -0000 -------------------------- File to patch: Skip this patch? [y] y Skipping patch. 1 out of 1 hunk ignored patching file libs/gst/dataprotocol/dataprotocol.c Hunk #2 succeeded at 379 (offset -14 lines).
nm, patched 0.9 by mistake
Still have this one after Kjartans patch: cc1: warnings being treated as errors gsttrace.c: In function 'gst_trace_flush': gsttrace.c:114: warning: ignoring return value of 'write', declared with attribute warn_unused_result gsttrace.c: In function 'gst_trace_text_flush': gsttrace.c:136: warning: ignoring return value of 'write', declared with attribute warn_unused_result
Been building RPMS up to now, just running make fails with this: cc1: warnings being treated as errors runxml.c: In function ‘main’: runxml.c:47: warning: pointer targets in passing argument 2 of ‘gst_xml_parse_file’ differ in signedness make[3]: *** [runxml.o] Error 1
Kjartan, I applied half of your patch, I did the other half differently (but thanks to your patch for making me notice them). Can you both please test current CVS again and give me a clear list of outstanding issues? Christian, for the write, change: [..] write (..); [..] to: int unused; [..] unused = write (..); [..] and let me know if that fixes it.
Getting this with current CVS gcc -DHAVE_CONFIG_H -I. -I. -I../../.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-common -g -Wall -Werror -DGST_DISABLE_DEPRECATED -I../../../libs -I../../.. -I../../../libs -DGST_ENABLE_NEW -g -O2 -MT libgstdataprotocol_la-dataprotocol.lo -MD -MP -MF .deps/libgstdataprotocol_la-dataprotocol.Tpo -c dataprotocol.c -fPIC -DPIC -o .libs/libgstdataprotocol_la-dataprotocol.o dataprotocol.c: In function 'gst_dp_packet_from_caps': dataprotocol.c:279: error: syntax error before '<<' token dataprotocol.c:283:9: error: too many decimal points in number dataprotocol.c:290: error: syntax error before '<<' token dataprotocol.c:294:9: error: too many decimal points in number dataprotocol.c: In function 'gst_dp_packet_from_event': dataprotocol.c:404: error: syntax error before '<<' token dataprotocol.c:408:9: error: too many decimal points in number dataprotocol.c: In function 'gst_dp_caps_from_packet': dataprotocol.c:472: error: syntax error before '<<' token dataprotocol.c:476:9: error: too many decimal points in number cc1: warnings being treated as errors dataprotocol.c:465: warning: unused variable 'string' make[4]: *** [libgstdataprotocol_la-dataprotocol.lo] Error 1 make[4]: Leaving directory `/home/cschalle/gst/08/gstreamer/libs/gst/dataprotocol' make[3]: *** [all-recursive] Error 1 make[3]: Leaving directory `/home/cschalle/gst/08/gstreamer/libs/gst' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/cschalle/gst/08/gstreamer/libs' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/cschalle/gst/08/gstreamer' make: *** [all] Error 2
That's because you are trying to compile with CVS conflicts in your tree :)
Whoops :) ok, still fails with the same message and my #14 entry after a clean checkout.
Fixed, pelase try again.
make[3]: Entering directory `/home/cschalle/gst/08/gstreamer/tests/seeking' if gcc -DHAVE_CONFIG_H -I. -I. -I../.. -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-common -g -Wall -Werror -DGST_DISABLE_DEPRECATED -I../../libs -I../.. -g -O2 -MT seeking1.o -MD -MP -MF ".deps/seeking1.Tpo" -c -o seeking1.o seeking1.c; \ then mv -f ".deps/seeking1.Tpo" ".deps/seeking1.Po"; else rm -f ".deps/seeking1.Tpo"; exit 1; fi verified fixed; next stop is this one: cc1: warnings being treated as errors seeking1.c: In function ‘main’: seeking1.c:58: warning: pointer targets in passing argument 4 of ‘gst_pad_query’ differ in signedness seeking1.c:60: warning: pointer targets in passing argument 4 of ‘gst_pad_query’ differ in signedness seeking1.c:83: warning: pointer targets in passing argument 4 of ‘gst_pad_query’ differ in signedness seeking1.c:85: warning: pointer targets in passing argument 4 of ‘gst_pad_query’ differ in signedness make[3]: *** [seeking1.o] Error 1
Kjartan, it seems like all testsuite items fail, can you run make check and fix them? That'll go faster than me fixing each single item reported by Christian.
gcc -DHAVE_CONFIG_H -I. -I. -I../.. -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libxml2 -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -fno-common -g -Wall -Werror -DGST_DISABLE_DEPRECATED -mpreferred-stack-boundary=2 -I/usr/include/valgrind -I/usr/include/valgrind/x86 -I/usr/include/valgrind/linux -I/usr/include/valgrind/x86-linux -I../.. -O2 -g -pipe -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -m32 -march=i386 -mtune=pentium4 -fasynchronous-unwind-tables -MT libgstparse_la-lex._gst_parse_yy.lo -MD -MP -MF .deps/libgstparse_la-lex._gst_parse_yy.Tpo -c lex._gst_parse_yy.c -fPIC -DPIC -o .libs/libgstparse_la-lex._gst_parse_yy.o cc1: warnings being treated as errors lex._gst_parse_yy.c: In function '_gst_parse_yylex': parse.l:144: warning: ignoring return value of 'fwrite', declared with attribute warn_unused_result Got this trying to build an RPM (without the tests)
Christian, please follow my instructions as given in comment 15 and see if that fixes it.
Only reference I find to fwrite is this, and I am unsure how to apply the comment 15 to that. #define ECHO (void) fwrite( yytext, yyleng, 1, yyout ) #endif
Fixed. Closing.
*** Bug 315078 has been marked as a duplicate of this bug. ***