GNOME Bugzilla – Bug 643939
Need ERROR_OBJCFLAGS: osxvideosink does not compile on OSX 10.5 due to -Waddress
Last modified: 2013-07-17 10:27:14 UTC
gst-plugins-good 0.10.27 uses -Waddress, which is not supported by the gcc version shipped by Apple on Mac OSX Leopard: $ gcc --version i686-apple-darwin9-gcc-4.0.1 (GCC) 4.0.1 (Apple Inc. build 5493) Copyright (C) 2005 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ gcc -Waddress -o test test.c cc1: error: unrecognized command line option "-Waddress" While I could not test it, a look at [1] shows that this is still the case in git. Perhaps it would be best to make the use of this flag conditional based on the GCC version? [1] http://cgit.freedesktop.org/gstreamer/gst-plugins-good/tree/configure.ac
What's the output of configure? configure checks for all of the warning compiler flags if they're supported by the compiler before using them
Created attachment 182544 [details] config.log I've attached the config.log file, this should contain all the info you need, right?
configure:24413: checking to see if compiler understands -Waddress configure:24430: gcc-4.2 -std=gnu99 -c -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include -D_XOPEN_SOURCE -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32 -arch i386 -Waddress -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include -D_XOPEN_SOURCE -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32 -arch i386 conftest.c >&5 configure:24430: $? = 0 configure:24445: result: yes No sign of any compiler warning/error/output (but note that configure seems to find/use gcc-4.2, but your gcc is 4.0.2). What's the output of 'make' where it fails? (incl. 10 previous lines)
Apparently I also have gcc-4.2. However, gcc (without a version) refers to gcc 4.0.1. Here's the output: make -C oss4 make -C osxaudio CC libgstosxaudio_la-gstosxringbuffer.lo CC libgstoss4audio_la-oss4-audio.lo CC libgstoss4audio_la-oss4-mixer.lo CC libgstoss4audio_la-oss4-mixer-enum.lo CC libgstoss4audio_la-oss4-mixer-slider.lo CC libgstoss4audio_la-oss4-mixer-switch.lo CC libgstosxaudio_la-gstosxaudioelement.lo CC libgstoss4audio_la-oss4-property-probe.lo CC libgstoss4audio_la-oss4-sink.lo CC libgstosxaudio_la-gstosxaudiosink.lo CC libgstoss4audio_la-oss4-source.lo CC libgstosxaudio_la-gstosxaudiosrc.lo CCLD libgstoss4audio.la CC libgstosxaudio_la-gstosxaudio.lo make -C osxvideo OBJC libgstosxvideosink_la-osxvideosink.lo cc1obj: error: unrecognized command line option "-Waddress" make[3]: *** [libgstosxvideosink_la-osxvideosink.lo] Error 1 make[2]: *** [osxvideo] Error 2 make[2]: *** Waiting for unfinished jobs.... CCLD libgstosxaudio.la make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 ERROR: command exited with exit code 512: make -j2 Running verbosely without -j2: ake -C osxvideo /bin/sh ../../libtool --tag=disable-static --mode=compile gcc -DHAVE_CONFIG_H -I. -I../.. -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include -D_XOPEN_SOURCE -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32 -arch i386 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include -D_XOPEN_SOURCE -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32 -arch i386 -I../../gst-libs -D_REENTRANT -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/gstreamer-0.10 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/glib-2.0 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/lib/glib-2.0/include -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/libxml2 -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -Wall -Wdeclaration-after-statement -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs -g -D_REENTRANT -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/gstreamer-0.10 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/glib-2.0 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/lib/glib-2.0/include -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/libxml2 -D_REENTRANT -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/gstreamer-0.10 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/glib-2.0 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/lib/glib-2.0/include -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/libxml2 -Wno-aggregate-return -MT libgstosxvideosink_la-osxvideosink.lo -MD -MP -MF .deps/libgstosxvideosink_la-osxvideosink.Tpo -c -o libgstosxvideosink_la-osxvideosink.lo `test -f 'osxvideosink.m' || echo './'`osxvideosink.m libtool: compile: gcc -DHAVE_CONFIG_H -I. -I../.. -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include -D_XOPEN_SOURCE -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32 -arch i386 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include -D_XOPEN_SOURCE -isysroot /Developer/SDKs/MacOSX10.5.sdk -mmacosx-version-min=10.5 -m32 -arch i386 -I../../gst-libs -D_REENTRANT -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/gstreamer-0.10 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/glib-2.0 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/lib/glib-2.0/include -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/libxml2 -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -DG_DISABLE_ASSERT -Wall -Wdeclaration-after-statement -Wpointer-arith -Wmissing-declarations -Wmissing-prototypes -Wredundant-decls -Wwrite-strings -Wold-style-definition -Winit-self -Wmissing-include-dirs -Waddress -Wno-multichar -Wnested-externs -g -D_REENTRANT -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/gstreamer-0.10 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/glib-2.0 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/lib/glib-2.0/include -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/libxml2 -D_REENTRANT -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/gstreamer-0.10 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/glib-2.0 -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/lib/glib-2.0/include -I/Users/ruben/Projects/bockbuild/profiles/banshee/build-root/_install/include/libxml2 -Wno-aggregate-return -MT libgstosxvideosink_la-osxvideosink.lo -MD -MP -MF .deps/libgstosxvideosink_la-osxvideosink.Tpo -c osxvideosink.m -fno-common -DPIC -o .libs/libgstosxvideosink_la-osxvideosink.o cc1obj: error: unrecognized command line option "-Waddress" make[3]: *** [libgstosxvideosink_la-osxvideosink.lo] Error 1 make[2]: *** [osxvideo] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2
Created attachment 182546 [details] Same output, readable
We normally check availability of compiler flags at configure time... ... but we only do that for CC/CXX and not for OBJC.
So we need all the checks for OBJC again and OBJC specific CFLAGS. Shouldn't be too hard to add, the same is already done for CXX in common/m4/gst-error.m4
Not very elegant, but should hopefully help until we fix this properly: commit 85932c74df99d6d222c5e092db8354a24e717fa9 Author: Tim-Philipp Müller <tim.muller@collabora.co.uk> Date: Sun Apr 24 14:03:56 2011 +0100 configure: don't pass -Waddress to ObjC compiler on OSX when compiling osxvideosink Temporary workaround until we fix this properly and check for the ObjC warning/error flags instead of just passing CFLAGS to the ObjC compiler. https://bugzilla.gnome.org/show_bug.cgi?id=643939
Haven't all those issues been fixed with latest osx commits in git master ?
Yes