xcrun -sdk iphoneos clang is unable to create an executable file
mrbrantofgithub opened this issue · 7 comments
Error information is shown below:
xcrun -sdk iphoneos clang 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
ffmpeg-user@ffmpeg.org mailing list or IRC #ffmpeg on irc.freenode.net.
Include the log file "config.log" produced by configure as this will help
solve the problem.
As you can see in the message, I have to see config.log to figure out the reason.
@kewlbear Thank you for your reply. But I don't know where to find the "config.log" file.
You can do the following:
find -name config.log
Below is the last part of config.log. I have emailed the config.log file to ffmpeg-user@ffmpeg.org
My Xcode is version 9.2
"xcrun -sdk iphoneos clang -arch arm64 -mios-version-min=6.0 -fembed-bitcode -c -o /var/folders/3s/r_mvg2dd7hz5nyd5my5jztrh0000gp/T/ffconf.K8OIrHVS/test.o /var/folders/3s/r_mvg2dd7hz5nyd5my5jztrh0000gp/T/ffconf.K8OIrHVS/test.c
xcrun: error: SDK "iphoneos" cannot be located
xcrun -sdk iphoneos clang -arch arm64 -mios-version-min=6.0 -fembed-bitcode -o /var/folders/3s/r_mvg2dd7hz5nyd5my5jztrh0000gp/T/ffconf.K8OIrHVS/test /var/folders/3s/r_mvg2dd7hz5nyd5my5jztrh0000gp/T/ffconf.K8OIrHVS/test.o
xcrun: error: SDK "iphoneos" cannot be located
ld: warning: ignoring file /usr/lib/libSystem.dylib, missing required architecture arm64 in file /usr/lib/libSystem.dylib (2 slices)
ld: dynamic main executables must link with libSystem.dylib for architecture arm64
clang: error: linker command failed with exit code 1 (use -v to see invocation)
C compiler test failed."
After googling “xcrun: error: SDK "iphoneos" cannot be located”, I’m guessing some reasons:
- Did you rename Xcode.app?
- Did you install command line tools?
I fixed “xcrun: error: SDK "iphoneos" cannot be located” by referring to "gomatcha/matcha#6"
with "sudo xcode-select --switch /Applications/Xcode.app"
Thank you for your help again.
Glad I could help.