GNOME Bugzilla – Bug 324530
plugin arts doesn't compile with -Werrror enabled
Last modified: 2006-01-04 16:12:03 UTC
I was compiling gst-plugin from CVS HEAD using jhbuild (module gnome-2.14); everything from scratch. The error message is the following: g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I/usr/include/kde/arts -pthread -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I../../gst-libs -I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/home/gpoo/gnome/jhbuild/include/gstreamer-0.8 -I/home/gpoo/gnome/jhbuild/include/glib-2.0 -I/home/gpoo/gnome/jhbuild/lib/glib-2.0/include -I/home/gpoo/gnome/jhbuild/include/libxml2 -DGST_DISABLE_DEPRECATED -Wall -Werror -g -O2 -MT libgstarts_la-gst_artsio_impl.lo -MD -MP -MF .deps/libgstarts_la-gst_artsio_impl.Tpo -c gst_artsio_impl.cc -fPIC -DPIC -o .libs/libgstarts_la-gst_artsio_impl.o cc1plus: warnings being treated as errors /usr/include/kde/arts/iomanager.h:93: warning: 'class Arts::IONotify' has virtual functions but non-virtual destructor /usr/include/kde/arts/iomanager.h:112: warning: 'class Arts::TimeNotify' has virtual functions but non-virtual destructor /usr/include/kde/arts/notification.h:54: warning: 'class Arts::NotificationClient' has virtual functions but non-virtual destructor /usr/include/kde/arts/startupmanager.h:42: warning: 'class Arts::StartupClass' has virtual functions but non-virtual destructor /usr/include/kde/arts/factory.h:45: warning: 'class Arts::Factory' has virtual functions but non-virtual destructor /usr/include/kde/arts/idlfilereg.h:41: warning: 'class Arts::IDLFileReg' has virtual functions but non-virtual destructor /usr/include/kde/arts/datapacket.h:43: warning: 'class Arts::GenericDataChannel' has virtual functions but non-virtual destructor /usr/include/kde/arts/asyncstream.h:44: warning: 'class Arts::GenericAsyncStream' has virtual functions but non-virtual destructor /usr/include/kde/arts/asyncstream.h: In instantiation of 'Arts::AsyncStream<float>': /usr/include/kde/arts/asyncstream.h:87: instantiated from here /usr/include/kde/arts/asyncstream.h:63: warning: 'class Arts::AsyncStream<float>' has virtual functions but non-virtual destructor /usr/include/kde/arts/asyncstream.h:88: warning: 'class Arts::FloatAsyncStream' has virtual functions but non-virtual destructor /usr/include/kde/arts/asyncstream.h: In instantiation of 'Arts::AsyncStream<Arts::mcopbyte>': /usr/include/kde/arts/asyncstream.h:94: instantiated from here /usr/include/kde/arts/asyncstream.h:63: warning: 'class Arts::AsyncStream<Arts::mcopbyte>' has virtual functions but non-virtual destructor /usr/include/kde/arts/asyncstream.h:95: warning: 'class Arts::ByteAsyncStream' has virtual functions but non-virtual destructor make[4]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext/arts' make[3]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext/arts' make[2]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext' make[1]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins' make[4]: *** [libgstarts_la-gst_artsio_impl.lo] Error 1 make[3]: *** [all] Error 2 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 g++ version: gpoo@mimos:~/cvs/gnome2/gst-plugins$ LC_ALL=C g++ -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --enable-languages=c,c++,java,f95,objc,ada,treelang --prefix=/usr --with-gxx-include-dir=/usr/include/c++/4.0.2 --enable-shared --with-system-zlib --libexecdir=/usr/lib --enable-nls --without-included-gettext --enable-threads=posix --program-suffix=-4.0 --enable-__cxa_atexit --enable-libstdcxx-allocator=mt --enable-clocale=gnu --enable-libstdcxx-debug --enable-java-gc=boehm --enable-java-awt=gtk --enable-gtk-cairo --with-java-home=/usr/lib/jvm/java-1.4.2-gcj-4.0-1.4.2.0/jre --enable-mpfr --disable-werror --enable-checking=release i486-linux-gnu Thread model: posix gcc version 4.0.2 20050808 (prerelease) (Ubuntu 4.0.1-4ubuntu9) Ubuntu Breezy.
Target branch used is GSTREAMER-0_8
It also has problems compiling the gstfaad plugin. gcc -DHAVE_CONFIG_H -I. -I. -I../.. -I../../gst-libs -I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/home/gpoo/gnome/jhbuild/include/gstreamer-0.8 -I/home/gpoo/gnome/jhbuild/include/glib-2.0 -I/home/gpoo/gnome/jhbuild/lib/glib-2.0/include -I/home/gpoo/gnome/jhbuild/include/libxml2 -DGST_DISABLE_DEPRECATED -Wall -Werror -g -O2 -MT libgstfaad_la-gstfaad.lo -MD -MP -MF .deps/libgstfaad_la-gstfaad.Tpo -c gstfaad.c -fPIC -DPIC -o .libs/libgstfaad_la-gstfaad.o cc1: warnings being treated as errors gstfaad.c: In function 'gst_faad_sinkconnect': gstfaad.c:313: warning: passing argument 4 of 'faacDecInit2' from incompatible pointer type make[3]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext/faad' make[2]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext' make[1]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins' gstfaad.c: In function 'gst_faad_chain': gstfaad.c:682: warning: passing argument 4 of 'faacDecInit' from incompatible pointer type make[3]: *** [libgstfaad_la-gstfaad.lo] Error 1 make[2]: *** [all-recursive] Error 1 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
faad in the 0.8 branch has just been fixed in CVS by backporting a fix from HEAD. the arts error is NOTGNOME, it's a header file that doesn't work with gcc4 - ultimately a distro problem or arts upstream problem. By default -Werror is used for CVS builds (but not for releases). You might be able to override that by using export CFLAGS="-Wno-error" or so.
Defining CFLAGS in the enviroment doesn't work, because is overrided by the command line option (-Werror) when the program is compiled. Anyway, there is another compiling error in mplex's header (part of mjpegtools): g++ -DHAVE_CONFIG_H -I. -I. -I../.. -I../../gst-libs -I../../gst-libs -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -pthread -I/home/gpoo/gnome/jhbuild/include/gstreamer-0.8 -I/home/gpoo/gnome/jhbuild/include/glib-2.0 -I/home/gpoo/gnome/jhbuild/lib/glib-2.0/include -I/home/gpoo/gnome/jhbuild/include/libxml2 -DGST_DISABLE_DEPRECATED -Wall -Werror -I/usr/include/mjpegtools -I/usr/include/mjpegtools/mpeg2enc -I/usr/include/mjpegtools/mplex -g -O2 -MT libgstmplex_la-gstmplex.lo -MD -MP -MF .deps/libgstmplex_la-gstmplex.Tpo -c gstmplex.cc -fPIC -DPIC -o .libs/libgstmplex_la-gstmplex.o cc1plus: warnings being treated as errors /usr/include/mjpegtools/mplex/stream_params.hpp:69: warning: 'class FrameIntervals' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/stream_params.hpp:76: warning: 'class ConstantFrameIntervals' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/inputstrm.hpp:78: warning: 'class MuxStream' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/inputstrm.hpp:137: warning: 'class DummyMuxStream' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/outputstrm.hpp:29: warning: 'class OutputStream' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/padstrm.hpp:29: warning: 'class PaddingStream' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/padstrm.hpp:40: warning: 'class VCDAPadStream' has virtual functions but non-virtual destructor /usr/include/mjpegtools/mplex/padstrm.hpp:52: warning: 'class DVDPriv2Stream' has virtual functions but non-virtual destructor gstmplexoutputstream.hh:29: warning: 'class GstMplexOutputStream' has virtual functions but non-virtual destructor make[3]: *** [libgstmplex_la-gstmplex.lo] Error 1 make[3]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext/mplex' make[2]: *** [all-recursive] Error 1 make[2]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins/ext' make[1]: *** [all-recursive] Error 1 make[1]: Leaving directory `/home/gpoo/cvs/gnome2/gst-plugins' make: *** [all] Error 2 The way to go is adding the followings options in autogen.sh: --disable-arts --disable-artstest --disable-artsc --disable-mplex This problem could stop people who want to test GNOME.
*** Bug 324737 has been marked as a duplicate of this bug. ***
So the right way to disable -Werror in GStreamer compilation seems to be % make ERROR_CFLAGS="" Is there any way to make jhbuild use this for GStreamer builds?
Added flag suggested by Federico in #324737, fixed.
Should all be fixed in CVS now, please re-open if not: 2006-01-04 Tim-Philipp Muller <tim at centricular dot net> * ext/mplex/Makefile.am: Add -Wno-non-virtual-dtor here as well (#324530). 2006-01-04 Thomas Vander Stichele <thomas at apestaart dot org> * ext/arts/Makefile.am: arts headers contain a bug failed on by newer gcc; compiling with -Wno-non-virtual-dtor "fixes" it (#324530)