kewlbear / FFmpeg-iOS-build-script

Shell scripts to build FFmpeg for iOS and tvOS
3.03k stars 899 forks source link

xcrun -sdk iphoneos clang is unable to create an executable file. #41

Closed daneov closed 9 years ago

daneov commented 9 years ago

Dear,

When executing the script I receive the following output :

sh build-ffmpeg.sh 
    building arm64...
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    Configured with: --prefix=/Applications/Xcode.app/Contents/Developer/usr --with-gxx-include-dir=/usr/include/c++/4.2.1
    xcrun -sdk iphoneos clang is unable to create an executable file.
    C compiler test failed.

The script is a fresh checkout, I'm trying ffmpeg version 2.7.2 & I've set the deployment target in the script to 7.0.

I've never done something like this before, so if you require additional logs/information I'll be happy too, if you point me to where I should get them from as well :)

Thanks in advance.

khollm commented 9 years ago

I have the same problem I'm using the script with Xcode 6.4 and with yam 1.3.0

if I double click on the config log I get this warning

WARNING: Unknown C compiler xcrun -sdk iphoneos clang, unable to select optimal CFLAGS check_ld cc check_cc BEGIN /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.cHmrwrd6.c 1 int main(void){ return 0; } END /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.cHmrwrd6.c xcrun -sdk iphoneos clang -arch arm64 -mios-version-min=6.0 -fembed-bitcode -c -o /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.6WyqsPxl.o /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.cHmrwrd6.c xcrun: error: missing DEVELOPER_DIR path: C compiler test failed.

kewlbear commented 9 years ago

Try this: http://stackoverflow.com/a/21475042/2570853

khollm commented 9 years ago

thanks for the answer the error in the config.log change now it has become check_cc BEGIN /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.jRt7w1XB.c 1 int main(void){ return 0; } END /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.jRt7w1XB.c xcrun -sdk iphoneos clang -arch arm64 -mios-version-min=6.0 -fembed-bitcode -c -o /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.nkJL4GlK.o /var/folders/xr/n8vn7whj4wx58jqsts20_mph0000gn/T/ffconf.jRt7w1XB.c clang: error: unknown argument: '-fembed-bitcode' C compiler test failed.

kewlbear commented 9 years ago

You must be using Xcode 6. "-fembed-bitcode" is only available in Xcode 7. Edit build-ffmpeg.sh and remove "-fembed-bitcode".

khollm commented 9 years ago

yes I've seen it and done it it works (wanted to fully test it before say (right now it's working)) ps I really like the pseudo (kewlbear)

khollm commented 9 years ago

I've got a done thanks for you're script

kewlbear commented 9 years ago

You are welcome.