Details
-
Bug
-
Resolution: Fixed
-
Not Evaluated
-
Qt Creator 15.0.1
-
None
-
-
021604916 (16.0)
Description
I have a QNX 8.0 opensource installation on Windows.
I have configured Qt Creator 15.0.1 to use this toolchain. For a CMake project I have a simple QNX toolchain file.
set(CMAKE_SYSTEM_NAME QNX) set(arch gcc_ntoaarch64le) 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})
I have a simple C++ program:
#include <sys/slog2.h> #include <iostream> int main() { #ifdef __QNX__ std::cout << "QNX Version: " << __QNX__ << std::endl; #endif }
Which successfully builds:
[cmake] Running C:\Program Files\CMake\bin\cmake.exe -S C:/Projects/c++/HelloWorld -B C:/Projects/C++/HelloWorld/build/Kit_for_qnx800_64_bit_ARM-Debug "-DCMAKE_COLOR_DIAGNOSTICS:BOOL=ON" "-DCMAKE_GENERATOR:STRING=Ninja" "-DCMAKE_PROJECT_INCLUDE_BEFORE:FILEPATH=C:\Projects\C++\HelloWorld\build\Kit_for_qnx800_64_bit_ARM-Debug/.qtc/package-manager/auto-setup.cmake" "-DQT_QMAKE_EXECUTABLE:FILEPATH=" "-DCMAKE_CXX_COMPILER:FILEPATH=C:/qnx800/host/win64/x86_64/usr/bin/qcc.exe" "-DCMAKE_PREFIX_PATH:PATH=" "-DCMAKE_BUILD_TYPE:STRING=Debug" "-DCMAKE_C_COMPILER:FILEPATH=C:/qnx800/host/win64/x86_64/usr/bin/qcc.exe" in C:\Projects\C++\HelloWorld\build\Kit_for_qnx800_64_bit_ARM-Debug. [cmake] -- The CXX compiler identification is QCC 12.2.0 [cmake] -- Detecting CXX compiler ABI info [cmake] -- Detecting CXX compiler ABI info - failed [cmake] -- Check for working CXX compiler: C:/qnx800/host/win64/x86_64/usr/bin/qcc.exe [cmake] -- Check for working CXX compiler: C:/qnx800/host/win64/x86_64/usr/bin/qcc.exe - works [cmake] -- Detecting CXX compile features [cmake] -- Detecting CXX compile features - done [cmake] CMake Warning (dev) at C:/Program Files/CMake/share/cmake-3.31/Modules/GNUInstallDirs.cmake:253 (message): [cmake] Unable to determine default CMAKE_INSTALL_LIBDIR directory because no [cmake] target architecture is known. Please enable at least one language before [cmake] including GNUInstallDirs. [cmake] Call Stack (most recent call first): [cmake] CMakeLists.txt:10 (include) [cmake] This warning is for project developers. Use -Wno-dev to suppress it. [cmake] [cmake] -- Configuring done (0.8s) [cmake] -- Generating done (0.0s) [cmake] -- Build files have been written to: C:/Projects/c++/HelloWorld/build/Kit_for_qnx800_64_bit_ARM-Debug [cmake] Starting: "C:\Program Files\CMake\bin\cmake.exe" --build C:/Projects/C++/HelloWorld/build/Kit_for_qnx800_64_bit_ARM-Debug --target all install [1/3 0,7/sec] Building CXX object CMakeFiles/HelloWorld.dir/main.cpp.obj cc: warning - lang-c++ is deprecated [2/3 1,3/sec] Linking CXX executable HelloWorld.exe cc: warning - lang-c++ is deprecated [2/3 1,3/sec] Install the project... -- Install configuration: "Debug" -- Installing: C:/Users/Cristian Adam/AppData/Local/Temp/QtCreator-XXAEBJ/staging-41a9baf0fb2ccccf/Program Files (x86)/HelloWorld/bin/HelloWorld.exe
Unfortunately the clangd code model reports:
LanguageClient clangd for HelloWorld: Error -32001: invalid AST
I have attached the compile_commands.jsonfile. I can see some -D arguments which have weird values e.g. unsigned int or ##L