GNOME Bugzilla – Bug 462737
compilation breaks with g++-4.2 and gcc-4.2
Last modified: 2007-10-10 11:45:26 UTC
make[1]: Entering directory `/home/bilboed/work/cvs/gst-plugins-bad/gst/modplug' /bin/sh ../../libtool --tag=CXX --mode=compile g++ -DHAVE_CONFIG_H -I. -I../.. -I../../gst-libs -I../../gst-libs -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -Wall -Werror -g -DGST_DISABLE_DEPRECATED -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -g -O2 -MT libgstmodplug_la-gstmodplug.lo -MD -MP -MF .deps/libgstmodplug_la-gstmodplug.Tpo -c -o libgstmodplug_la-gstmodplug.lo `test -f 'gstmodplug.cc' || echo './'`gstmodplug.cc g++ -DHAVE_CONFIG_H -I. -I../.. -I../../gst-libs -I../../gst-libs -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -Wall -Werror -g -DGST_DISABLE_DEPRECATED -pthread -I/usr/include/gstreamer-0.10 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/libxml2 -g -O2 -MT libgstmodplug_la-gstmodplug.lo -MD -MP -MF .deps/libgstmodplug_la-gstmodplug.Tpo -c gstmodplug.cc -fPIC -DPIC -o .libs/libgstmodplug_la-gstmodplug.o cc1plus: warnings being treated as errors gstmodplug.cc:65: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:65: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:65: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:65: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:113: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:119: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc: In function 'void gst_modplug_base_init(void*)': gstmodplug.cc:156: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:156: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc: At global scope: gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' gstmodplug.cc:835: warning: deprecated conversion from string constant to 'gchar*' make[1]: *** [libgstmodplug_la-gstmodplug.lo] Error 1 make[1]: Leaving directory `/home/bilboed/work/cvs/gst-plugins-bad/gst/modplug' make: *** [all-recursive] Error 1
The issue is related to the fact that the following core structures/functions take a 'gchar*' whereas in all plugins we give them a constant string. Not sure whether this should be fix in the c++ plugins... or in core.
A lot of stuff in core should have been 'const gchar *', wbut we can't change it as this would break some other code (see Bug #339744). For now we can only disabled -Werror for c++ plugins I belive.
Should be fixed now: 2007-10-10 Tim-Philipp Müller <tim at centricular dot net> * configure.ac: Require core CVS. This is implicit in the -base CVS requirement already, so we might just well spell it out. Also, we do need at least 0.10.14 for gst_element_class_set_details_simple(). Make check for gmyth a bit more restrictive so things don't break if the next version changes API. * ext/alsaspdif/alsaspdifsink.c: Work around alsa alloca macros triggering 'always evaluates to true' warnings with gcc-4.2 and fix compilation with gcc-4.2. Also don't leak the device string. * ext/mpeg2enc/gstmpeg2enc.cc: * ext/soundtouch/gstpitch.cc: * gst/modplug/gstmodplug.cc: Fix compilation with g++4.2 and -Wall -Werror (also needs plugin define fix from core CVS). Fixes #462737.