iPhone SDK 4.3 libav compiling problem

匿名 (未验证) 提交于 2019-12-03 01:29:01

问题:

I faced with strange problem. I installed iPhone SDK 4.3 and xCode 4 and now I can't compile libav from ffmpeg for ARMv6 architecture. This is my script to compile it (it works fine for iPhone SDK 4.2):

./configure \ --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile \ --enable-encoder=rawvideo \ --enable-decoder=h264 \ --enable-decoder=mpeg4 \ --enable-encoder=mjpeg \ --enable-muxer=rawvideo \ --enable-demuxer=h264 \ --enable-parser=h264 \ --enable-cross-compile \ --arch=c \ --target-os=darwin \ --enable-libopencore-amrnb --enable-libopencore-amrwb \ --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1 \ --as='gas-preprocessor/gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer    /usr/bin/arm-apple-darwin10-gcc-4.2.1' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS4.3.sdk \ --cpu=arm1176jzf-s --extra-cflags='-arch armv6' --extra-ldflags='-arch armv6'  make clean make   

as a result I get library files but when I check it with lipo -info command it shows that library was compiled for i386 architecture.

Maybe somebody faced with such problem? Help me please.

Thanks.

回答1:

Updated Post

Here is an updated script that removes armv6, adds armv7s, uses the iOS 6.0 SDK, and fixes issues with changes to the lipo tool. Make sure you have the latest gas-preprocessor.pl from github in /usr/local/bin:

rm -r ./compiled  # configure for armv7 build ./configure \ --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \ --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \ --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk/usr/lib/system \ --target-os=darwin \ --arch=arm \ --cpu=cortex-a8 \ --extra-cflags='-arch armv7' \ --extra-ldflags='-arch armv7' \ --extra-cflags='-mfpu=neon -mfloat-abi=softfp -mvectorize-with-neon-quad' \ --prefix=compiled/armv7 \ --enable-pic \ --enable-neon \ --enable-cross-compile \ --enable-optimizations \ --disable-debug \ --disable-armv5te \ --disable-armv6 \ --disable-armv6t2 \ --disable-armvfp \ --disable-ffmpeg \ --disable-ffplay \ --disable-ffserver \ --disable-ffprobe \ --disable-doc  # build for armv7 make clean make && make install  # configure for armv7s build ./configure \ --cc=/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc \ --as='gas-preprocessor.pl /Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc' \ --sysroot=/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.0.sdk \ --extra-ldflags=-L/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/        
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!