Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Building Qt 6.6.0 from source on Mac
Forum Updated to NodeBB v4.3 + New Features

Building Qt 6.6.0 from source on Mac

Scheduled Pinned Locked Moved Solved Installation and Deployment
13 Posts 4 Posters 1.8k Views 2 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.
  • K Offline
    K Offline
    KeithS
    wrote on 25 Nov 2023, 16:08 last edited by KeithS
    #1

    I've been trying to instal Qt 6.6.0 on a Macbook (x86 cpu) with not much success. I have installed the prerequisites as described in the Qt docs (cnake, python3, ninja, node.js), the only difference is I am running Somona (OSX 14.0).

    When I run ./configure -commercial -debug-and-release -opengl desktop -nomake examples -nomake tests, I get (after lots of cmake output):

    -- Configuring incomplete, errors occurred!
    See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeOutput.log".
    See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeError.log".
    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1038 (message):
    CMake exited with code 1.

    Looking through the CMakeError.log file there are a few worrying messages like:

    ld: library 'c++' not found
    clang: error: linker command failed with exit code 1 (use -v to see invocation)

    Has anyone successfully built Qt 6.6.0 from source on OSX 14 / Xcose 15.0.1 ?

    A 1 Reply Last reply 25 Nov 2023, 17:32
    0
    • K Offline
      K Offline
      KeithS
      wrote on 6 Dec 2023, 19:33 last edited by
      #11

      Nothing stands out clearly in those files. Trying with 6.6.1 I get:

      -- Configuring incomplete, errors occurred!
      See also "/Users/keith/Documents/C++Stuff/qt6-build/CMakeFiles/CMakeOutput.log".
      See also "/Users/keith/Documents/C++Stuff/qt6-build/CMakeFiles/CMakeError.log".
      CMake Error at /Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.1/qtbase/cmake/QtProcessConfigureArgs.cmake:1040 (message):
      CMake exited with code 1.

      Again not a helpful error message, line 1040 of that file is just printing the error...

      1 Reply Last reply
      0
      • K KeithS
        25 Nov 2023, 16:08

        I've been trying to instal Qt 6.6.0 on a Macbook (x86 cpu) with not much success. I have installed the prerequisites as described in the Qt docs (cnake, python3, ninja, node.js), the only difference is I am running Somona (OSX 14.0).

        When I run ./configure -commercial -debug-and-release -opengl desktop -nomake examples -nomake tests, I get (after lots of cmake output):

        -- Configuring incomplete, errors occurred!
        See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeOutput.log".
        See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeError.log".
        CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1038 (message):
        CMake exited with code 1.

        Looking through the CMakeError.log file there are a few worrying messages like:

        ld: library 'c++' not found
        clang: error: linker command failed with exit code 1 (use -v to see invocation)

        Has anyone successfully built Qt 6.6.0 from source on OSX 14 / Xcose 15.0.1 ?

        A Online
        A Online
        Axel Spoerl
        Moderators
        wrote on 25 Nov 2023, 17:32 last edited by
        #2

        @KeithS
        Please check the $LIBRARY_PATH environment variable. The path to the C++ library is probably missing.

        Software Engineer
        The Qt Company, Oslo

        K 1 Reply Last reply 25 Nov 2023, 19:15
        0
        • S Offline
          S Offline
          SGaist
          Lifetime Qt Champion
          wrote on 25 Nov 2023, 17:59 last edited by
          #3

          Hi,

          In addition to @Axel-Spoerl, did you also install the command line tools from Xcode ?

          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
          0
          • A Axel Spoerl
            25 Nov 2023, 17:32

            @KeithS
            Please check the $LIBRARY_PATH environment variable. The path to the C++ library is probably missing.

            K Offline
            K Offline
            KeithS
            wrote on 25 Nov 2023, 19:15 last edited by
            #4

            @Axel-Spoerl What sets LIBRARY_PATH? It's not an env var I've ever had to set before, and certainly wasn't required for Qt 5.15.15. But I'll give it a try

            I believe the linker has changed in XCode 15, according to this thread:
            https://developer.apple.com/forums/thread/715385
            which may explain the current failure.

            S 1 Reply Last reply 25 Nov 2023, 19:33
            0
            • K KeithS
              25 Nov 2023, 19:15

              @Axel-Spoerl What sets LIBRARY_PATH? It's not an env var I've ever had to set before, and certainly wasn't required for Qt 5.15.15. But I'll give it a try

              I believe the linker has changed in XCode 15, according to this thread:
              https://developer.apple.com/forums/thread/715385
              which may explain the current failure.

              S Offline
              S Offline
              SGaist
              Lifetime Qt Champion
              wrote on 25 Nov 2023, 19:33 last edited by
              #5

              Then you might want to build a more recent version than 6.6.0.

              By the way, why not use the online installer to install Qt ?

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

              K 1 Reply Last reply 25 Nov 2023, 20:32
              0
              • S SGaist
                25 Nov 2023, 19:33

                Then you might want to build a more recent version than 6.6.0.

                By the way, why not use the online installer to install Qt ?

                K Offline
                K Offline
                KeithS
                wrote on 25 Nov 2023, 20:32 last edited by
                #6

                @SGaist there is a more recent version than 6.6.0? Reason to compile from source is to fix a couple of bugs - and I need to do it for eg win32 so would like to be consistent.

                K 1 Reply Last reply 26 Nov 2023, 15:11
                0
                • K KeithS
                  25 Nov 2023, 20:32

                  @SGaist there is a more recent version than 6.6.0? Reason to compile from source is to fix a couple of bugs - and I need to do it for eg win32 so would like to be consistent.

                  K Offline
                  K Offline
                  KeithS
                  wrote on 26 Nov 2023, 15:11 last edited by
                  #7

                  Setting LIBRARY_PATH had no effect. The last messages from configure are:

                  RegularExpression::compile(): Nested *?+.
                  RegularExpression::compile(): Error in compile.
                  CMake Error at qtwebengine/src/CMakeLists.txt:152 (if):
                  if given arguments:

                  "NOT" "Gn_FOUND" "OR" "Gn_EXECUTABLE" "MATCHES" "^/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/qtwebengine/install"
                  

                  Regular expression
                  "^/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/qtwebengine/install"
                  cannot compile

                  -- Configuring incomplete, errors occurred!
                  See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeOutput.log".
                  See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeError.log".
                  CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1038 (message):
                  CMake exited with code 1.

                  A 1 Reply Last reply 6 Dec 2023, 13:10
                  0
                  • K KeithS
                    26 Nov 2023, 15:11

                    Setting LIBRARY_PATH had no effect. The last messages from configure are:

                    RegularExpression::compile(): Nested *?+.
                    RegularExpression::compile(): Error in compile.
                    CMake Error at qtwebengine/src/CMakeLists.txt:152 (if):
                    if given arguments:

                    "NOT" "Gn_FOUND" "OR" "Gn_EXECUTABLE" "MATCHES" "^/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/qtwebengine/install"
                    

                    Regular expression
                    "^/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/qtwebengine/install"
                    cannot compile

                    -- Configuring incomplete, errors occurred!
                    See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeOutput.log".
                    See also "/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.0/CMakeFiles/CMakeError.log".
                    CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1038 (message):
                    CMake exited with code 1.

                    A Online
                    A Online
                    Axel Spoerl
                    Moderators
                    wrote on 6 Dec 2023, 13:10 last edited by
                    #8

                    @KeithS
                    That looks like a local configuration error.
                    Have you done all the steps outlined here?

                    Software Engineer
                    The Qt Company, Oslo

                    1 Reply Last reply
                    0
                    • K Offline
                      K Offline
                      KeithS
                      wrote on 6 Dec 2023, 18:07 last edited by
                      #9

                      Yes I believe so - as in the original post: "I have installed the prerequisites as described in the Qt docs (cnake, python3, ninja, node.js), the only difference is I am running Somona (OSX 14.0)."

                      The big problem is that finding the real error is made more difficult by the many errors emitted by the config tests.

                      A 1 Reply Last reply 6 Dec 2023, 18:59
                      0
                      • K KeithS
                        6 Dec 2023, 18:07

                        Yes I believe so - as in the original post: "I have installed the prerequisites as described in the Qt docs (cnake, python3, ninja, node.js), the only difference is I am running Somona (OSX 14.0)."

                        The big problem is that finding the real error is made more difficult by the many errors emitted by the config tests.

                        A Online
                        A Online
                        Axel Spoerl
                        Moderators
                        wrote on 6 Dec 2023, 18:59 last edited by
                        #10

                        @KeithS
                        CMakeError.log and CMakeOutput.log should contain the root cause.
                        Have you found anything there?

                        Software Engineer
                        The Qt Company, Oslo

                        1 Reply Last reply
                        0
                        • K Offline
                          K Offline
                          KeithS
                          wrote on 6 Dec 2023, 19:33 last edited by
                          #11

                          Nothing stands out clearly in those files. Trying with 6.6.1 I get:

                          -- Configuring incomplete, errors occurred!
                          See also "/Users/keith/Documents/C++Stuff/qt6-build/CMakeFiles/CMakeOutput.log".
                          See also "/Users/keith/Documents/C++Stuff/qt6-build/CMakeFiles/CMakeError.log".
                          CMake Error at /Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.1/qtbase/cmake/QtProcessConfigureArgs.cmake:1040 (message):
                          CMake exited with code 1.

                          Again not a helpful error message, line 1040 of that file is just printing the error...

                          1 Reply Last reply
                          0
                          • hskoglundH Online
                            hskoglundH Online
                            hskoglund
                            wrote on 6 Dec 2023, 20:27 last edited by
                            #12

                            Hi, I'm guessing the problem is that subdirectory named C++Stuff, you should see errors like this:
                            list sub-command FILTER, mode REGEX failed to compile regex
                            "(.+/(ui_)[^/]+.h|/Users/keith/Documents/C++Stuff/qt-everywhere-src-6.6.1/qtwebview/src/webview(/.+)?/doc/+.h)".

                            Try renaming that directory to something without ++, e.g. CPlusPlusStuff

                            Note: just guessing :-)

                            1 Reply Last reply
                            0
                            • K Offline
                              K Offline
                              KeithS
                              wrote on 6 Dec 2023, 22:24 last edited by
                              #13

                              You're spot on. Moving the qt6 source and the build dir to another directory (without the C++ in path) and configure runs without error!

                              1 Reply Last reply
                              0
                              • A Axel Spoerl has marked this topic as solved on 7 Dec 2023, 06:04

                              • Login

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