试图编译的iPhoneOS平台FFmpeg的库与ARMv6及arv7架构(Trying to com

2019-08-19 18:55发布

我试图编译IOS平台FFmpeg的图书馆与ARM7架构。 我下载了FFMPEG库从http://www.ffmpeg.org 。

我能够成功地建立静态库对于i386架构的iPhoneSimulator。 但我需要的iPhoneOS的库。 使用configure命令我得到一个错误。 下面是我的命令的详细信息。

i386的(这是无差错):

./configure  --enable-cross-compile --disable-debug --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc --disable-network  --disable-everything  --enable-protocol=file --enable-demuxer=mov  --enable-muxer=mpegts --enable-bsf=h264_mp4toannexb   --arch=i386 --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/usr/bin/gcc --as='./gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=i386 --extra-cflags='-arch i386' --extra-ldflags='-arch i386 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator6.1.sdk' --prefix="/Users/amit/Desktop/LivuLib-master/LivuLIb/ffmpeg/bin/newLib"

对ARMv7:

./configure  --enable-cross-compile --disable-debug --disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver --disable-doc --disable-network  --disable-everything  --enable-protocol=file --enable-demuxer=mov  --enable-muxer=mpegts --enable-bsf=h264_mp4toannexb   --arch=armv7 --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc --as='./gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=cortex-a9 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk' --prefix="/Users/amit/Desktop/LivuLib-master/LivuLIb/ffmpeg/bin/newLib"

对于ARM7上面的命令我得到这个错误:

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc is unable to create an executable file.
C compiler test failed.

If you think configure made a mistake, make sure you are using the latest
version from SVN.

所以,请建议我一个可能的解决方案。 为什么不工作? 或者,我需要进行任何更新。 谢谢。

Answer 1:

我意识到这个问题2.5个月前被问及〜,所以提问者可能已移动,但是我碰到它,而搜索的答案,同样的问题。 所以,我希望,这将是帮助人在那里!

我真正要做的就是确认所有我所用的路径实际上是指向已存在的东西。

具体来说,我试图运行:

./configure \
--prefix=armv7 \
--disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver \
--enable-avresample --enable-cross-compile \
--sysroot="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk" \
--target-os=darwin \
--cc="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" \
--extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=6.0" \
--extra-ldflags="-arch armv7 -isysroot /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk -miphoneos-version-min=6.0" \
--arch=arm --cpu=cortex-a9 --enable-pic

^从http://www.tangentsoftworks.com/2012/11/12/how-to-prepare-your-mac-for-ios-development-with-ffmpeg-libraries/

当我无法得到它的工作,我决定不再懒惰,实际上签入的路径中列出的目录:任何以“/应用/ ...”开头。 我发现的是,我没有“iPhoneOS6.0.sdk”安装(它的路径上面提到的)。

更改脚本来此工作:

./configure \
--prefix=armv7 \
--disable-ffmpeg --disable-ffplay --disable-ffprobe --disable-ffserver \
--enable-avresample --enable-cross-compile \
--sysroot="/applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk" \
--target-os=darwin --cc="/applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc" \
--extra-cflags="-arch armv7 -mfpu=neon -miphoneos-version-min=6.0" \
--extra-ldflags="-arch armv7 -isysroot /applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk -miphoneos-version-min=6.0" \
--arch=arm --cpu=cortex-a9 --enable-pic 

总之,只要仔细检查你的路。 希望帮助!



文章来源: Trying to compile the FFMPEG libraries for iPhoneOS platform with armv6 and arv7 architecture