CMake Errors while trying to cross compile for RPi 3B+ using Qt Creator
-
I have a Yocto Build with meta-boot2qt and meta-qt6 layers running on my RPi 3B+. The build boots up and runs the default app fine. I have set up the device in Qt Creator. I have also set up the kit settings. Right as the project loads, even before I try to build, I get the CMake errors.
I tried searching for a solution. Most people are facing this issue due to some other reason, either on Windows, or the error is slightly different.
I can't figure out what is wrong. Below I am sharing my settings and the errors as well as log files.
Kit Settings:
GCC Compiler Path: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
G++ Compiler Path: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
Debugger: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gdb
CMake 3.20.2: /usr/local/bin/cmake
CMake Generator:CMake Configuration:
CMAKE_CXX_COMPILER:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
CMAKE_C_COMPILER:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc
CMAKE_MAKE_PROGRAM:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make
CMAKE_TOOLCHAIN_FILE:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmakeError I get when Qt Creator tries to use CMake:
Running /usr/local/bin/cmake -S /home/dellpc/Documents/qt_apps/midnight_scroll -B /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV '-GUnix Makefiles' -DCMAKE_BUILD_TYPE:String=Debug -DCMAKE_SYSROOT:PATH=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -DCMAKE_C_COMPILER_TARGET:STRING=arm-poky-linux-gnueabi -DCMAKE_CXX_COMPILER_TARGET:STRING=arm-poky-linux-gnueabi -DCMAKE_CXX_COMPILER:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -DCMAKE_C_COMPILER:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-gcc -DCMAKE_MAKE_PROGRAM:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -DCMAKE_TOOLCHAIN_FILE:FILEPATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share/cmake/OEToolchainConfig.cmake in /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV. -- The CXX compiler identification is GNU 9.3.0 -- Detecting CXX compiler ABI info -- Detecting CXX compiler ABI info - failed -- Check for working CXX compiler: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ -- Check for working CXX compiler: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ - broken CMake Error at /usr/local/share/cmake-3.20/Modules/CMakeTestCXXCompiler.cmake:59 (message): The C++ compiler "/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++" is not able to compile a simple test program. It fails with the following output: Change Dir: /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp Run Build Command(s):/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -f Makefile cmTC_73f94/fast && /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -f CMakeFiles/cmTC_73f94.dir/build.make CMakeFiles/cmTC_73f94.dir/build make[1]: Entering directory '/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -o CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o -c /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_73f94 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_73f94.dir/link.txt --verbose=1 /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o -o cmTC_73f94 /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: error: cmTC_73f94 uses VFP register arguments, CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o does not /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: failed to merge target specific data of file CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC_73f94.dir/build.make:99: cmTC_73f94] Error 1 make[1]: Leaving directory '/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp' make: *** [Makefile:127: cmTC_73f94/fast] Error 2 CMake will not be able to correctly generate this project. Call Stack (most recent call first): CMakeLists.txt:3 (project) -- Configuring incomplete, errors occurred! See also "/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeOutput.log". See also "/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeError.log". CMake process exited with exit code 1. Elapsed time: 00:00.
Extremely long log file below:
CMakeOutput.log:
cat /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeOutput.log The target system is: Linux - - The host system is: Linux - 5.8.0-50-generic - x86_64 Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded. Compiler: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ Build flags: Id flags: -c The output was: 0 Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o" The CXX compiler identification is GNU, found in "/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/3.20.2/CompilerIdCXX/CMakeCXXCompilerId.o"
CMakeError.log:
Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ Build flags: Id flags: -c;--target=arm-poky-linux-gnueabi The output was: 1 arm-poky-linux-gnueabi-g++: error: unrecognized command line option '--target=arm-poky-linux-gnueabi' Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed. Compiler: /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ Build flags: Id flags: The output was: 1 /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find Scrt1.o: No such file or directory /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find crti.o: No such file or directory /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find crtbeginS.o: No such file or directory /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lstdc++ /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lm /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lgcc_s /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lgcc /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lc /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lgcc_s /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find -lgcc /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find crtendS.o: No such file or directory /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: cannot find crtn.o: No such file or directory collect2: error: ld returned 1 exit status Detecting CXX compiler ABI info failed to compile with the following output: Change Dir: /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp Run Build Command(s):/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -f Makefile cmTC_ce8d4/fast && /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -f CMakeFiles/cmTC_ce8d4.dir/build.make CMakeFiles/cmTC_ce8d4.dir/build make[1]: Entering directory '/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -v -o CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o -c /usr/local/share/cmake-3.20/Modules/CMakeCXXCompilerABI.cpp Using built-in specs. COLLECT_GCC=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ Target: arm-poky-linux-gnueabi Configured with: ../../../../../../work-shared/gcc-9.3.0-r0/gcc-9.3.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi --prefix=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --sbindir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --libexecdir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi --datadir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi --includedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/dellpc/rpi_build/build-raspberrypi3/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/9.3.0-r0/recipe-sysroot --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-default-pie --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-poky-linux-gnueabi- --without-local-prefix --disable-install-libiberty --enable-lto --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/9.3.0 --with-build-time-tools=/home/dellpc/rpi_build/build-raspberrypi3/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/9.3.0-r0/recipe-sysroot-native/usr/arm-poky-linux-gnueabi/bin --with-sysroot=/not/exist --with-build-sysroot=/home/dellpc/rpi_build/build-raspberrypi3/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/9.3.0-r0/recipe-sysroot --enable-poison-system-directories --disable-static --enable-nls --with-glibc-version=2.28 --enable-initfini-array Thread model: posix gcc version 9.3.0 (GCC) COLLECT_GCC_OPTIONS='--sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi' '-v' '-o' 'CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t' /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/cc1plus -quiet -v -isysroot /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -D_GNU_SOURCE /usr/local/share/cmake-3.20/Modules/CMakeCXXCompilerABI.cpp -quiet -dumpbase CMakeCXXCompilerABI.cpp -mcpu=arm10tdmi -mtls-dialect=gnu -marm -march=armv5t -auxbase-strip CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o -version -o /tmp/cc8QwgGo.s GNU C++14 (GCC) version 9.3.0 (arm-poky-linux-gnueabi) compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 ignoring nonexistent directory "/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/9.3.0/include" ignoring nonexistent directory "/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/local/include" ignoring nonexistent directory "/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/../../../../../arm-poky-linux-gnueabi/include" #include "..." search starts here: #include <...> search starts here: /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/c++/9.3.0 /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/c++/9.3.0/arm-poky-linux-gnueabi /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/c++/9.3.0/backward /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/include /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/include-fixed /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/include/ End of search list. GNU C++14 (GCC) version 9.3.0 (arm-poky-linux-gnueabi) compiled by GNU C version 9.3.0, GMP version 6.2.0, MPFR version 4.0.2, MPC version 1.1.0, isl version none GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Compiler executable checksum: 755df72605e0e1937138e1ad15f3f448 COLLECT_GCC_OPTIONS='--sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi' '-v' '-o' 'CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t' /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/as -v -march=armv5t -meabi=5 -o CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o /tmp/cc8QwgGo.s GNU assembler version 2.34.0 (arm-poky-linux-gnueabi) using BFD version (GNU Binutils) 2.34.0.20200220 COMPILER_PATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/ LIBRARY_PATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/lib/:/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/ COLLECT_GCC_OPTIONS='--sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi' '-v' '-o' 'CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o' '-c' '-shared-libgcc' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t' Linking CXX executable cmTC_ce8d4 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_ce8d4.dir/link.txt --verbose=1 /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -v CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o -o cmTC_ce8d4 Using built-in specs. COLLECT_GCC=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ COLLECT_LTO_WRAPPER=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/lto-wrapper Target: arm-poky-linux-gnueabi Configured with: ../../../../../../work-shared/gcc-9.3.0-r0/gcc-9.3.0/configure --build=x86_64-linux --host=x86_64-pokysdk-linux --target=arm-poky-linux-gnueabi --prefix=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr --exec_prefix=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr --bindir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --sbindir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi --libexecdir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi --datadir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share --sysconfdir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/etc --sharedstatedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/com --localstatedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/var --libdir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi --includedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/include --oldincludedir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/include --infodir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share/info --mandir=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/share/man --disable-silent-rules --disable-dependency-tracking --with-libtool-sysroot=/home/dellpc/rpi_build/build-raspberrypi3/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/9.3.0-r0/recipe-sysroot --with-gnu-ld --enable-shared --enable-languages=c,c++ --enable-threads=posix --enable-multilib --enable-default-pie --enable-c99 --enable-long-long --enable-symvers=gnu --enable-libstdcxx-pch --program-prefix=arm-poky-linux-gnueabi- --without-local-prefix --disable-install-libiberty --enable-lto --disable-libssp --enable-libitm --disable-bootstrap --disable-libmudflap --with-system-zlib --with-linker-hash-style=gnu --enable-linker-build-id --with-ppl=no --with-cloog=no --enable-checking=release --enable-cheaders=c_global --without-isl --with-gxx-include-dir=/not/exist/usr/include/c++/9.3.0 --with-build-time-tools=/home/dellpc/rpi_build/build-raspberrypi3/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/9.3.0-r0/recipe-sysroot-native/usr/arm-poky-linux-gnueabi/bin --with-sysroot=/not/exist --with-build-sysroot=/home/dellpc/rpi_build/build-raspberrypi3/tmp/work/x86_64-nativesdk-pokysdk-linux/gcc-cross-canadian-arm/9.3.0-r0/recipe-sysroot --enable-poison-system-directories --disable-static --enable-nls --with-glibc-version=2.28 --enable-initfini-array Thread model: posix gcc version 9.3.0 (GCC) COMPILER_PATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/ LIBRARY_PATH=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/lib/:/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/9.3.0/:/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/ COLLECT_GCC_OPTIONS='--sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi' '-v' '-o' 'cmTC_ce8d4' '-shared-libgcc' '-mcpu=arm10tdmi' '-mtls-dialect=gnu' '-marm' '-march=armv5t' /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/collect2 -plugin /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/liblto_plugin.so -plugin-opt=/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/lto-wrapper -plugin-opt=-fresolution=/tmp/ccY0sFCN.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi --build-id --eh-frame-hdr --hash-style=gnu -dynamic-linker /lib/ld-linux.so.3 -X -m armelf_linux_eabi -pie -o cmTC_ce8d4 /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/Scrt1.o /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/crti.o /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/9.3.0/crtbeginS.o -L/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/lib/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0 -L/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/lib -L/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/9.3.0 -L/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o -lstdc++ -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/arm-poky-linux-gnueabi/9.3.0/crtendS.o /opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi/usr/lib/crtn.o /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: error: cmTC_ce8d4 uses VFP register arguments, CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o does not /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: failed to merge target specific data of file CMakeFiles/cmTC_ce8d4.dir/CMakeCXXCompilerABI.cpp.o collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC_ce8d4.dir/build.make:99: cmTC_ce8d4] Error 1 make[1]: Leaving directory '/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp' make: *** [Makefile:127: cmTC_ce8d4/fast] Error 2 Determining if the CXX compiler works failed with the following output: Change Dir: /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp Run Build Command(s):/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -f Makefile cmTC_73f94/fast && /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/make -f CMakeFiles/cmTC_73f94.dir/build.make CMakeFiles/cmTC_73f94.dir/build make[1]: Entering directory '/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp' Building CXX object CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi -o CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o -c /tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp/testCXXCompiler.cxx Linking CXX executable cmTC_73f94 /usr/local/bin/cmake -E cmake_link_script CMakeFiles/cmTC_73f94.dir/link.txt --verbose=1 /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++ --sysroot=/opt/b2qt/3.1.6/sysroots/cortexa7t2hf-neon-vfpv4-poky-linux-gnueabi CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o -o cmTC_73f94 /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: error: cmTC_73f94 uses VFP register arguments, CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o does not /opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/libexec/arm-poky-linux-gnueabi/gcc/arm-poky-linux-gnueabi/9.3.0/ld: failed to merge target specific data of file CMakeFiles/cmTC_73f94.dir/testCXXCompiler.cxx.o collect2: error: ld returned 1 exit status make[1]: *** [CMakeFiles/cmTC_73f94.dir/build.make:99: cmTC_73f94] Error 1 make[1]: Leaving directory '/tmp/QtCreator-lfnVzY/qtc-cmake-TEloPtbV/CMakeFiles/CMakeTmp' make: *** [Makefile:127: cmTC_73f94/fast] Error 2
-
@ak_07 said in CMake Errors while trying to cross compile for RPi 3B+ using Qt Creator:
/opt/b2qt/3.1.6/sysroots/x86_64-pokysdk-linux/usr/bin/arm-poky-linux-gnueabi/arm-poky-linux-gnueabi-g++
Can you compile a simple hello world test from the command line using the cross-compiler directly (which you also installed under
sysroots
which confused me at first) and run it on the target?