xcodebuild segmentation fault running command line tools after Xcode 7

My system just updated to Xcode 7 and now when running the command line tools, i'm getting xcodebuild crash with Segmentation fault: 11


(vim-env)BeniMac:vim ben$ clang

sh: line 1: 20048 Segmentation fault: 11 /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild -sdk / -find clang 2> /dev/null

clang: error: unable to find utility "clang", not a developer tool or in PATH

(vim-env)BeniMac:vim ben$ /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild

Segmentation fault: 11

(vim-env)BeniMac:vim ben$


But if i run it manually from within Xcode.app, it runs OK:


(vim-env)BeniMac:vim ben$ /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang

clang: error: no input files



Anyone seen this? Any idea how to solve? I have tried re-installing command line tools (and yes, they are updated to the Xcode 7 versions)

Answered by puremourning in 58840022

FWIW i resolved this by removing XCode.app and sudo rm -rf /Library/Developer/CommandLineTools/, then reinstaling XCode 7

Accepted Answer

FWIW i resolved this by removing XCode.app and sudo rm -rf /Library/Developer/CommandLineTools/, then reinstaling XCode 7

I encountered the same problem, and I fixed it by running :


sudo xcodebuild -license accept
xcodebuild segmentation fault running command line tools after Xcode 7
 
 
Q