troubles when complinig

+ mkdir -p qtbase
+ cd qtbase
+ exec /home/stuv/Qt/6.6.0/Src/qtbase/configure -top-level
'/usr/local/bin/cmake' '-DQT_INTERNAL_CALLED_FROM_CONFIGURE:BOOL=TRUE' '-G' 'Unix Makefiles' '/home/stuv/Qt/6.6.0/Src'
CMake Error: Error: generator : Unix Makefiles
Does not match the generator used previously: Ninja
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1038 (message):
  CMake exited with code 1.

i tried to delete the file and the folder and i get:

CMake Error: Error: generator : Ninja
Does not match the generator used previously: Unix Makefiles
Either remove the CMakeCache.txt file and CMakeFiles directory or choose a different binary directory.
CMake Error at qtbase/cmake/QtSeparateDebugInfo.cmake:53 (try_compile):
  Failed to configure test project build system.
Call Stack (most recent call first):
  qtbase/cmake/QtSeparateDebugInfo.cmake:114 (qt_internal_try_compile_binary_for_strip)
  qtbase/cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:447 (qt_internal_generate_binary_strip_wrapper)
  qtbase/CMakeLists.txt:127 (qt_build_repo_begin)


-- Configuring incomplete, errors occurred!
CMake Error at qtbase/cmake/QtProcessConfigureArgs.cmake:1038 (message):
  CMake exited with code 1.

i tried a complete reintall of qt but same error

It looks like Qt is not considering an already-existing directory may spoil things. Can you please provide the full sequence of commands you used to get to this state? I suspect Qt should pass --fresh if CMake is 3.24 or newer and make noise otherwise if CMakeFiles/ or CMakeCache.txt already exist in the build directory of interest.

Cc: @craig.scott @alcroito

Qt’s configure allows reconfiguring in an existing build directory, so removing CMakeCache.txt and friends or complaining about it is not possible, because the intent might be to do a reconfiguration with slightly different options, rather than a clean configuration from scratch.

Qt’s configure accepts --fresh, so if the intent is to do a clean build, that can be explicitly passed.

I’m not sure how the OP ended up in their situation.
It also looks weird that they call cmake on the top-level source dir “Src” within a qtbase subdirectory.
Either they should call configure from “Src/qtbase/configure”, or call “Src/configure” but not within a qtbase build subdirectory.

https://paste.debian.net/1298679/

cmake --fresh . let the configuration finish!

but then cmake --build . gives me: stuv@localhost:~/Qt/6.6.0/Src$ cmake --build .[ 1%] Generating pc file for ta - Pastebin.com

You’re trying to build Qt WebEngine and it fails due to a missing cups-config binary. You will either need to skip building WebEngine, or install all required dependencies.

Having said that, the CMake forum is not the right place to seek support for building Qt.
A more appropriate place would be the Qt forums at https://forum.qt.io/

ty