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. Trying to configure qtbase on macOS-26.3
Qt 6.11 is out! See what's new in the release blog

Trying to configure qtbase on macOS-26.3

Scheduled Pinned Locked Moved Solved General and Desktop
7 Posts 4 Posters 274 Views 1 Watching
  • 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.
  • G Offline
    G Offline
    gav451
    wrote on last edited by
    #1

    Hello,

    I have cloned qtbase from git because I want to explore the examples and I have Qt installed from Home-Brew. When trying to configure building qtbase, I get the error message:

    python-3.14.3:0→gav@mbam4:~/VCS/qtbase% ./configure                                    (git)-[dev]-
    '/opt/homebrew/bin/cmake' '-DQT_INTERNAL_CALLED_FROM_CONFIGURE:BOOL=TRUE' '-G' 'Ninja' '/Users/gav/VCS/qtbase'
    -- CMAKE_BUILD_TYPE was already explicitly set to: 'Release'
    CMake Error at cmake/QtPublicAppleHelpers.cmake:1078 (message):
      Can't determine Xcode version.  Is Xcode installed? Error details:
    

    However, I have installed XCode 26.2 which has a binary plist configuration file. I can transform this binary file to a readable xml file with the command

    plistutil -i ~/Library/Preferences/com.apple.dt.Xcode.plist -o xcode-plist.xml
    

    but I cannot find anything that looks like an XCode version in this file.

    Is the configure script compatible with XCode 26.2?

    Thanks in advance.

    1 Reply Last reply
    0
    • G Offline
      G Offline
      gav451
      wrote last edited by
      #6

      I tried again today with XCode-26.4, Clang: 21.0.0 build 2100, and macOS: 26.4-arm64: I succeeded in configuring and compiling qtbase. For me, the issue is solved.

      jsulmJ 1 Reply Last reply
      0
      • I Offline
        I Offline
        IgKh
        wrote on last edited by IgKh
        #2

        Welcome to the forum.

        Directly addressing the error is with the xcode-select command to change from the CLI build tools to a full Xcode installation.

        However this is not the correct way to go about it; qtbase can't really be configured standalone. Are you building from a source tarball or from git?

        (Also, if you just want to build some examples and you already have Qt installed system-wide, there is no need to configure all of Qt source for building. You can just configure and build a single example you are interested in. E.g to build the Widget Gallery example, you can go to ~/VCS/qtbase/examples/widgets/gallery and run qmake or cmake there)

        SGaistS G 2 Replies Last reply
        0
        • I IgKh

          Welcome to the forum.

          Directly addressing the error is with the xcode-select command to change from the CLI build tools to a full Xcode installation.

          However this is not the correct way to go about it; qtbase can't really be configured standalone. Are you building from a source tarball or from git?

          (Also, if you just want to build some examples and you already have Qt installed system-wide, there is no need to configure all of Qt source for building. You can just configure and build a single example you are interested in. E.g to build the Widget Gallery example, you can go to ~/VCS/qtbase/examples/widgets/gallery and run qmake or cmake there)

          SGaistS Offline
          SGaistS Offline
          SGaist
          Lifetime Qt Champion
          wrote on last edited by
          #3

          @IgKh just one small correction: you can definitely build qtbase fully standalone. There's even a helper script that will be installed so that you can then build other modules you want.

          @gav451 that said, @IgKh is correct that you don't need to build qtbase yourself to build the demos and examples.

          Interested in AI ? www.idiap.ch
          Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

          1 Reply Last reply
          1
          • I IgKh

            Welcome to the forum.

            Directly addressing the error is with the xcode-select command to change from the CLI build tools to a full Xcode installation.

            However this is not the correct way to go about it; qtbase can't really be configured standalone. Are you building from a source tarball or from git?

            (Also, if you just want to build some examples and you already have Qt installed system-wide, there is no need to configure all of Qt source for building. You can just configure and build a single example you are interested in. E.g to build the Widget Gallery example, you can go to ~/VCS/qtbase/examples/widgets/gallery and run qmake or cmake there)

            G Offline
            G Offline
            gav451
            wrote on last edited by
            #4

            @IgKh
            I am building from git and as you said after doing

            sudo xcode-select -s /Applications/Xcode.app
            

            I can configure qtbase and do

            cmake --build . --parallel
            

            However, building stops with

            In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/c++/v1/vector:356:
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/c++/v1/cerrno:33:5: error: <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
               33 | #   error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
                  |     ^
            In file included from /Users/gav/VCS/qtbase/src/corelib/compat/removed_api.cpp:13:
            In file included from /Users/gav/VCS/qtbase/include/QtCore/qmetatype.h:1:
            In file included from /Users/gav/VCS/qtbase/src/corelib/kernel/qmetatype.h:16:
            In file included from /Users/gav/VCS/qtbase/include/QtCore/qfloat16.h:1:
            In file included from /Users/gav/VCS/qtbase/src/corelib/global/qfloat16.h:12:
            In file included from /Users/gav/VCS/qtbase/include/QtCore/qmath.h:1:
            /Users/gav/VCS/qtbase/src/corelib/kernel/qmath.h:156:12: error: no matching function for call to 'hypot'
              156 |     return hypot(x, y, z);
                  |            ^~~~~
            /Users/gav/VCS/qtbase/src/corelib/global/qfloat16.h:499:21: note: in instantiation of function template specialization 'qHypot<float, float, float>' requested here
              499 |     return qfloat16(qHypot(float(x), float(y), float(z)));
                  |                     ^
            /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/math.h:449:15: note: candidate function not viable: requires 2 arguments, but 3 were provided
              449 | extern double hypot(double, double);
                  |               ^     ~~~~~~~~~~~~~~
            14 errors generated.
            [384/1796] Building CXX object src/3rdparty/harf...ndledHarfbuzz.dir/src/hb-subset-table-layout.cc.o
            ninja: build stopped: subcommand failed.
            

            Thanks for the tip on how to build for instance the Widget Gallery example.

            I 1 Reply Last reply
            0
            • G gav451

              @IgKh
              I am building from git and as you said after doing

              sudo xcode-select -s /Applications/Xcode.app
              

              I can configure qtbase and do

              cmake --build . --parallel
              

              However, building stops with

              In file included from /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/c++/v1/vector:356:
              /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/c++/v1/cerrno:33:5: error: <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header.           This usually means that your header search paths are not configured properly.           The header search paths should contain the C++ Standard Library headers before           any C Standard Library, and you are probably using compiler flags that make that           not be the case.
                 33 | #   error <cerrno> tried including <errno.h> but didn't find libc++'s <errno.h> header. \
                    |     ^
              In file included from /Users/gav/VCS/qtbase/src/corelib/compat/removed_api.cpp:13:
              In file included from /Users/gav/VCS/qtbase/include/QtCore/qmetatype.h:1:
              In file included from /Users/gav/VCS/qtbase/src/corelib/kernel/qmetatype.h:16:
              In file included from /Users/gav/VCS/qtbase/include/QtCore/qfloat16.h:1:
              In file included from /Users/gav/VCS/qtbase/src/corelib/global/qfloat16.h:12:
              In file included from /Users/gav/VCS/qtbase/include/QtCore/qmath.h:1:
              /Users/gav/VCS/qtbase/src/corelib/kernel/qmath.h:156:12: error: no matching function for call to 'hypot'
                156 |     return hypot(x, y, z);
                    |            ^~~~~
              /Users/gav/VCS/qtbase/src/corelib/global/qfloat16.h:499:21: note: in instantiation of function template specialization 'qHypot<float, float, float>' requested here
                499 |     return qfloat16(qHypot(float(x), float(y), float(z)));
                    |                     ^
              /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX26.2.sdk/usr/include/math.h:449:15: note: candidate function not viable: requires 2 arguments, but 3 were provided
                449 | extern double hypot(double, double);
                    |               ^     ~~~~~~~~~~~~~~
              14 errors generated.
              [384/1796] Building CXX object src/3rdparty/harf...ndledHarfbuzz.dir/src/hb-subset-table-layout.cc.o
              ninja: build stopped: subcommand failed.
              

              Thanks for the tip on how to build for instance the Widget Gallery example.

              I Offline
              I Offline
              IgKh
              wrote on last edited by
              #5

              @gav451 For full building of Qt, I'm not sure that the Xcode generator is even supported. Maybe it is, but I personally build with the Ninja generator. I follow the Linux instructions on this page: https://wiki.qt.io/Building_Qt_6_from_Git. It is possible that there other ways.

              But then again, you don't really need to.

              1 Reply Last reply
              0
              • G Offline
                G Offline
                gav451
                wrote last edited by
                #6

                I tried again today with XCode-26.4, Clang: 21.0.0 build 2100, and macOS: 26.4-arm64: I succeeded in configuring and compiling qtbase. For me, the issue is solved.

                jsulmJ 1 Reply Last reply
                0
                • G gav451

                  I tried again today with XCode-26.4, Clang: 21.0.0 build 2100, and macOS: 26.4-arm64: I succeeded in configuring and compiling qtbase. For me, the issue is solved.

                  jsulmJ Offline
                  jsulmJ Offline
                  jsulm
                  Lifetime Qt Champion
                  wrote last edited by
                  #7

                  @gav451 You can mark it as solved then

                  https://forum.qt.io/topic/113070/qt-code-of-conduct

                  1 Reply Last reply
                  0
                  • G gav451 has marked this topic as solved
                  • G gav451 has marked this topic as solved

                  • Login

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