XCode 8 error "Project ERROR: Xcode not set up properly", even though the license has been accepted
I can no longer build Qt project after updating to Xcode 8 today. I get the following error despite having followed the instructions from this answer.
Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild.
How to fix it?
I managed to get capybara-webkit (which uses QT) built with XCode 8 / MacOX Sierra after following these instructions (found here: https://forum.qt.io/topic/71119/project-error-xcode-not-set-up-properly/7)
- Move to the folder where you install Qt.
- Open in a text editor the file at Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
Find the line with text (for me it was line 15):
isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))): \
Replace line with:
isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null"))): \
Save & re-compile
A cleaner solution
cd /Applications/Xcode.app/Contents/Developer/usr/bin/ sudo ln -s xcodebuild xcrun
Run MaintenanceTool in Qt directory and update to version 5.8