Qt Creator requests Qt5?
-
I'm running on Ubuntu 20.04 and I have qt 6.3.1 installed. When trying to build Qt Creator from git I'm getting the following error:
This is the command I entered:
cmake -DCMAKE_BUILD_TYPE=Release -G Ninja "-DCMAKE_PREFIX_PATH=~/qt6-build/bin;~/llvm-build/bin" ~/qt-creatorMy question is why would it request Qt 5 if under the requirements it states Qt 6.2 or later... and how do I continue about building Qt Creator from source?
-
The Qt Creator CMake code still tries to find Qt6 and Qt5 CMake packages. We'll move to only Qt6 in the near future.
You are passing the wrong paths in the
CMAKE_PREFIX_PATH
. Have a look at find_package's documentation about how CMake is trying to find out where the CMake packages are located.In your case it would be just
"-DCMAKE_PREFIX_PATH=~/qt6-build;~/llvm-build"
since CMake will use these paths as prefixes and add automaticallylib/cmake
.You can also use CMake's
--debug-find
argument, which is descriebed as:Put cmake find commands in a debug mode.
Print extra find call information during the cmake run to standard error. Output is designed for human consumption and not for parsing. See also the CMAKE_FIND_DEBUG_MODE variable for debugging a more local part of the project.
-
@cristian-adam
After editing to match your fixes I still got this error over and over again:
-
I think what you are trying do doesn't work that well, namely consuming a llvm build from a 3rd party application – Qt Creator.
You need to:
1. build llvm/clang cmake --build llvm-build-dir 2. install llvm/clang cmake --install llvm-build-dir --prefix llvm-install-dir 3. use the llvm-install-dir with Qt Creator in CMAKE_PREFIX_PATH
I would say you need to have the same thing with Qt.
Always use an installed version of a project in a different project. This is normally the only supported version of a library.
-
@cristian-adam
Thank you! We can definitely count this ticket as solved