Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. Not all possible target environments can be supported due to missing compilers

Not all possible target environments can be supported due to missing compilers

Scheduled Pinned Locked Moved Solved General and Desktop
12 Posts 2 Posters 1.7k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    Mehrshad
    wrote on 27 Jul 2023, 07:59 last edited by
    #1

    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-64bit

    When 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.2

    Apple clang version 12.0.0 (clang-1200.0.32.2)
    Target: x86_64-apple-darwin21.6.0

    Intel-based 2016 MacBook Pro

    Explanatory screenshots here.

    1 Reply Last reply
    0
    • M Mehrshad referenced this topic on 27 Jul 2023, 08:12
    • M Mehrshad referenced this topic on 27 Jul 2023, 08:23
    • H Offline
      H Offline
      hskoglund
      wrote on 27 Jul 2023, 08:55 last edited by
      #2

      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)
      
      M 1 Reply Last reply 27 Jul 2023, 09:32
      0
      • H hskoglund
        27 Jul 2023, 08:55

        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)
        
        M Offline
        M Offline
        Mehrshad
        wrote on 27 Jul 2023, 09:32 last edited by
        #3

        @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.

        M 1 Reply Last reply 27 Jul 2023, 09:44
        0
        • M Mehrshad
          27 Jul 2023, 09:32

          @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.

          M Offline
          M Offline
          Mehrshad
          wrote on 27 Jul 2023, 09:44 last edited by
          #4

          I even ran ./qmake -set arch x86_64 in the appropriate directory, but nothing changed.

          1 Reply Last reply
          0
          • H Offline
            H Offline
            hskoglund
            wrote on 27 Jul 2023, 09:56 last edited by
            #5

            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)

            M 1 Reply Last reply 27 Jul 2023, 10:30
            0
            • H hskoglund
              27 Jul 2023, 09:56

              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)

              M Offline
              M Offline
              Mehrshad
              wrote on 27 Jul 2023, 10:30 last edited by Mehrshad
              #6

              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 is MacOSX13.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.

              1 Reply Last reply
              0
              • H Offline
                H Offline
                hskoglund
                wrote on 28 Jul 2023, 00:11 last edited by
                #7

                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?

                M 1 Reply Last reply 28 Jul 2023, 09:38
                0
                • H hskoglund
                  28 Jul 2023, 00:11

                  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?

                  M Offline
                  M Offline
                  Mehrshad
                  wrote on 28 Jul 2023, 09:38 last edited by
                  #8

                  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
                  
                  1 Reply Last reply
                  0
                  • H Offline
                    H Offline
                    hskoglund
                    wrote on 28 Jul 2023, 17:23 last edited by hskoglund
                    #9

                    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/whatis

                    Maybe 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 think xcode-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..."?

                    1 Reply Last reply
                    0
                    • M Offline
                      M Offline
                      Mehrshad
                      wrote on 29 Jul 2023, 08:44 last edited by
                      #10

                      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:

                      Screen Shot 1402-05-07 at 11.57.28.jpg

                      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.

                      M 1 Reply Last reply 29 Jul 2023, 09:00
                      0
                      • M Mehrshad
                        29 Jul 2023, 08:44

                        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:

                        Screen Shot 1402-05-07 at 11.57.28.jpg

                        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.

                        M Offline
                        M Offline
                        Mehrshad
                        wrote on 29 Jul 2023, 09:00 last edited by
                        #11

                        @hskoglund Just out of curiosity, why did reinstalling Xcode Command Line Tools provided us both with newer macOS SDKs? Shouldn’t they have been updated with Xcode itself?

                        1 Reply Last reply
                        0
                        • M Mehrshad has marked this topic as solved on 29 Jul 2023, 09:30
                        • M Offline
                          M Offline
                          Mehrshad
                          wrote on 30 Jul 2023, 08:16 last edited by
                          #12

                          @hskoglund I created the new topic.

                          1 Reply Last reply
                          0

                          10/12

                          29 Jul 2023, 08:44

                          • Login

                          • Login or register to search.
                          10 out of 12
                          • First post
                            10/12
                            Last post
                          0
                          • Categories
                          • Recent
                          • Tags
                          • Popular
                          • Users
                          • Groups
                          • Search
                          • Get Qt Extensions
                          • Unsolved