Reputation: 23394
Xcode 5 breaks my compilation script. I suspect because clang is now located directly in /usr/bin instead of its usual location. However, I'm not sure how I can tell this to gcc. Any tips would be much appreciated. I am compiling for iOS.
CPPFLAGS= -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1
CXXFLAGS= -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1
CFLAGS=
gcc -Iinclude -arch i686 --sysroot=/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/SDKs/iPhoneSimulator7.0.sdk -fno-short-wchar -fno-short-enums -miphoneos-version-min=4.2.1 -c -o src_c/stem_UTF_8_danish.o src_c/stem_UTF_8_danish.c
gcc: failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory
make: *** [src_c/stem_UTF_8_danish.o] Error 71
Update. I was able to repeat the problem by directly calling gcc from the iPhoneSimulator usr/bin with no arguments.
tim$ /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform//Developer/us r/bin/gcc
gcc: failed to exec /Applications/Xcode.app/Contents/Developer/usr/bin/clang: No such file or directory
I was able to get it to compile by using clang from /usr/bin with the appropriate sysroot. but is this equivalent?
Upvotes: 1
Views: 4233
Reputation: 101
I noticed the same problem when I upgraded to Xcode 5.1 When I ran "xcrun -find clang", it said "You have not agreed to the XCode license agreements. You must agree to both Xcode license agreements below in order to use Xcode." It spewed out the agreements and gave me an opportunity to agree, which I did. And that fixed the problem. Go figure.
Cheers - Ed
Upvotes: 0