Qt Creator - Project Error: Xcode Not Set Up Properly. You May Need to Confirm the License Agreement by Running /Usr/Bin/Xcodebuild

Qt Creator - Project ERROR: Xcode not set up properly. You may need to confirm the license agreement by running /usr/bin/xcodebuild

>= Xcode 8

In Xcode 8, as Bruce said, this happens when Qt tries to find xcrun when it should be looking for xcodebuild.

Open the file:

Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf

Replace:

isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))

With:

isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))

~> Xcode 8

Before Xcode 8, this problem occurs when command line tools are installed after Xcode is installed. What happens is the Xcode-select developer directory gets pointed to /Library/Developer/CommandLineTools.

Point Xcode-select to the correct Xcode Developer directory with the command:

sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer

Confirm the license agreement with the command:

sudo xcodebuild -license

This will prompt you to read through the license agreement.

Enter agree to accept the terms.

XCode 8 error Project ERROR: Xcode not set up properly, even though the license has been accepted

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)

  1. Move to the folder where you install Qt.
  2. Open in a text editor the file at Qt_install_folder/5.7/clang_64/mkspecs/features/mac/default_pre.prf
  3. 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"))): \
  4. Save & re-compile

Qt does not work since Xcode 8

For the moment, untill Qt updates this is a fix:

Step 1:

Open the file:

<Qt installation folder>/5.7/clang_64/mkspecs/features/mac/default_pre.prf

Step 2:

Replace:

isEmpty($$list($$system("/usr/bin/xcrun -find xcrun 2>/dev/null")))

With:

isEmpty($$list($$system("/usr/bin/xcrun -find xcodebuild 2>/dev/null")))

QT Creator and OpenCV455: 'arm_neon.h' file not found

Okay, I found a solution after three days of re-installing and re-compiling everything in every possible configuration (like opencv with unix makefiles, xcode, forced target architecture of arm64 etc). What finally worked was to disable the ClangCodeModel flag in the plugin section of QtCreator (Menu: About/Plugins/ -> search for ClangCodeModel, disable the plugin and restart the application.

I'm pretty sure this is just a workaround, but at least I can work now as it should be and maybe this helps someone else. If anyone has some input on how to fix this issue at its core, any help or alternative answer is very appreciated.



Related Topics



Leave a reply



Submit