Describe the bug
As usual I checked the update and build and failed again. But this time it comes with ... something more complicated.
Seems -DQT_MAJOR_VERSION=6 won't work properly.
System Information
- Kde: 6.0.0
- Qt: not very sure
$ qmake --version
QMake version 3.1
Using Qt version 5.15.12 in /usr/lib/x86_64-linux-gnu
$ qmake6 --version
QMake version 3.1
Using Qt version 6.6.3 in /usr/lib/x86_64-linux-gnu
- OS: KDE Neon
- Installation Source: git
- Wallpaper Engine version:
Additional context
well I ran
$ sudo apt install build-essential libvulkan-dev plasma-workspace-dev gstreamer1.0-libav liblz4-dev libmpv-dev python3-websockets qtbase5-private-dev libqt5x11extras5-dev qml-module-qtwebchannel qml-module-qtwebsockets cmake
// Turns out all the newest
$ git pull //Since I've once built successfully and been using it before Plasma6 Update
$ git submodule update --init
$ rm -r build
$ mkdir build
$ cd build
and I follow the recommendation in #344 , adding the -DQT_MAJOR_VERSION=6 cmake option:
$ cmake .. -DQT_MAJOR_VERSION=6 -DUSE_PLASMAPKG=OFF
-- The C compiler identification is GNU 11.4.0
-- The CXX compiler identification is GNU 11.4.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Setting build type to 'RelWithDebInfo' as none was specified.
***Unknown option --query
CMake Warning at /usr/share/ECM/modules/ECMQueryQt.cmake:97 (message):
Failed call: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake --query
QT_INSTALL_PREFIX
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:30 (include)
CMake Error at /usr/share/ECM/modules/ECMQueryQt.cmake:98 (message):
Qt6 qtpaths call failed: 1
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:30 (include)
-- Configuring incomplete, errors occurred!
And I found in /usr/share/ECM/modules/ECMQueryQt.cmake: Line 47-69
if (QT_MAJOR_VERSION STREQUAL "5")
# QUIET to accommodate the TRY option
find_package(Qt${QT_MAJOR_VERSION}Core QUIET)
if(TARGET Qt5::qmake)
get_target_property(_qmake_executable_default Qt5::qmake LOCATION)
set(QUERY_EXECUTABLE ${_qmake_executable_default}
CACHE FILEPATH "Location of the Qt5 qmake executable")
set(_exec_name_text "Qt5 qmake")
set(_cli_option "-query")
endif()
elseif(QT_MAJOR_VERSION STREQUAL "6")
# QUIET to accommodate the TRY option
find_package(Qt6 COMPONENTS CoreTools QUIET CONFIG)
if (TARGET Qt6::qtpaths)
get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
set(QUERY_EXECUTABLE ${_qtpaths_executable}
CACHE FILEPATH "Location of the Qt6 qtpaths executable")
set(_exec_name_text "Qt6 qtpaths")
set(_cli_option "--query")
endif()
endif()
After referencing kde invent - ECM:
They think by default qtpath is used rather by qmake by default, and qtpath accepts both "-query" & "--query" option, while qmake only accepts "-query" option.
To log out the variables in this code block, adding a message after line 65:
if (TARGET Qt6::qtpaths)
get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
set(QUERY_EXECUTABLE ${_qtpaths_executable}
CACHE FILEPATH "Location of the Qt6 qtpaths executable")
message(WARNING "*********************************QUERY_EXECUTABLE=${QUERY_EXECUTABLE} _qtpaths_executable=${_qtpaths_executable}")
set(_exec_name_text "Qt6 qtpaths")
set(_cli_option "--query")
endif()
$ cmake .. -DQT_MAJOR_VERSION=6 -DUSE_PLASMAPKG=OFF
CMake Warning at /usr/share/ECM/modules/ECMQueryQt.cmake:66 (message):
*********************************QUERY_EXECUTABLE=/usr/lib/x86_64-linux-gnu/qt5/bin/qmake
_qtpaths_executable=/usr/lib/qt6/bin/qtpaths
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:198 (include)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:30 (include)
***Unknown option --query
CMake Warning at /usr/share/ECM/modules/ECMQueryQt.cmake:98 (message):
Failed call: /usr/lib/x86_64-linux-gnu/qt5/bin/qmake --query
QT_INSTALL_PREFIX
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:30 (include)
CMake Error at /usr/share/ECM/modules/ECMQueryQt.cmake:99 (message):
Qt6 qtpaths call failed: 1
Call Stack (most recent call first):
/usr/share/ECM/kde-modules/KDEInstallDirs6.cmake:199 (ecm_query_qt)
/usr/share/ECM/kde-modules/KDEInstallDirs.cmake:15 (include)
CMakeLists.txt:30 (include)
-- Configuring incomplete, errors occurred!
Adding FORCE option to line 64 to let it overwrite that cache variable with its old "qmake" value:
get_target_property(_qtpaths_executable Qt6::qtpaths LOCATION)
set(QUERY_EXECUTABLE ${_qtpaths_executable}
CACHE FILEPATH "Location of the Qt6 qtpaths executable" FORCE)
set(_exec_name_text "Qt6 qtpaths")
set(_cli_option "--query")
$ cmake .. -DQT_MAJOR_VERSION=6 -DUSE_PLASMAPKG=OFF
-- Installing in the same prefix as Qt, adopting their path scheme.
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/KF5Package/KF5PackageQchTargets.cmake:6 (set_target_properties):
Policy CMP0160 is not set: More read-only target properties now error when
trying to set them. Run "cmake --help-policy CMP0160" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
IMPORTED property is read-only for target("KF5Package_QCH")
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/KF5Package/KF5PackageConfig.cmake:47 (include)
/usr/share/ECM/find-modules/FindKF5.cmake:52 (find_package)
CMakeLists.txt:31 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsQchTargets.cmake:6 (set_target_properties):
Policy CMP0160 is not set: More read-only target properties now error when
trying to set them. Run "cmake --help-policy CMP0160" for policy details.
Use the cmake_policy command to set the policy and suppress this warning.
IMPORTED property is read-only for target("KF5CoreAddons_QCH")
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/KF5CoreAddons/KF5CoreAddonsConfig.cmake:115 (include)
/usr/share/cmake-3.29/Modules/CMakeFindDependencyMacro.cmake:76 (find_package)
/usr/lib/x86_64-linux-gnu/cmake/KF5Package/KF5PackageConfig.cmake:55 (find_dependency)
/usr/share/ECM/find-modules/FindKF5.cmake:52 (find_package)
CMakeLists.txt:31 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Found KF5Package: /usr/lib/x86_64-linux-gnu/cmake/KF5Package/KF5PackageConfig.cmake (found version "5.115.0")
-- Could NOT find KF5Plasma (missing: KF5Plasma_DIR)
-- Could NOT find KF5Plasma: found neither KF5PlasmaConfig.cmake nor kf5plasma-config.cmake
-- KF5_FOUND="" ; KF5_VERSION="5.115.0"
CMake Error at /usr/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:230 (message):
Could NOT find KF5 (missing: Plasma) (found suitable version "5.115.0",
minimum required is "5.68.0")
Call Stack (most recent call first):
/usr/share/cmake-3.29/Modules/FindPackageHandleStandardArgs.cmake:600 (_FPHSA_FAILURE_MESSAGE)
/usr/share/ECM/find-modules/FindKF5.cmake:96 (find_package_handle_standard_args)
CMakeLists.txt:31 (find_package)
-- Configuring incomplete, errors occurred!
Fallback to what's reported in this comment.
Also, after removing "FORCE" option and left that cmake file remains originally, executing the cmake command will print the same last error message, not complaining the "--query" option anymore.
So far I am not sure which side should this problem belong to, the qt6 ,the ECM cmake script, or the recommendation in #344 .
Maybe it indicates a comprehensive irrational design in our multi-party building system.
I'll also report this problem on ECM's repo, and also hope anyone could help me with the original problem in this comment.
Thanks for you all!
Describe the bug
As usual I checked the update and build and failed again. But this time it comes with ... something more complicated.
Seems -DQT_MAJOR_VERSION=6 won't work properly.
System Information
$ qmake --version QMake version 3.1 Using Qt version 5.15.12 in /usr/lib/x86_64-linux-gnu $ qmake6 --version QMake version 3.1 Using Qt version 6.6.3 in /usr/lib/x86_64-linux-gnuAdditional context
well I ran
and I follow the recommendation in #344 , adding the
-DQT_MAJOR_VERSION=6cmake option:And I found in /usr/share/ECM/modules/ECMQueryQt.cmake: Line 47-69
After referencing kde invent - ECM:
They think by default qtpath is used rather by qmake by default, and qtpath accepts both "-query" & "--query" option, while qmake only accepts "-query" option.
To log out the variables in this code block, adding a message after line 65:
Adding FORCE option to line 64 to let it overwrite that cache variable with its old "qmake" value:
Fallback to what's reported in this comment.
Also, after removing "FORCE" option and left that cmake file remains originally, executing the cmake command will print the same last error message, not complaining the "--query" option anymore.
So far I am not sure which side should this problem belong to, the qt6 ,the ECM cmake script, or the recommendation in #344 .
Maybe it indicates a comprehensive irrational design in our multi-party building system.
I'll also report this problem on ECM's repo, and also hope anyone could help me with the original problem in this comment.
Thanks for you all!