Opened 7 years ago
Last modified 7 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 |
Description
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 VTDecompressionSessionDecodeFrame( ^ 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 , 7 years ago
Component: | ffmpeg → build system |
---|---|
Keywords: | mac removed |
Priority: | wish → normal |
Type: | enhancement → defect |
comment:2 by , 7 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:4 by , 7 years ago
For that the easiest way is to set the env var:
export MACOSX_DEPLOYMENT_TARGET=10.7
comment:5 by , 7 years ago
When do you set it?
What happens if you explicit pass the required version to configure?
comment:6 by , 7 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.
comment:7 by , 7 years ago
Yup, just tried the configure command above, build produces the same errors.
Please provide your configure line