Failed to build Qt 6.3.0 from source on Ubuntu 22.04.
-
Hi, all:
My ENV:
➜ ~ uname -r 5.15.0-27-generic ➜ ~ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy ➜ ~ gcc --version gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. ➜ ~ python --version Python 3.10.4
I'm trying to build Qt 6.3.0 from source, but
./configure
brought me the following 2 ERROR messages directly:- Could NOT find Qt6WebSockets (missing: Qt6WebSockets_DIR)
Configuring 'qtmqtt' -- Could NOT find Qt6WebSockets (missing: Qt6WebSockets_DIR) CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:263 (message): Failed to find Qt component "WebSockets". Expected Config file at "....../qt-everywhere-src-6.3.0/qtbase/lib/cmake/Qt6WebSockets/Qt6WebSocketsConfig.cmake" does NOT exist Call Stack (most recent call first): qtmqtt/CMakeLists.txt:14 (find_package)
And line 14 of
qtmqtt/CMakeLists.txt
isfind_package(Qt6 ${PROJECT_VERSION} CONFIG OPTIONAL_COMPONENTS Quick WebSockets # For tests # special case Gui Widgets) # For examples # special case
- Targets not yet defined: draco_static
Configuring 'qtquick3d' CMake Error at /usr/lib/x86_64-linux-gnu/cmake/draco/draco-targets.cmake:37 (message): Some (but not all) targets in this export set were already defined. Targets Defined: draco_shared Targets not yet defined: draco_static Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/draco/draco-config.cmake:36 (include) /usr/lib/x86_64-linux-gnu/cmake/assimp-5.2/assimpConfig.cmake:37 (find_package) qtquick3d/cmake/FindWrapQuick3DAssimp.cmake:7 (find_package) qtbase/cmake/QtFindPackageHelpers.cmake:130 (find_package) qtquick3d/src/plugins/assetimporters/configure.cmake:13 (qt_find_package) qtquick3d/src/plugins/assetimporters/CMakeLists.txt:9 (include)
Can anybody give me a hand please?
Thank you very much...
-
-- Could NOT find Qt6WebSockets (missing: Qt6WebSockets_DIR) CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:263 (message): Failed to find Qt component "WebSockets". Expected Config file at "....../qt-everywhere-src-6.3.0/qtbase/lib/cmake/Qt6WebSockets/Qt6WebSocketsConfig.cmake" does NOT exist Call Stack (most recent call first): qtmqtt/CMakeLists.txt:14 (find_package)
This is just a warning, which seems safe to ignore.
Configuring 'qtquick3d' CMake Error at /usr/lib/x86_64-linux-gnu/cmake/draco/draco-targets.cmake:37 (message): Some (but not all) targets in this export set were already defined. Targets Defined: draco_shared Targets not yet defined: draco_static Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/draco/draco-config.cmake:36 (include) /usr/lib/x86_64-linux-gnu/cmake/assimp-5.2/assimpConfig.cmake:37 (find_package) qtquick3d/cmake/FindWrapQuick3DAssimp.cmake:7 (find_package)
This is an actual error, and hints towards a problem in draco/assimp. As a workaround, you can try to configure with
-qt-assimp
. -
@kkoehne Thank you so much for your prompt reply...
This ERROR is now solved by manually build and install draco and assimp.
However, I still got the following issue:Call Stack (most recent call first): qtbase/lib/cmake/Qt6Qml/Qt6QmlBuildInternals.cmake:224 (qt_internal_add_plugin) qtwayland/src/imports/compositor-extensions/qtshell/CMakeLists.txt:5 (qt_internal_add_qml_module) This warning is for project developers. Use -Wno-dev to suppress it. Configuring 'qtwebsockets' Configuring 'qtwebchannel' Configuring 'qtwebengine' -- Checking 'ulimit -n' -- Open files limit 1024 -- Creating linker launcher -- Support check for QtWebEngine failed: Could not find all necessary libraries for qpa-xcb support. X11:YES LIBDRM:YES XCOMPOSITE:YES XCURSOR:YES XRANDR:YES XI:YES XPROTO:YES XSHMFENCE:YES XTST:YES Configuring 'qtwebview' Could NOT find Qt6WebEngineCore (missing: Qt6WebEngineCore_DIR) CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:263 (message): Failed to find Qt component "WebEngineCore". Expected Config file at "/home/longervision/Downloads/Programming/GUI/qt-everywhere-src-6.3.0/qtbase/lib/cmake/Qt6WebEngineCore/Qt6WebEngineCoreConfig.cmake" does NOT exist Call Stack (most recent call first): qtwebview/CMakeLists.txt:12 (find_package) Could NOT find Qt6WebEngineQuick (missing: Qt6WebEngineQuick_DIR) CMake Warning at qtbase/lib/cmake/Qt6/Qt6Config.cmake:263 (message): Failed to find Qt component "WebEngineQuick". Expected Config file at "/home/longervision/Downloads/Programming/GUI/qt-everywhere-src-6.3.0/qtbase/lib/cmake/Qt6WebEngineQuick/Qt6WebEngineQuickConfig.cmake" does NOT exist Call Stack (most recent call first): qtwebview/CMakeLists.txt:12 (find_package)
-- The following OPTIONAL packages have not been found: * zstd * PCRE2 (required version >= 10.20) * unofficial-brotli * harfbuzz (required version >= 2.6.0) * Slog2 * DirectFB * DB2, IBM DB2 client library, <https://www.ibm.com> * Oracle, Oracle client library, <https://www.oracle.com> * ODBC * Interbase, Interbase client library, <https://www.embarcadero.com/products/interbase> * Jasper * WrapJasper * Qt6LanguageServer (required version >= 6.3.0) * LTTngUST * AVFoundation * WMF * Qt6Gamepad (required version >= 6.3.0) * litehtml * Uacpp, The Unified Automation C++ OPC UA SDK, <https://www.unified-automation.com/products/server-sdk/c-ua-server-sdk.html> * Gypsy * Sensorfw * CerenceHwrAlphabetic * CerenceHwrCjk * CerenceXt9 * MyScript * Waylandkms * Qt6JpegPrivate (required version >= 6.3.0) * Qt6PngPrivate (required version >= 6.3.0) * Qt6HarfbuzzPrivate (required version >= 6.3.0) * Qt6FreetypePrivate (required version >= 6.3.0) * Qt6ZlibPrivate (required version >= 6.3.0) * Gn (required version == 6.3.0), Meta-build system, <https://gn.googlesource.com/gn/> * Qt6QmlCompilerPlusPrivate * Qt6WebEngineCore (required version >= 6.3.0) * Qt6WebEngineQuick (required version >= 6.3.0)
Some of the so-called not-found packages, I've already installed from repository.
Others seem to be NOT available on Ubuntu 22.04.Any further suggestions? From https://www.tal.org/tutorials/building-qtwebengine, do I have to install everything else before trying to install QtWebEngine?
Thank you