Cannot build QTcreator from source.
-
Currently, I am trying to build QTcreator 9.0.0 from it's source code. I ran
cmake -DCMAKE_BUILD_TYPE=Debug -G Ninja "-DCMAKE_PREFIX_PATH=/usr/lib/qt6;/usr/lib/llvm" ~/Downloads/qt-creator/
I have llvm and Qt 6.4.2 installed, but the output is
CMake Error at cmake/FindQt5.cmake:57 (find_package): Found package configuration file: /usr/lib/aarch64-linux-gnu/cmake/Qt6/Qt6Config.cmake but it set Qt6_FOUND to FALSE so package "Qt6" is considered to be NOT FOUND. Reason given by package: Failed to find Qt component "Qml". Expected Config file at "/usr/lib/aarch64-linux-gnu/cmake/Qt6Qml/Qt6QmlConfig.cmake" does NOT exist Call Stack (most recent call first): CMakeLists.txt:68 (find_package)
I am running aarch64 Ubuntu 22.04 LTS .
-
Can QtCreator already be compiled with Qt6? I doubt so.
-
Okay, so I just gave up on building it from source, and decided to make a Ubuntu equivalent of a good old FrankenDebian, so I could install the newest version [9.0.1] on my Jammy Jellyfish machine, using a Lunar repository. But I will keep this open, in case anyone else has the problem.
-
I just installed Ubuntu 22.04 and build Qt Creator 9.0.2 (latest tag from 9.0 branch) as:
- Install build tools
$ sudo apt install build-essential cmake ninja-build git
- Install all the Ubuntu Qt 6 SDK packages
$ sudo apt install qt6-base-dev qt6-base-private-dev qt6-declarative-dev qt6-declarative-private-dev qt6-tools-dev qt6-tools-private-dev qt6-scxml-dev qt6-documentation-tools libqt6core5compat6-dev qt6-tools-dev-tools qt6-l10n-tools qt6-shader-baker libqt6shadertools6-dev qt6-quick3d-dev qt6-quick3d-dev-tools libqt6svg6-dev libqt6quicktimeline6-dev libqt6serialport6-dev
- Install LLVM / Clang dependencies
$ sudo apt install clang-15 clangd-15 libclang-15-dev
- Install Qt Creator dependencies
$ sudo apt install libgl1-mesa-dev libvulkan-dev libxcb-xinput-dev libxcb-xinerama0-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-image0 libxcb-keysyms1 libxcb-render-util0 libxcb-xkb1 libxcb-randr0 libxcb-icccm4
- Get Qt Creator source code
$ git clone --recursive https://code.qt.io/qt-creator/qt-creator.git repo $ cd repo $ git checkout 9.0 $ git submodule update
- Build Qt Creator
$ cmake -G Ninja -S repo -B build -DCMAKE_BUILD_TYPE=Release $ cmake --build build $ cmake --install build/ --prefix qtcreator-9.0
I've got a full build of Qt Creator, then started
./qtcreator-9.0/bin/qtcreator
to open therepo/CMakeLists.txt
project and load the build that I've currently made 😊If the CMake configure process is complaining about something, just use
apt-file search <file>
to locate the package that needs to be installed. -
I've made a Wiki article from the above post https://wiki.qt.io/Building_Qt_Creator_from_Git_on_Ubuntu_22.04 😊
-
@Christian-Ehrlicher said in Cannot build QTcreator from source.:
doubt
Qt Creator was compilable with Qt 6 around the time Qt 6.0 was released. Currently it /requires/ Qt 6.2 or later.