bilibili / ijkplayer

Android/iOS video player based on FFmpeg n3.4, with MediaCodec, VideoToolbox support.
GNU General Public License v2.0
32.54k stars 8.13k forks source link

Can not compile ffmepg on MacOS 11.3.1 #5265

Open RustyKnight opened 3 years ago

RustyKnight commented 3 years ago

So, following the instructions provided, I do...

./init-ios.sh
cd config
rm module.sh
ln -s module-default.sh module.sh
cd ios
sh compile-ffmpeg.sh clean
sh compile-ffmpeg.sh arm64

But this fails

====================
[*] check xcode version
====================
FF_ALL_ARCHS = 
====================
[*] check host
====================
FF_ARCH=arm64
FF_BUILD_OPT=
build_root: /Users/shanew/Development/Swann/ffmpeg/ijkplayer/ios
====================
[*] check gas-preprocessor
====================
gasp: /Users/shanew/Development/Swann/ffmpeg/ijkplayer/ios/../extra/gas-preprocessor/gas-preprocessor.pl
====================
[*] config arch arm64
====================
build_name: ffmpeg-arm64
platform:   iPhoneOS
osversion:  -miphoneos-version-min=12.0
====================
[*] make ios toolchain ffmpeg-arm64
====================
build_source: /Users/shanew/Development/Swann/ffmpeg/ijkplayer/ios/ffmpeg-arm64
build_prefix: /Users/shanew/Development/Swann/ffmpeg/ijkplayer/ios/build/ffmpeg-arm64/output

--------------------
[*] configurate ffmpeg
--------------------

--------------------
[*] check OpenSSL
----------------------

--------------------
[*] configure
----------------------
reuse configure

--------------------
[*] compile ffmpeg
--------------------
-arch arm64 -miphoneos-version-min=12.0
GASPP_FIX_XCODE5=1
CC  libavcodec/videotoolbox.o
CC  libavcodec/vqavideo.o
CC  libavcodec/wavpack.o
libavcodec/videotoolbox.c:627:14: error: 'VTDecompressionSessionDecodeFrame' is only available on iOS 8.0 or newer [-Werror,-Wunguarded-availability]
    status = VTDecompressionSessionDecodeFrame(videotoolbox->session,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTDecompressionSession.h:184:1: note: 'VTDecompressionSessionDecodeFrame' has been marked as being introduced in iOS 8.0 here, but the deployment target is iOS 7.0.0
VTDecompressionSessionDecodeFrame(
^
libavcodec/videotoolbox.c:627:14: note: enclose 'VTDecompressionSessionDecodeFrame' in a __builtin_available check to silence this warning
    status = VTDecompressionSessionDecodeFrame(videotoolbox->session,
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/videotoolbox.c:633:18: error: 'VTDecompressionSessionWaitForAsynchronousFrames' is only available on iOS 8.0 or newer [-Werror,-Wunguarded-availability]
        status = VTDecompressionSessionWaitForAsynchronousFrames(videotoolbox->session);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTDecompressionSession.h:298:1: note: 'VTDecompressionSessionWaitForAsynchronousFrames' has been marked as being introduced in iOS 8.0 here, but the deployment target is iOS 7.0.0
VTDecompressionSessionWaitForAsynchronousFrames(
^
libavcodec/videotoolbox.c:633:18: note: enclose 'VTDecompressionSessionWaitForAsynchronousFrames' in a __builtin_available check to silence this warning
        status = VTDecompressionSessionWaitForAsynchronousFrames(videotoolbox->session);
                 ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/videotoolbox.c:817:14: error: 'VTDecompressionSessionCreate' is only available on iOS 8.0 or newer [-Werror,-Wunguarded-availability]
    status = VTDecompressionSessionCreate(NULL,                      // allocator
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTDecompressionSession.h:123:1: note: 'VTDecompressionSessionCreate' has been marked as being introduced in iOS 8.0 here, but the deployment target is iOS 7.0.0
VTDecompressionSessionCreate(
^
libavcodec/videotoolbox.c:817:14: note: enclose 'VTDecompressionSessionCreate' in a __builtin_available check to silence this warning
    status = VTDecompressionSessionCreate(NULL,                      // allocator
             ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
libavcodec/videotoolbox.c:862:9: error: 'VTDecompressionSessionInvalidate' is only available on iOS 8.0 or newer [-Werror,-Wunguarded-availability]
        VTDecompressionSessionInvalidate(videotoolbox->session);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS14.5.sdk/System/Library/Frameworks/VideoToolbox.framework/Headers/VTDecompressionSession.h:144:1: note: 'VTDecompressionSessionInvalidate' has been marked as being introduced in iOS 8.0 here, but the deployment target is iOS 7.0.0
VTDecompressionSessionInvalidate( CM_NONNULL VTDecompressionSessionRef session ) API_AVAILABLE(macosx(10.8), ios(8.0), tvos(10.2));
^
libavcodec/videotoolbox.c:862:9: note: enclose 'VTDecompressionSessionInvalidate' in a __builtin_available check to silence this warning
        VTDecompressionSessionInvalidate(videotoolbox->session);
        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
4 errors generated.
make: *** [libavcodec/videotoolbox.o] Error 1
make: *** Waiting for unfinished jobs....

I've tried modifying the tools/do-compile-ffmpeg.sh to use iOS 12

elif [ "$FF_ARCH" = "arm64" ]; then
    FF_BUILD_NAME="ffmpeg-arm64"
    FF_BUILD_NAME_OPENSSL=openssl-arm64
    FF_XCRUN_OSVERSION="-miphoneos-version-min=12.0"
    FF_XCODE_BITCODE="-fembed-bitcode"
    FFMPEG_CFG_FLAGS="$FFMPEG_CFG_FLAGS $FFMPEG_CFG_FLAGS_ARM"
    FF_GASPP_EXPORT="GASPP_FIX_XCODE5=1"

but it makes no difference.

I'm using the master branch at commit 30eb9441945da795079492041a791c121d2b8206

Should not that I'm also trying to enable AVFilter

CHUANTU commented 3 years ago

也遇到了同样的问题,不知道解决没有?

chenanghui commented 6 months ago

这个问题解决了吗

TopBigOne commented 1 week ago

依旧没有解决