View Full Version : Failed to build Qt 6.2.2 on Ubunbu 20.04 ...

20th December 2021, 10:40
Can anybody give me a hand on how to solve this problem while configuring Qt6 ??

CMake Warning (dev) at /usr/lib/x86_64-linux-gnu/cmake/assimp-5.0/assimpTargets.cmake:54 (if):
if given arguments:


An argument named "ON" appears in a conditional statement. Policy CMP0012
is not set: if() recognizes numbers and boolean constants. Run "cmake
--help-policy CMP0012" for policy details. Use the cmake_policy command to
set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/lib/x86_64-linux-gnu/cmake/assimp-5.0/assimp-config.cmake:1 (include)
....../qt-everywhere-src-6.2.2/qt3d/cmake/FindWrapQt3DAssimp.cmake:8 (find_package)
....../qt-everywhere-src-6.2.2/qt3d/config.tests/assimp/CMakeLists.txt:7 (find_package)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Error in ....../qt-everywhere-src-6.2.2/qt3d/config.tests/assimp/CMakeLists.txt:
Imported target "WrapQt3DAssimp::WrapQt3DAssimp" includes non-existent path


in its INTERFACE_INCLUDE_DIRECTORIES. Possible reasons include:

* The path was deleted, renamed, or moved to another location.

* An install or uninstall procedure did not complete successfully.

* The installation package was faulty and references files it does not

CMake Error at qtbase/cmake/QtFeature.cmake:896 (try_compile):
Failed to generate test project build system.
Call Stack (most recent call first):
qt3d/src/core/configure.cmake:15 (qt_config_compile_test)
qtbase/cmake/QtModuleHelpers.cmake:515 (include)
qt3d/src/core/CMakeLists.txt:7 (qt_internal_add_module)

Configuring incomplete, errors occurred!
See also "....../qt-everywhere-src-6.2.2/CMakeFiles/CMakeOutput.log".
See also "....../qt-everywhere-src-6.2.2/CMakeFiles/CMakeError.log".


20th December 2021, 15:23
This warning is for project developers. Use -Wno-dev to suppress it.

Try adding that to your command line when you invoke CMake (or to the C++ flags in the toolchain file and/or the appropriate CMakeLists.txt file.

I am pretty sure that the term "project developers" refers to the developers of Qt itself, not people using Qt to develop their own projects.

I am not using Qt6 yet, so don't have the CMake files to look at. Maybe there is some other reader here who can give more advice.