xcodebuild Solution for OS X Mavericks
Many CUDA developers on Macs that migrated to Mavericks might have experienced
one (or as in my case, all) of the following, a)
clang: error: unsupported
xcodebuild says it requires Xcode but you have Xcode installed already,
and c) CUDA examples don’t compile or prompts
cudaGetDeviceCount returned 35,
maybe more. Here’s a work-around to just that.
To my suprise, this problem seems deeply rooted in the installation of Xcode. I’ve uninstalled and reinstalled it several times, but none seemed to work always. Different CUDA versions didn’t help either. It turns out all could be solved by simply typing these lines in your terminal
sudo mv /usr/bin/xcodebuild /usr/bin/xcodebuild~ sudo ln -s /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild /usr/bin/xcodebuild
Here, we’re just backing up your original
xcodebuild in your
and replacing it with a symlink to the Xcode installation. After doing these, make sure that
/usr/lib comes before
(Xcode seems unhappy about the latter).
Then? CUDA Samples and everything else that had these problems are all yours!
Unless otherwise mentioned, you are free to share my posts under the Creative Commons Attribution-ShareAlike 4.0 International License (CC BY-SA 4.0). blog comments powered by Disqus