After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 301166 - GStreamer 0.8 CVS compilation fails on GCC4 warning
GStreamer 0.8 CVS compilation fails on GCC4 warning
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gstreamer (core)
0.8.9
Other All
: Normal major
: NONE
Assigned To: GStreamer Maintainers
GStreamer Maintainers
: 315078 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2005-04-19 08:46 UTC by Christian Fredrik Kalager Schaller
Modified: 2006-01-13 11:01 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
proposed patch (2.64 KB, patch)
2005-04-19 11:43 UTC, Tim-Philipp Müller
none Details | Review
warning fixes for gst-plugins (61.33 KB, patch)
2005-04-22 08:12 UTC, Kjartan Maraas
committed Details | Review
fixes for gst core (58.02 KB, patch)
2005-04-22 08:12 UTC, Kjartan Maraas
committed Details | Review
fixes the rest for gstreamer core (26.90 KB, patch)
2005-04-22 11:09 UTC, Kjartan Maraas
committed Details | Review

Description Christian Fredrik Kalager Schaller 2005-04-19 08:46:27 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:
Comment 1 Tim-Philipp Müller 2005-04-19 11:43:30 UTC
Created attachment 45438 [details] [review]
proposed patch
Comment 2 Ronald Bultje 2005-04-20 07:40:59 UTC
Kjartan, didn't you have a patch for this already?
Comment 3 Kjartan Maraas 2005-04-22 08:11:26 UTC
Attaching patches for both gst-plugins and gstreamer. Not sure they are in an
acceptable shape yet...
Comment 4 Kjartan Maraas 2005-04-22 08:12:15 UTC
Created attachment 45535 [details] [review]
warning fixes for gst-plugins
Comment 5 Kjartan Maraas 2005-04-22 08:12:48 UTC
Created attachment 45536 [details] [review]
fixes for gst core
Comment 6 Ronald Bultje 2005-04-22 08:42:54 UTC
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.
Comment 7 Ronald Bultje 2005-04-22 09:34:28 UTC
The core patch is committed with the above one slightly modified. Looking at
plugins patch now.
Comment 8 Christian Fredrik Kalager Schaller 2005-04-22 09:56:48 UTC
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
Comment 9 Christian Fredrik Kalager Schaller 2005-04-22 10:18:47 UTC
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
Comment 10 Kjartan Maraas 2005-04-22 11:09:48 UTC
Created attachment 45543 [details] [review]
fixes the rest for gstreamer core
Comment 11 Christian Fredrik Kalager Schaller 2005-04-22 11:32:12 UTC
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).
Comment 12 Christian Fredrik Kalager Schaller 2005-04-22 11:32:41 UTC
nm, patched 0.9 by mistake
Comment 13 Christian Fredrik Kalager Schaller 2005-04-22 11:47:48 UTC
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
Comment 14 Christian Fredrik Kalager Schaller 2005-04-22 12:20:39 UTC
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
Comment 15 Ronald Bultje 2005-04-22 14:40:22 UTC
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.
Comment 16 Christian Fredrik Kalager Schaller 2005-04-25 14:14:45 UTC
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
Comment 17 Kjartan Maraas 2005-04-25 16:17:13 UTC
That's because you are trying to compile with CVS conflicts in your tree :)
Comment 18 Christian Fredrik Kalager Schaller 2005-04-25 16:27:50 UTC
Whoops :) ok, still fails with the same message and my #14 entry after a clean
checkout.
Comment 19 Ronald Bultje 2005-04-25 17:14:44 UTC
Fixed, pelase try again.
Comment 20 Christian Fredrik Kalager Schaller 2005-04-25 17:28:32 UTC
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
Comment 21 Ronald Bultje 2005-04-25 18:02:59 UTC
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.
Comment 22 Christian Fredrik Kalager Schaller 2005-04-26 14:34:03 UTC
 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)
Comment 23 Ronald Bultje 2005-04-26 14:36:09 UTC
Christian, please follow my instructions as given in comment 15 and see if that
fixes it.
Comment 24 Christian Fredrik Kalager Schaller 2005-04-26 14:42:05 UTC
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
Comment 25 Christian Fredrik Kalager Schaller 2005-12-04 23:13:53 UTC
Fixed. Closing.
Comment 26 Andy Wingo 2006-01-13 11:01:08 UTC
*** Bug 315078 has been marked as a duplicate of this bug. ***