iOS project build locally but fail on cloud build - NSLocalizedFailureReason=No such file or directo

My project builds fine locally but fails on cloud build with errors. There are two items that caught my eyes:

Couldn’t discover the ‘clang’ compiler’s built-in search paths and preprocessor definitions for language dialect ‘objective-c++’.

NSLocalizedFailureReason=No such file or directory

Not sure which one is the main cause though. Does anyone has any insite?

 + Building with Xcode 6.0.1
15:        [xcode] 2015-07-28 04:39:47.231 xcodebuild[21262:141435]  DVTAssertions: Warning in /SourceCache/DVTiOSFrameworks/DVTiOSFrameworks-6254/IDEiOSSupportCore/DVTiPhoneSimulatorLocator.m:162
16:        [xcode] Please file a bug at http://bugreport.apple.com with this warning message and any useful information you can provide.
17:        [xcode] 2015-07-28 04:39:48.238 xcodebuild[21262:141441] error: Error Domain=NSPOSIXErrorDomain Code=2 "Non-zero exit code 1 returned from shell command: /APPLICATION_PATH/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch armv7 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x objective-c++ -c /dev/null 2>&1" UserInfo=0x7f93338d0850 {NSLocalizedDescription=Non-zero exit code 1 returned from shell command: /Applications/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch armv7 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x objective-c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
18:        [xcode] 2015-07-28 04:39:48.238 xcodebuild[21262:141441] Warning:  Couldn't discover the 'clang' compiler's built-in search paths and preprocessor definitions for language dialect 'objective-c++'.
19:        [xcode] 2015-07-28 04:39:48.255 xcodebuild[21262:141441] error: Error Domain=NSPOSIXErrorDomain Code=2 "Non-zero exit code 1 returned from shell command: /APPLICATION_PATH/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x objective-c++ -c /dev/null 2>&1" UserInfo=0x7f93317f0990 {NSLocalizedDescription=Non-zero exit code 1 returned from shell command: /Applications/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x objective-c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such file or directory}
20:        [xcode] 2015-07-28 04:39:48.255 xcodebuild[21262:141441] Warning:  Couldn't discover the 'clang' compiler's built-in search paths and preprocessor definitions for language dialect 'objective-c++'.
21:        [xcode] 2015-07-28 04:39:48.264 xcodebuild[21262:141441] error: Error Domain=NSPOSIXErrorDomain Code=3 "Non-zero exit code 1 returned from shell command: /APPLICATION_PATH/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch armv7 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x c++ -c /dev/null 2>&1" UserInfo=0x7f9333f05370 {NSLocalizedDescription=Non-zero exit code 1 returned from shell command: /Applications/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch armv7 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such process}
22:        [xcode] 2015-07-28 04:39:48.264 xcodebuild[21262:141441] Warning:  Couldn't discover the 'clang' compiler's built-in search paths and preprocessor definitions for language dialect 'c++'.
23:        [xcode] 2015-07-28 04:39:48.276 xcodebuild[21262:141441] error: Error Domain=NSPOSIXErrorDomain Code=3 "Non-zero exit code 1 returned from shell command: /APPLICATION_PATH/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x c++ -c /dev/null 2>&1" UserInfo=0x7f9333cf1030 {NSLocalizedDescription=Non-zero exit code 1 returned from shell command: /Applications/Xcode6_0_1.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -v -E -dM -arch arm64 -isysroot /Applications/Xcode6_0_1.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk -x c++ -c /dev/null 2>&1, NSLocalizedFailureReason=No such process}

Are you using the same XCode Version 6.0.1 locally, if not which version are you using? You can switch XCode versions in you UCB Dashboard.

I am using Xcode 6.4 on local machine. Does the minor version difference matter?

Yes, for certain things it makes a difference, although I don’t know if this is the case here. The latest XCode version is set to Xcode 6.3.1 in UCB that’s why I’m surprised to see 6.0.1 triggered in your build. Could you please go to your iOS settings in the UCB Dashboard and check if it is set to latest or XCode 6 and make a Clean Build and check the log again? Are there any specific features in your project which require XCode 6.4?

UCB setting is set to “use latest” (tried use Xcode 6 too, same result)
It just happened that in one build, it’s using 6.3.1 and it can build correctly. But other build for other project still use 6.0.1 and fail. Do we know why UCB use 6.0.1 most of time?

That sounds like a bug, we will check that, stay tuned!

Thanks for prompt reply! One thing I just found is that even if I set to latest, it uses 6.0, and switch to 6, it still uses 6.0, but then if I switch back to latest, it uses 6.3.
Seems new project always use 6.0 first

We found and fixed the bug, could you please give it a go again and let me know if it works properly now? :slight_smile: