Qt6 static build on macOS fails
Unsolved
Installation and Deployment
-
In order to get a reasonable app size I try to compile and link against static Qt - and fail at the first step.
./configure -static -release --prefix=~/QT-static
... Checking dependencies of 'qtwebview' Configuring 'qtbase' -- Could NOT find double-conversion (missing: double-conversion_DIR) -- Could NOT find md4c (missing: md4c_DIR) QtCore: WARNING: /Users/ht/Sources/Qt/6.3.0/Src/qtbase/src/corelib/qtcore_tracepoints_p.h does not have the "We mean it." warning -- Could NOT find double-conversion (missing: double-conversion_DIR) QtGui: WARNING: /Users/ht/Sources/Qt/6.3.0/Src/qtbase/src/gui/qtgui_tracepoints_p.h does not have the "We mean it." warning -- Could NOT find md4c (missing: md4c_DIR) QtOpenGL: WARNING: /Users/ht/Sources/Qt/6.3.0/Src/qtbase/src/opengl/qtopengl_tracepoints_p.h does not have the "We mean it." warning QtWidgets: WARNING: /Users/ht/Sources/Qt/6.3.0/Src/qtbase/src/widgets/qtwidgets_tracepoints_p.h does not have the "We mean it." warning Generating Plugins files for BundledHarfbuzz;HarfbuzzPrivate;BundledPcre2;Core;Concurrent;Sql;Network;Xml;DBus;Gui;OpenGL;Widgets;OpenGLWidgets;DeviceDiscoverySupportPrivate;FbSupportPrivate;Test;PrintSupport... Configuring 'qtshadertools' CMake Error at /usr/local/homebrew/lib/cmake/zstd/zstdTargets.cmake:37 (message): Some (but not all) targets in this export set were already defined. Targets Defined: zstd::libzstd_static Targets not yet defined: zstd::libzstd_shared Call Stack (most recent call first): /usr/local/homebrew/lib/cmake/zstd/zstdConfig.cmake:1 (include) qtbase/cmake/FindWrapZSTD.cmake:21 (find_package) /usr/local/homebrew/Cellar/cmake/3.22.3/share/cmake/Modules/CMakeFindDependencyMacro.cmake:47 (find_package) qtbase/lib/cmake/Qt6Core/Qt6CoreDependencies.cmake:48 (find_dependency) qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:40 (include) qtbase/lib/cmake/Qt6/Qt6Config.cmake:213 (find_package) qtshadertools/CMakeLists.txt:13 (find_package) CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:213 (find_package): Found package configuration file: /Users/ht/Sources/Qt/6.3.0/Src/qtbase/lib/cmake/Qt6Core/Qt6CoreConfig.cmake but it set Qt6Core_FOUND to FALSE so package "Qt6Core" is considered to be NOT FOUND. Call Stack (most recent call first): qtshadertools/CMakeLists.txt:13 (find_package)
Adding -qt-zlib makes no difference. What can I do?
-
-
Hi and welcome to devnet,
I would do three things:
- Update cmake to a more recent version
- Build the latest Qt 6 version
- Only build relevant modules (others can be added later)
Out of curiosity, why build Qt 6 statically on macOS ?
-
V veryqtperson referenced this topic on