Not all possible target environments can be supported due to missing compilers
-
I'm getting this error after upgrading to Qt 6.5.2 and Qt Creator 11.0.0 on my Mac under Preferences > Kits > Qt Versions:
Not all possible target environments can be supported due to missing compilers.When I hover over "Not all possible...", it says:
The following ABIs are currently not supported:
arm-darwin-generic-mach_o-64bitWhen I click on Details, under the ABI section, it says:
×86-darwin-generic-mach_o-64bit
arm-darwin-generic-mach_o-64bit
Which explains why such an error may be displayed.The problem: projects are being built and compiled, but Qt Creator cannot identify any Qt-related files or identifiers.
It all worked well on Qt Creator 10.0.2 and Qt 6.4.2.macOS 12.6.8
Xcode 14.2Apple clang version 12.0.0 (clang-1200.0.32.2)
Target: x86_64-apple-darwin21.6.0Intel-based 2016 MacBook Pro
Explanatory screenshots here.
-
-
-
Hi, it shouldn't matter that the ARM ABI is unsupported since you're using an Intel Mac.
Just guessing, but maybe Qt Creator gets confused about your architecture (Arm or Intel). You can force it in the CMakeLists.txt file by adding explicit CMAKE_OSX_ARCHITECTURES settings, example:cmake_minimum_required(VERSION 3.5) project(untitled VERSION 0.1 LANGUAGES CXX) set(CMAKE_AUTOUIC ON) set(CMAKE_AUTOMOC ON) set(CMAKE_AUTORCC ON) set(CMAKE_CXX_STANDARD 17) set(CMAKE_CXX_STANDARD_REQUIRED ON) set(CMAKE_OSX_ARCHITECTURES x86_64 arm64) find_package(QT NAMES Qt6 Qt5 REQUIRED COMPONENTS Widgets) find_package(Qt${QT_VERSION_MAJOR} REQUIRED COMPONENTS Widgets) ...
(this will build a fat binary, just like Qt Creator itself, i.e. the same .exe file will run on both Intel and Arm).
So try to just build for Intel:
set(CMAKE_OSX_ARCHITECTURES x86_64)
-
@hskoglund I did as you said. Not the slightest difference. Could you have a look at the screenshots? I don’t think it’s CMake that’s causing trouble. There’s a problem with Qt itself. It just can’t correctly identify the installed framework.
-
Hmm, I checked the requirements for Qt 6.5.2 and it says for Xcode 14 you need macOS 13 SDK.
You can check that you have it by opening a Terminal and typing:
xcrun -sdk macosx --show-sdk-path
(for me it says "/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX13.3.sdk)
P.S. Don't know if you need to upgrade to Ventura or not, but if you do, one way is via the OpenCore Legacy Patcher
Note that this is completely unsupported by Apple (3rd party) -
Thanks @hskoglund. Things seem to make more sense now. The command you mentioned gives me this:
/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk -> MacOSX10.15.sdk
When I cd to
/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs
, the latest SDK I see isMacOSX13.1.sdk
.
Apparently, this is not the same as yours.I don't really like to risk upgrading to an unsupported macOS version. Do you think downloading Qt 6.4 would solve the problem? I don't think so, because I had the same problems when I had installed both Qt 6.4 and 6.5.
Maybe I should simply install a Linux VM.
Further note: If you check out here, you can see it states the same build environment requirements as Qt 6.5, and everything had been working perfectly on Qt 6.4 and Qt Creator 10.0.2.
-
I did a ls -la on /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs on my Mac:
drwxr-xr-x 5 root wheel 160 Jun 13 19:59 . drwxr-xr-x 6 root wheel 192 May 20 03:16 .. drwxr-xr-x 7 root wheel 224 Mar 10 01:58 MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Jun 13 19:57 MacOSX13.3.sdk -> MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Jun 13 19:57 MacOSX13.sdk -> MacOSX.sdk
I.e. no old MacOSX10.15.sdk is visible. Perhaps that 10.15 sdk is some old detritus. If you do the same ls -la on the same directory how does it look?
-
Thanks for following up.
Here's what I get in /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs:drwxr-xr-x 5 root wheel 160 Dec 18 2022 . drwxr-xr-x 6 root wheel 192 Nov 17 2022 .. drwxr-xr-x 7 root wheel 224 Dec 18 2022 MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Dec 18 2022 MacOSX13.1.sdk -> MacOSX.sdk lrwxr-xr-x 1 root wheel 10 Nov 3 2022 MacOSX13.sdk -> MacOSX.sdk
Here's what I have in /Library/Developer/CommandLineTools/SDKs:
lrwxr-xr-x 1 root wheel 15 Sep 19 2020 MacOSX.sdk -> MacOSX10.15.sdk drwxr-xr-x 7 root wheel 224 Nov 13 2019 MacOSX10.14.sdk drwxr-xr-x 8 root wheel 256 Sep 19 2020 MacOSX10.15.sdk
-
My /Library/Developer/CommandLineTools/SDKs is empty except for a single man entry:
-rw-r--r-- 1 root wheel 16817 Sep 12 2022 usr/share/man/whatisMaybe you need to manually update your Xcode command line tools? Normally they should be updated along with Xcode itself but they can always be installed manually.
I thinkxcode-select –-install
still works, i.e. type that in a Terminal and wait for the dialog box to appear.Update: I followed my own advice and installed Xcode command line tools, after that my /Library/Developer/CommandLineTools/SDKs looks like this:
lrwxr-xr-x 1 root wheel 14 Jul 29 02:13 MacOSX.sdk -> MacOSX13.3.sdk drwxr-xr-x 7 root wheel 224 Jul 29 02:13 MacOSX12.3.sdk lrwxr-xr-x 1 root wheel 14 Jul 29 02:13 MacOSX12.sdk -> MacOSX12.3.sdk drwxr-xr-x 7 root wheel 224 Nov 12 2022 MacOSX13.1.sdk drwxr-xr-x 7 root wheel 224 Mar 10 01:58 MacOSX13.3.sdk lrwxr-xr-x 1 root wheel 14 Jul 29 02:12 MacOSX13.sdk -> MacOSX13.3.sdk
Qt Creator behaves the same for me, but maybe it'll improve things for you.
But I got one interesting tidbit re. Qt Creator 11.0.0:
for my Qt projects built with CMake code completion no longer works out of the box (Qt projects with qmake works fine).
To reproduce: create a new empty QWidget app and select CMake.
Then in mainwindow.cpp insert, for example after setupUi():ui->setupUi(this); QString s; s.
when I type the dot I expect code completion suggestions to appear, but they do not :-(
If i add an explicit #include <QString> at the top:#include "./ui_mainwindow.h" #include <QString>
then code completion comes back again.
Note: this missing code completion only occurs on my Mac. On Windows and on Linux Qt Creator 11.0.0 works fine for code completion. (And on my Mac if I stick to qmake projects.)If you try creating a new project using qmake, do you still get that error "Not all possible target..."?
-
Oh my God! @hskoglund you opened up a whole new world to me!
I did as you said and reinstalled Xcode Command Line Tools. Here's what I now have at /Library/Developer/CommandLineTools/SDKs:lrwxr-xr-x 1 root wheel 14 Jul 29 10:00 MacOSX.sdk -> MacOSX13.1.sdk drwxr-xr-x 7 root wheel 224 Jul 29 09:58 MacOSX11.3.sdk lrwxr-xr-x 1 root wheel 14 Jul 29 09:57 MacOSX11.sdk -> MacOSX11.3.sdk drwxr-xr-x 7 root wheel 224 Nov 20 2021 MacOSX12.1.sdk drwxr-xr-x 7 root wheel 224 Jul 29 10:00 MacOSX12.3.sdk lrwxr-xr-x 1 root wheel 14 Jul 29 09:59 MacOSX12.sdk -> MacOSX12.3.sdk drwxr-xr-x 7 root wheel 224 Nov 13 2022 MacOSX13.1.sdk lrwxr-xr-x 1 root wheel 14 Jul 29 09:59 MacOSX13.sdk -> MacOSX13.1.sdk
Certainly not as new as yours but a whole lot better than MacOSX10.15.sdk. Guess what? Clang is now Apple clang version 14.0.0 (clang-1400.0.29.202). It had been 12.0.0. Right now, not only it supports building for arm64, it also comes with full support for C++20. So, yes, the "Not all possible target..." warning is entirely gone, and Qt Creator has now identified the new compilers.
But, ...
We still have our differences.
An empty project with qmake works just as expected. However, an empty one with CMake has the exact same old problems. Here's a screenshot:I searched through the web and realized it has been quite a discussed upon problem of the Qt platform. If I disable the ClangCodeModel plugin, the errors would disappear. However, I would no longer be able to use auto-completion or follow symbols under cursor, among others. This is a price I am not willing to pay.
Interestingly enough, everything works just as expected even with ClangCodeModel disabled whenever I use qmake.
I intend to open up a new topic for this problem, and I would be more than happy to see you there. What you did for me to resolve this problem meant a world to me. Thank you.
-