Hi,
I'm using QtCreator 4.0.1 and I'm trying to cross compile a qt cmake project, but it fails like this at ./cmake stage:
Full cmake log can be seen in the attached cmake.txt file.
-- Disabled building system-sync projects
-- Enabled building the trip logger project
-- Enabled building the Front-End SDK
-- Enabled building the tests
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
CMAKE_C_COMPILER= /mnt/bloks-sina-rootfs/usr/bin/cc
-- The C compiler identification is GNU 5.4.0
-- The CXX compiler identification is GNU 4.9.1
-- Check for working C compiler: /mnt/bloks-sina-rootfs/usr/bin/cc
-- Check for working C compiler: /mnt/bloks-sina-rootfs/usr/bin/cc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
I attached the setup of the kit!
So my issue is that after the cmake configuration is finished, qt creator comes up with the cache issue and runs again cmake with other env variables:
-- Configuring done
You have changed variables that require your cache to be deleted.
Configure will be re-run and you may have to reset some variables.
The following variables have changed:
I'm using a toolchain file for cross compiling and passing it to qtcreator in the CMake Configuration like this: "CMAKE_TOOLCHAIN_FILE:STRING=~/toolchain.cmake".
I have only the "CMAKE_TOOLCHAIN_FILE" in my "CMake Configuration."
# this one is important
SET(CMAKE_SYSTEM_NAME Linux)
#this one not so much
SET(CMAKE_SYSTEM_VERSION 1)
# specify the cross compiler
SET(CMAKE_C_COMPILER /home/ciprian/tmp/qtQUICKimg/toolchain/gcc-linaro-4.9-2014.05-arm-linux-gnueabihf-x86_64-linux-gnu/bin/arm-linux-gnueabihf-gcc)
SET(CMAKE_CXX_COMPILER /home/ciprian/tmp/qtQUICKimg/toolchain/gcc-linaro-4.9-2014.05-arm-linux-gnueabihf-x86_64-linux-gnu/bin/arm-linux-gnueabihf-g++)
# specify the sysroot
SET(CMAKE_SYSROOT /mnt/bloks-sina-rootfs/)
SET(CMAKE_PREFIX_PATH /mnt/bloks-sina-rootfs/usr/local/qt5.6.1/lib/cmake)
# search for programs in the build host directories
SET(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
# for libraries and headers in the target directories
SET(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
SET(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
Bookmarks