GNOME Bugzilla – Bug 770587
qtkitvideosrc: 'QTKit/QTKit.h' file not found (macOS Sierra)
Last modified: 2016-10-18 06:33:23 UTC
Created attachment 334419 [details] Build log qtkitvideosrc (applemedia plugin) fails to build on macOS Sierra (using Homebrew). qtkitvideosrc.m:24:9: fatal error: 'QTKit/QTKit.h' file not found #import <QTKit/QTKit.h> ^ 1 error generated. make[3]: *** [libgstapplemedia_la-qtkitvideosrc.lo] Error 1 make[3]: *** Waiting for unfinished jobs.... make[2]: *** [applemedia] Error 2 make[1]: *** [all-recursive] Error 1 make: *** [all] Error 2 Full build log is attached
Created attachment 334420 [details] config.log
Created attachment 334436 [details] [review] applemedia: Conditionally compile qtkitvideosrc The API was deprecated in 10.9 and apparently does not exist in the SDK for macOS Sierra anymore.
Can you check if this helps for you?
Yes, it solves the problem. Will 1.8 branch be fixed too?
And, by the way, there is a similar problem in "good" plugins: https://bugzilla.gnome.org/show_bug.cgi?id=770526
Attachment 334436 [details] pushed as 807b032 - applemedia: Conditionally compile qtkitvideosrc
I still get this error with Mac OS X 10.11.6 and XCode 8. The configure check evaluates to "yes": configure:33716: checking for QTKit/QTKit.h configure:33716: clang -E -Wno-error -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include conftest.c configure:33716: $? = 0 configure:33716: result: yes ... ac_cv_header_QTKit_QTKit_h=yes but the build still fails with the same error: /Applications/Xcode.app/Contents/Developer/usr/bin/make -C applemedia libtool: compile: clang -DHAVE_CONFIG_H -I. -I../.. -Dgst_core_media_buffer_new=gst_core_media_buffer_priv_new -Dgst_core_media_buffer_get_type=gst_core_media_buffer_priv_get_type -Dgst_core_media_buffer_get_pixel_buffer=gst_core_media_buffer_priv_get_pixel_buffer -Dgst_core_video_buffer_new=gst_core_video_buffer_priv_new -Dgst_core_video_buffer_get_type=gst_core_video_buffer_priv_get_type -Wno-error -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include -I../../gst-libs -I../../gst-libs -mmacosx-version-min=10.8 -D_REENTRANT -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include/gstreamer-1.0 -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include/glib-2.0 -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/lib/glib-2.0/include -DGST_USE_UNSTABLE_API -DG_THREADS_MANDATORY -DG_DISABLE_CAST_CHECKS -Wall -Wmissing-declarations -Wredundant-decls -Wwrite-strings -Wformat-nonliteral -Wformat-security -Winit-self -Wmissing-include-dirs -Wno-multichar -g -D_REENTRANT -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include/gstreamer-1.0 -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include/glib-2.0 -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/lib/glib-2.0/include -D_REENTRANT -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include/gstreamer-1.0 -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include/glib-2.0 -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/lib/glib-2.0/include -Wall -g -O2 -arch x86_64 -m64 -Wno-error=format-nonliteral -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include -mmacosx-version-min=10.8 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -Wall -g -O2 -arch x86_64 -m64 -Wno-error=format-nonliteral -I/Users/nirbheek/projects/centricular/cerbero/build/dist/darwin_x86_64/include -mmacosx-version-min=10.8 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk -Wno-error -DGSTREAMER_GLIB_COCOA_NSAPPLICATION=1 -MT libgstapplemedia_la-qtkitvideosrc.lo -MD -MP -MF .deps/libgstapplemedia_la-qtkitvideosrc.Tpo -c qtkitvideosrc.m -fno-common -DPIC -o .libs/libgstapplemedia_la-qtkitvideosrc.o qtkitvideosrc.m:24:9: fatal error: 'QTKit/QTKit.h' file not found #import <QTKit/QTKit.h> ^ 1 error generated. make[3]: *** [libgstapplemedia_la-qtkitvideosrc.lo] Error 1
The difference is `-isysroot /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.12.sdk` which is the sdk-root added by Cerbero from darwin.config to CFLAGS. It sets the system include directory. Sadly, AC_CHECK_HEADERS ignores CFLAGS. We should replace that check with an AC_COMPILE_IFELSE or similar.
Created attachment 337215 [details] [review] Use AC_COMPILE_IFELSE instead of AC_CHECK_HEADER for QTKit.h detection
Comment on attachment 337215 [details] [review] Use AC_COMPILE_IFELSE instead of AC_CHECK_HEADER for QTKit.h detection AC_CHECK_HEADER should use CPPFLAGS though. Would that help? Otherwise go ahead with merging this :)
Comment on attachment 337215 [details] [review] Use AC_COMPILE_IFELSE instead of AC_CHECK_HEADER for QTKit.h detection We should set CPPFLAGS in Cerbero in that case. That sounds more correct.
Can this be closed then?
Yes, it's not a bug in -bad. I'll fix it in Cerbero.
FTR, Cerbero commit: commit fb42d4ec9b8e7bce1cdfb4bb03e283a99b55ebf8 Author: Nirbheek Chauhan <nirbheek@centricular.com> Date: Tue Oct 18 11:29:37 2016 +0530 config/darwin: Set includes in CPPFLAGS instead of elsewhere This allows checks like AC_CHECK_HEADER and others to use the correct headers. Also, don't need to set them in CFLAGS, CXXFLAGS, etc if they're in CPPFLAGS.