Failed call: "QT_INSTALL_PREFIX"
-
I try compile https://invent.kde.org/frameworks/syntax-highlighting
My apt Qt6 install version is 6.2.4
KDE framework for syntax highlight requires version 6.4.0
I install from sources to /usr/local/Qt-6.4.0/
If I run cmake .. of syntax-highlighting
is error$ cmake .. CMake Warning at /usr/local/share/ECM/modules/ECMQueryQt.cmake:97 (message): Failed call: "QT_INSTALL_PREFIX" Call Stack (most recent call first): /usr/local/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt) /usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include) CMakeLists.txt:12 (include) CMake Error at /usr/local/share/ECM/modules/ECMQueryQt.cmake:98 (message): Qt6 qtpaths call failed: 101 Call Stack (most recent call first): /usr/local/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt) /usr/local/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include) CMakeLists.txt:12 (include) -- Configuring incomplete, errors occurred! See also "/home/andrzej/wazne/gitmy/syntax-highlighting/build/CMakeFiles/CMakeOutput.log". -
Hi,
How did you point cmake to your custom Qt build ?
-
QT_INSTALL_PREFIX was probably in cmake was:
find_package(ECM 5.240.0 REQUIRED NO_MODULE)I changed it to
find_package(ECM REQUIRED NO_MODULE)Next I install from sources Qt 6.5.2 with standard prefix /usr
and changedset(REQUIRED_QT_VERSION 6.4.0) find_package(Qt6 ${REQUIRED_QT_VERSION} NO_MODULE REQUIRED COMPONENTS Core Network Test)to
find_package(Qt6 NO_MODULE REQUIRED COMPONENTS Core Network Test)now is not QT_INSTALL_PREFIX, still error with CorePrivate
-- Performing Test HAVE_STDATOMIC - Success -- Found WrapAtomic: TRUE CMake Error at /usr/lib/cmake/Qt6Core/Qt6CoreVersionlessTargets.cmake:37 (message): Some (but not all) targets in this export set were already defined. Targets Defined: Qt::Core Targets not yet defined: Qt::CorePrivate Call Stack (most recent call first): /usr/lib/cmake/Qt6Core/Qt6CoreConfig.cmake:55 (include) /usr/lib/cmake/Qt6/Qt6Config.cmake:157 (find_package) CMakeLists.txt:46 (find_package) -- Configuring incomplete, errors occurred! See also "/home/andrzej/wazne/gitmy/syntax-highlighting/build/CMakeFiles/CMakeOutput.log".note: if I change Qt6 to Qt5 is without cmake errors, but unfortunately in .cpp code is used QList.data() which is error in Qt5
-
After
sudo apt install qtbase5-private-dev qt6-tools-dev qt6-l10n-toolserror changed to
CMake Error at /usr/lib/x86_64-linux-gnu/cmake/Qt6Network/Qt6NetworkPlugins.cmake:5 (__qt_internal_include_plugin_packages): Unknown CMake command "__qt_internal_include_plugin_packages". Call Stack (most recent call first): /usr/lib/x86_64-linux-gnu/cmake/Qt6Network/Qt6NetworkConfig.cmake:131 (include) /usr/lib/x86_64-linux-gnu/cmake/Qt6/Qt6Config.cmake:219 (find_package) CMakeLists.txt:49 (find_package) -
You can't mix two different Qt major versions.
From the looks of it, you did not point CMake to your custom Qt installation. Check CMAKE_PREFIX_PATH.