Building Qt 6.6.0 from source on Mac
-
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 ?
-
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...
-
@KeithS
Please check the$LIBRARY_PATH
environment variable. The path to the C++ library is probably missing. -
Hi,
In addition to @Axel-Spoerl, did you also install the command line tools from Xcode ?
-
@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. -
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. -
-
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.
-
@KeithS
CMakeError.log
andCMakeOutput.log
should contain the root cause.
Have you found anything there? -
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...
-
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 :-)
-