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 770587 - qtkitvideosrc: 'QTKit/QTKit.h' file not found (macOS Sierra)
qtkitvideosrc: 'QTKit/QTKit.h' file not found (macOS Sierra)
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Mac OS
: Normal blocker
: 1.10.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks: 772451
 
 
Reported: 2016-08-30 09:02 UTC by Alexander Mezin
Modified: 2016-10-18 06:33 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Build log (90.26 KB, text/plain)
2016-08-30 09:02 UTC, Alexander Mezin
  Details
config.log (502.74 KB, text/plain)
2016-08-30 09:03 UTC, Alexander Mezin
  Details
applemedia: Conditionally compile qtkitvideosrc (2.86 KB, patch)
2016-08-30 13:22 UTC, Sebastian Dröge (slomo)
committed Details | Review
Use AC_COMPILE_IFELSE instead of AC_CHECK_HEADER for QTKit.h detection (1.23 KB, patch)
2016-10-08 10:12 UTC, Nirbheek Chauhan
needs-work Details | Review

Description Alexander Mezin 2016-08-30 09:02:42 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
Comment 1 Alexander Mezin 2016-08-30 09:03:21 UTC
Created attachment 334420 [details]
config.log
Comment 2 Sebastian Dröge (slomo) 2016-08-30 13:22:08 UTC
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.
Comment 3 Sebastian Dröge (slomo) 2016-08-30 13:24:37 UTC
Can you check if this helps for you?
Comment 4 Alexander Mezin 2016-08-30 14:59:44 UTC
Yes, it solves the problem.
Will 1.8 branch be fixed too?
Comment 5 Alexander Mezin 2016-08-30 15:01:18 UTC
And, by the way, there is a similar problem in "good" plugins: https://bugzilla.gnome.org/show_bug.cgi?id=770526
Comment 6 Sebastian Dröge (slomo) 2016-08-31 07:03:26 UTC
Attachment 334436 [details] pushed as 807b032 - applemedia: Conditionally compile qtkitvideosrc
Comment 7 Nirbheek Chauhan 2016-10-07 18:12:29 UTC
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
Comment 8 Nirbheek Chauhan 2016-10-07 20:27:24 UTC
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.
Comment 9 Nirbheek Chauhan 2016-10-08 10:12:34 UTC
Created attachment 337215 [details] [review]
Use AC_COMPILE_IFELSE instead of AC_CHECK_HEADER for QTKit.h detection
Comment 10 Sebastian Dröge (slomo) 2016-10-13 09:33:17 UTC
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 11 Nirbheek Chauhan 2016-10-14 15:34:10 UTC
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.
Comment 12 Sebastian Dröge (slomo) 2016-10-15 07:06:37 UTC
Can this be closed then?
Comment 13 Nirbheek Chauhan 2016-10-15 16:45:29 UTC
Yes, it's not a bug in -bad. I'll fix it in Cerbero.
Comment 14 Nirbheek Chauhan 2016-10-18 06:33:23 UTC
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.