xcrun --show-sdk-version error, can't build with xcode on mojave

Viewed 867

I'm having problems getting a cmake project to compile with xcode on macOS Mojave. Here's the error message associated with the build problem.

-- [polly] Used toolchain: Xcode (OS X default) / clang / LLVM Standard C++ Library (libc++) / c++11 support
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk'

'xcrun --show-sdk-version' failed

Additionally, I've stumbled on the following incoherence.

localhost:~ ram$ xcrun --show-sdk-path
/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk
localhost:~ ram$ xcrun --show-sdk-version
xcodebuild: error: SDK "/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk" cannot be located.
xcrun: error: unable to lookup item 'SDKVersion' in SDK '/Library/Developer/CommandLineTools/SDKs/MacOSX10.14.sdk'

I've also noticed that xrun is able to find 'MacOSX10.13.sdk', but not in the same path:

localhost:~ ram$ xcrun --sdk macosx10.13 --show-sdk-path
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX10.13.sdk

Does anyone know what might be the problem and, more importantly, how to fix this?

0 Answers
Related