Opened 4 years ago

Last modified 4 years ago

#6954 new defect

videotoolbox fails to build with MACOSX_DEPLOYMENT_TARGET=10.7

Reported by: Rafael Kitover Owned by:
Priority: normal Component: build system
Version: git-master Keywords: videotoolbox osx
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no


A lot of mac devs still target OS X 10.7 for their final builds, older versions of ffmpeg compile fine for this target, but with master I get:

libavcodec/videotoolbox.c:596:14: error: 'VTDecompressionSessionDecodeFrame' is only available on macOS 10.8 or newer [-Werror,-Wunguarded-availability]
    status = VTDecompressionSessionDecodeFrame(videotoolbox->session,
/System/Library/Frameworks/VideoToolbox.framework/Headers/VTDecompressionSession.h:181:1: note: 'VTDecompressionSessionDecodeFrame' has been explicitly marked
      partial here
libavcodec/videotoolbox.c:596:14: note: enclose 'VTDecompressionSessionDecodeFrame' in a __builtin_available check to silence this warning
    status = VTDecompressionSessionDecodeFrame(videotoolbox->session,

With --disable-videotoolbox everything compiles fine however.

I have no idea how many people care about videotoolbox support with a 10.7 target, just reporting this.

It may be good to check the target during the autodetection.

Change History (7)

comment:1 by Carl Eugen Hoyos, 4 years ago

Component: ffmpegbuild system
Keywords: mac removed
Priority: wishnormal
Type: enhancementdefect

Please provide your configure line

comment:2 by Rafael Kitover, 4 years ago

The configure command I used is:

./configure  '--disable-shared' '--enable-static' '--prefix=/usr' '--pkg-config-flags=--static' '--enable-nonfree' '--extra-version=tessus' '--enable-avisynth' '--enable-fontconfig' '--enable-gpl' '--enable-version3' '--enable-libass' '--enable-libbluray' '--enable-libfreetype' '--enable-libgsm' '--enable-libmodplug' '--enable-libmp3lame' '--enable-libopencore-amrnb' '--enable-libopencore-amrwb' '--enable-libopus' '--enable-libsnappy' '--enable-libsoxr' '--enable-libspeex' '--enable-libtheora' '--enable-libvidstab' '--enable-libvo-amrwbenc' '--enable-libvorbis' '--enable-libvpx' '--enable-libwavpack' '--enable-libx264' '--enable-libx265' '--enable-libxavs' '--enable-libxvid' '--enable-libzmq' '--enable-openssl' '--enable-lzma' '--extra-cflags=-DMODPLUG_STATIC -DZMQ_STATIC' '--extra-cxxflags=-DMODPLUG_STATIC -DZMQ_STATIC' '--extra-objcflags=-DMODPLUG_STATIC -DZMQ_STATIC' '--extra-ldflags=-framework CoreText'

Adding --disable-videotoolbox makes my build succeed.

comment:3 by Carl Eugen Hoyos, 4 years ago

How does this configure line enforce building for 10.7?

comment:4 by Rafael Kitover, 4 years ago

For that the easiest way is to set the env var:


comment:5 by Carl Eugen Hoyos, 4 years ago

When do you set it?
What happens if you explicit pass the required version to configure?

comment:6 by Rafael Kitover, 4 years ago

You set it in bash before you call configure and before you call make.

If you want to set it in configure, you can do it like this:

./configure --extra-cflags='-mmacosx-version-min=10.7' --extra-cxxflags='-mmacosx-version-min=10.7' --extra-objcflags='-mmacosx-version-min=10.7' --extra-ldflags='-mmacosx-version-min=10.7'

I haven't tried this yet but it should produce the same result.

Last edited 4 years ago by Rafael Kitover (previous) (diff)

comment:7 by Rafael Kitover, 4 years ago

Yup, just tried the configure command above, build produces the same errors.

Note: See TracTickets for help on using tickets.