1
votes

I am trying to build ffmpeg on iOS6.1 (armv7), when I try to run ./configure like this:

./configure --disable-doc --disable-ffmpeg --disable-ffplay
--disable-ffserver    --enable-cross-compile --arch=arm --target-os=darwin    --cc=/applications/xcode.app/contents/Developer/usr/bin/gcc    --as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/usr/bin/gcc'   
--sysroot=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk
--cpu=cortex-a8 --extra-cflags='-arch armv7'    --extra-ldflags='-arch armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS5.1.sdk'
--enable-pic

I get the following error:

/applications/xcode.app/contents/Developer/usr/bin/gcc is unable to create an executable file. C compiler test failed.

Could somebody please provide the correct parameters in iOS6.1?

Update Command :

./configure --disable-doc --disable-ffmpeg --disable-ffplay --disable-ffserver --enable-cross-compile --arch=arm --target-os=darwin --cc=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 --as='gas-preprocessor/gas-preprocessor.pl /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2' --sysroot=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk --cpu=cortex-a8 --extra-cflags='-arch armv7' --extra-ldflags='-arch armv7 -isysroot /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS6.1.sdk' --enable-pic

Error in Update Command :

/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/llvm-gcc-4.2/bin/arm-apple-darwin10-llvm-gcc-4.2 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 Git. If the latest version fails, report the problem to the [email protected] mailing list or IRC #ffmpeg on irc.freenode.net. Include the log file "config.log" produced by configure as this will help solving the problem.

1
earlier your sysroot and isysroot were pointing to iPhoneOS5.1. Now that you've changed them to iPhoneOS6.1 (which is the correct path) try again using --cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc instead of the arm-apple-darwin10...Tushar Koul

1 Answers

2
votes

You are using...

--cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/gcc

That's wrong for armv7, you should be doing...

--cc=/applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1

Change the above to whatever arm-apple-darwin10-gcc-x.x.x version you have that bin folder.

As well, change the gas-preprocessor's target compiler to the same.

--as='gas-preprocessor/gas-preprocessor.pl /applications/xcode.app/contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin/arm-apple-darwin10-gcc-4.2.1'

Additionally, don't put an -arch armv7 in your --extra-cflags, you don't need it and you may get an error: unrecognized command line option "-arch"