Qt 6.2.4 on QNX710 - Qt version is not properly installed
-
Hello,
I tried to build Qt 6.2.4, installed via
qt-unified-linux-x64-4.3.0-1-online.run
on Ubuntu 20.04 LTS in a Virtual Box.I installed Qt 6.2.4 in
~/Qt6
for Desktopgcc 64-bit
and in source code.QNX 7.1 is installed in
~/qnx710
.I sourced
qnxsdp-env.sh
:$ . ~/qnx710/qnxsdp-env.sh
I added Qt6.2.4, Ninja and CMake to
PATH
:$ epxort PATH=$PATH:~/Qt6/6.2.4/gcc_64/bin $ export PATH=$PATH:~/Qt6/Tools/Ninja $ export PATH=$PATH:~/Qt6/Tools/CMake/bin
Copied the qnx.cmake example from https://doc.qt.io/qt-6/building-qt-for-qnx.html#creating-a-toolchain-file-for-qnx
$ cat ~/cmake_support/toolchains/qnx.aarch64le.cmake set(CMAKE_SYSTEM_NAME QNX) set(arch gcc_ntoarmv7le) set(CMAKE_C_COMPILER qcc) set(CMAKE_C_COMPILER_TARGET ${arch}) set(CMAKE_CXX_COMPILER q++) set(CMAKE_CXX_COMPILER_TARGET ${arch}) set(CMAKE_SYSROOT $ENV{QNX_TARGET})
Created a build directory and configured qt:
$ mkdir ~/Qt6/6.2.4/qnx_build $ cd ~/Qt6/6.2.4/qnx_build $ cmake -GNinja -DCMAKE_TOOLCHAIN_FILE=~/cmake_support/toolchains/qnx.aarch64le.cmake -DQT_HOST_PATH=~/Qt6/6.2.4/gcc_64 -DCMAKE_INSTALL_PREFIX=~/Qt6/6.2.4/qnx ../Src
Compile and install
$ cmake --build . --parallel && cmake --install .
This all went fine.
Then I tried to add the new Qt Version to Qt Creator, but this fails with Qt version is not properly installed, please run make install.
Details: Invalid Qt version.And of course, once creating a kit, it fails and can't be used.
Any idea how to fix this?
Thank you very much,
Werner -
The Qt version was indeed not properly installed.
qmake expects a specific directory for target libraries
$ ~/Qt6/6.2.4/qnx/bin/qmake -v QMake version 3.1 Using Qt version 6.2.4 in /home/werner/qnx710/target/qnx7/home/werner/Qt6/6.2.4/qnx/lib
So to fix QT Creator, I simply had to create a symbolic link:
$ cd ~/qnx710/target/qnx7 $ mkdir -p home/werner $ ln -s ~/Qt6 .