bilibili / ijkplayer

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

构建IJKMediaPlayer.framework静态库失败 #5602

Open tyrionchen opened 4 months ago

tyrionchen commented 4 months ago

Xcode: Version 15.4 (15F31d)

按照主页Build iOS部分的描述构建framework,编译没问题,但是libtool在创建静态库的时候会提示ffmpeg那几个静态库无效。 具体错误如下

libtool -static -arch_only arm64 -D -syslibroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS17.5.sdk -L/Users/cyy/Library/Developer/Xcode/DerivedData/IJKMediaPlayer-dwocpdslqcgxkxcmyyspfqnpjjiv/Build/Products/Debug-iphoneos -filelist /Users/cyy/Library/Developer/Xcode/DerivedData/IJKMediaPlayer-dwocpdslqcgxkxcmyyspfqnpjjiv/Build/Intermediates.noindex/IJKMediaPlayer.build/Debug-iphoneos/IJKMediaFramework.build/Objects-normal/arm64/IJKMediaFramework.LinkFileList /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a  -dependency_info /Users/cyy/Library/Developer/Xcode/DerivedData/IJKMediaPlayer-dwocpdslqcgxkxcmyyspfqnpjjiv/Build/Intermediates.noindex/IJKMediaPlayer.build/Debug-iphoneos/IJKMediaFramework.build/Objects-normal/arm64/IJKMediaFramework_libtool_dependency_info.dat -o /Users/cyy/Library/Developer/Xcode/DerivedData/IJKMediaPlayer-dwocpdslqcgxkxcmyyspfqnpjjiv/Build/Products/Debug-iphoneos/IJKMediaFramework.framework/IJKMediaFramework
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavcodec.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavfilter.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavformat.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libavutil.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswresample.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: i386 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: x86_64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a(//) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a(/) is not an object file (not allowed in a library)
error: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/libtool: for architecture: arm64 file: /Users/cyy/Desktop/VideoFrameInterpolation/apple/ijkplayer-ios/ios/IJKMediaPlayer/../build/universal/lib/libswscale.a(//) is not an object file (not allowed in a library)
tyrionchen commented 4 months ago
image
dissmiss commented 3 months ago

碰到了同样的问题

tyrionchen commented 3 months ago

碰到了同样的问题

我怀疑和xcode版本有关,具体说应该是随xcode安装的编译工具链的版本。 因为我现在macOS系统版本是sonoma 14.5,没办法安装太老的xcode,没办法验证这点

dissmiss commented 3 months ago

碰到了同样的问题

我怀疑和xcode版本有关,具体说应该是随xcode安装的编译工具链的版本。 因为我现在macOS系统版本是sonoma 14.5,没办法安装太老的xcode,没办法验证这点

应该是这样的,换了一台低版本的电脑编译成功了,但也可能和电脑上的某些环境变量或者编译链有关系,现在的这个电脑还有编译so库使用的一套环境,不清楚是否和它有关系