Git Product home page Git Product logo

Comments (56)

PhysicsX avatar PhysicsX commented on May 18, 2024 1

Yes, tutorial is quite old, probably toolchain is out of date. Could you please use like Linaro version 7.5.0 and give it a try.

According to your output I can update the page.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024 1

Ok, I believe I tried using 6.3 before but i remember getting a similar error, but I think I was on the wrong docker container then. Ill try both. Thank you for helping me out I’ve been banging my head against the wall for a while. Ill let you know if 6.3 or 6.4 works.

You can see some errors also, I can try it myself to be sure but I do not have time nowadays. Try and see. Use clean ubuntu plase. As I told you, it is highly possible that you can see some erros, but lets see.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024 1

Oh now i remember why i didnt use 6.3 I got this error

root@73630a1ab9aa:~# wget https://download.qt.io/official_releases/qt/6.3/6.3.0/submodules/qtbase-everywhere-src-6.3.0.tar.xz
--2023-12-08 23:23:37--  https://download.qt.io/official_releases/qt/6.3/6.3.0/submodules/qtbase-everywhere-src-6.3.0.tar.xz
Resolving download.qt.io (download.qt.io)... 77.86.162.2
Connecting to download.qt.io (download.qt.io)|77.86.162.2|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-12-08 23:23:38 ERROR 404: Not Found.

Yes because 6.3 is deleted. you can use 6.5, but as I see you should be able to checkout to specific version as they do in their tutorial. (for 6.4)
image

If you check this link https://download.qt.io/official_releases/qt/ you will see available versions. I need to update the page probably, thanks to point out.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024 1

Ok, just for clarity, Im going to first try following your guide exactly, using 6.3 instead of 6.6. On a brand new amd64/ubuntu image docker container. Again I really really appreciate the time youre giving me.

No you should follow the tutorial they provided. It looks more up to date. Use 6.4. Please try exaclty same steps. Why do you need docker image ? Some packages can be missing there? Create a new ubuntu virtual machine, then follow same steps. When you have working qt then you can play with docker.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024 1

I will add new readme for 6.6.1, then I will extend with docker with video tutorial.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024 1

Thats awesome you are a legend!

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Do you mean using this

runtime-gcc-linaro-7.5.0-2019.12-aarch64-linux-gnu.tar.xz

instead of the toolchain suggested in the tutorial

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Yes you can try it. (I have not checked yet) but if you are able to find hf(hard float) version it will be better.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Sorry for the delay, I think I figured out what the problem was. I created an ubuntu docker container that was aarch64 based instead of x86. I used the amd64 docker container and followed the guide you posted and finally successfully configure the qt-cross directory. The next issue now is Im getting some undefined reference errors to undefined reference to `std::filesystem::copy(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&, std::filesystem::copy_options, std::error_code&)' when building the qt-cross directory. Going to investigate this and will let you know if I have to make any alterations to the guide. So far everything still works.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Update. I tried using this as my toolchain, however im encountering an error during the build process, similar to what I was encountering with the other toolchain

src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o 
/opt/rpi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/root/rpi-sdk/sysroot -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_NAMESPACE=\"\" -DQT_NO_AS_CONST -DQT_NO_DEBUG -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=6 -DQT_VERSION_PATCH=0 -DQT_VERSION_STR=\"6.6.0\" -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/root/qt-cross/qtbase-everywhere-src-6.6.0/src/tools/syncqt -I/root/qt-cross/src/tools/syncqt -I/root/qt-cross/qtbase-everywhere-src-6.6.0/mkspecs/linux-g++ -I/root/qt-cross/include -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O3 -fexceptions -std=c++1z -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -pthread -MD -MT src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o -MF src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o.d -o src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o -c /root/qt-cross/qtbase-everywhere-src-6.6.0/src/tools/syncqt/main.cpp
/root/qt-cross/qtbase-everywhere-src-6.6.0/src/tools/syncqt/main.cpp:25:10: fatal error: filesystem: No such file or directory
 #include <filesystem>

I think im gonna investigate using a more modern toolchain and see if that fixes anything.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

So another failure. Tried using gcc-11 specifically using this as my toolchain

cmake_minimum_required(VERSION 3.16)
include_guard(GLOBAL)

set(CMAKE_SYSTEM_NAME Linux)
set(CMAKE_SYSTEM_PROCESSOR arm)

set(TARGET_SYSROOT /root/rpi-sdk/sysroot)

#set(CROSS_COMPILER /opt/rpi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf)
set(CROSS_COMPILER /usr/bin/x86_64-linux-gnu)
set(CMAKE_SYSROOT ${TARGET_SYSROOT})

set(ENV{PKG_CONFIG_PATH} $PKG_CONFIG_PATH:/usr/lib/aarch64-linux-gnu/pkgconfig)
set(ENV{PKG_CONFIG_LIBDIR} /usr/lib/pkgconfig:/usr/share/pkgconfig/:${TARGET_SYSROOT}/usr/lib/aarch64-linux-gnu/pkgconfig:${TARGET_SYSROOT}/usr/lib/pkgconfig)
set(ENV{PKG_CONFIG_SYSROOT_DIR} ${CMAKE_SYSROOT})

set(CMAKE_C_COMPILER ${CROSS_COMPILER}-gcc-11)
set(CMAKE_CXX_COMPILER ${CROSS_COMPILER}-g++-11)

set(CMAKE_LIBRARY_ARCHITECTURE arm-linux-gnueabihf)

set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -fPIC -Wl,-rpath-link,${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} -L${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}")

set(CMAKE_C_FLAGS "${CMAKE_CXX_FLAGS} -lstdc++fs  -fPIC -Wl,-rpath-link,${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} -L${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}")

set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fPIC -Wl,-rpath-link,${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE} -L${CMAKE_SYSROOT}/usr/lib/${CMAKE_LIBRARY_ARCHITECTURE}")

set(QT_COMPILER_FLAGS "-march=armv8-a -mfpu=crypto-neon-fp-armv8 -mtune=cortex-a72 -mfloat-abi=hard")
set(QT_COMPILER_FLAGS_RELEASE "-O2 -pipe")
set(QT_LINKER_FLAGS "-Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed")

set(CMAKE_FIND_ROOT_PATH_MODE_PROGRAM NEVER)
set(CMAKE_FIND_ROOT_PATH_MODE_LIBRARY ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_INCLUDE ONLY)
set(CMAKE_FIND_ROOT_PATH_MODE_PACKAGE ONLY)

set(CMAKE_THREAD_LIBS_INIT "-lpthread")
set(CMAKE_HAVE_THREADS_LIBRARY 1)
set(CMAKE_USE_WIN32_THREADS_INIT 0)
set(CMAKE_USE_PTHREADS_INIT 1)
set(THREADS_PREFER_PTHREAD_FLAG ON)

and ended up getting this error, which ive gotten before and it never seems to end up well.

CMake Error at cmake/QtBaseConfigureTests.cmake:34 (message):
  Failed to build architecture extraction project.  Build output:

   Change Dir: '/root/qt-cross/config.tests/arch'

  

  Run Build Command(s): /usr/bin/ninja -v

  [1/2] /usr/bin/x86_64-linux-gnu-g++-11 --sysroot=/root/rpi-sdk/sysroot
  -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
  -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -fPIC
  -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
  -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -std=gnu++17 -o
  CMakeFiles/architecture_test.dir/arch.cpp.o -c
  /root/qt-cross/qtbase-everywhere-src-6.6.0/config.tests/arch/arch.cpp

  FAILED: CMakeFiles/architecture_test.dir/arch.cpp.o

  /usr/bin/x86_64-linux-gnu-g++-11 --sysroot=/root/rpi-sdk/sysroot -fPIC
  -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
  -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -fPIC
  -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
  -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -std=gnu++17 -o
  CMakeFiles/architecture_test.dir/arch.cpp.o -c
  /root/qt-cross/qtbase-everywhere-src-6.6.0/config.tests/arch/arch.cpp

  In file included from
  /root/qt-cross/qtbase-everywhere-src-6.6.0/config.tests/arch/arch.cpp:7:

  /root/rpi-sdk/sysroot/usr/include/stdio.h:27:10: fatal error:
  bits/libc-header-start.h: No such file or directory

     27 | #include <bits/libc-header-start.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~

  compilation terminated.

  ninja: build stopped: subcommand failed.



Call Stack (most recent call first):
  cmake/QtBaseConfigureTests.cmake:177 (qt_run_config_test_architecture)
  cmake/QtBaseConfigureTests.cmake:190 (qt_run_qtbase_config_tests)
  CMakeLists.txt:137 (include)

Going to try my hacks ive used before (moving bits, sys, gnu folders outside of the arm-linux folder in the usr/include inside my sysroot, but i have a feeling im going to get the C++-11 missing or not compiled error again

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

I was right. get the same two errors

ERROR: C++11 <random> is required and is missing or failed to compile.
ERROR: The OpenGL functionality tests failed! You might need to modify the OpenGL package search path by setting the OpenGL_DIR CMake variable to the OpenGL library's installation directory.

I assume its because I’m not using the correct cross compiler for the target architecture, but as someone whos never cross compiled anything, I have no idea.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

I am not sure what you are doing there, If you use docker or anything else, you can see different errors.

I saw before that other people were able to compile it with different version of toolchains. But as I told you toolchain which is in the tutorial is old.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Which part are you referring to.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Share your histroy, let me check.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Like my terminal history? or explain what I’ve done so far?

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Yes terminal history, you can also explain what are you doing.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

ok its pretty big but ill try to break things down for what Ive tried.
So when I first followed the guide, I used the toolchain suggested in the guide, and i was able to successfully configure the cross directory with these commands

root@73630a1ab9aa:~/qt-cross# cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_FEATURE_eglfs_egldevice=ON -DQT_FEATURE_eglfs_gbm=ON -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON  -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/root/qt6Host -DCMAKE_STAGING_PREFIX=/root/qt6rpi -DCMAKE_INSTALL_PREFIX=/root/qt6crosspi -DCMAKE_PREFIX_PATH=/root/rpi-sdk/sysroot/usr/lib/ -DCMAKE_TOOLCHAIN_FILE=/root/qt-cross/toolchain.cmake /root/qt-cross/qtbase-everywhere-src-6.6.0/

Then when that succeeded I ran this command

root@73630a1ab9aa:~/qt-cross# cmake --build . --parallel 8

which resulted in this massive error

[15/1690] Running rcc for resource example_icons
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
[58/1690] Linking CXX executable libexec/syncqt
FAILED: libexec/syncqt 
: && /opt/rpi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf-g++ --sysroot=/root/rpi-sdk/sysroot -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O3 -fexceptions -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf     -Wl,--enable-new-dtags -fPIE -pie src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o -o libexec/syncqt  -Wl,-rpath,::::::::::::::  -pthread && :
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `std::filesystem::__cxx11::path::path<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::filesystem::__cxx11::path>(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::filesystem::__cxx11::path::format) [clone .constprop.967]':
main.cpp:(.text+0x7ea): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::generateAliasedHeaderFileIfTimestampChanged(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::chrono::time_point<std::chrono::_V2::system_clock, std::chrono::duration<long long, std::ratio<1ll, 1000000000ll> > > const&)':
main.cpp:(.text+0x83a): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0x858): undefined reference to `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `utils::createDirectories(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string_view<char, std::char_traits<char> >, bool*)':
main.cpp:(.text+0xa72): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0xaa8): undefined reference to `std::filesystem::create_directories(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `std::filesystem::__cxx11::path::path(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >&&, std::filesystem::__cxx11::path::format) [clone .constprop.987]':
main.cpp:(.text+0xbf4): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::updateOrCopy(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&) [clone .part.268]':
main.cpp:(.text+0xe3a): undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0xe5e): undefined reference to `std::filesystem::copy(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&, std::filesystem::copy_options, std::error_code&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0xe7a): undefined reference to `std::filesystem::remove(std::filesystem::__cxx11::path const&, std::error_code&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0xe8c): undefined reference to `std::filesystem::copy(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&, std::filesystem::copy_options, std::error_code&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::writeIfDifferent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
main.cpp:(.text+0x1044): undefined reference to `std::filesystem::__cxx11::path::parent_path() const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0x1096): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0x1180): undefined reference to `std::filesystem::file_size(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `utils::normilizedPath(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)':
main.cpp:(.text+0x15b6): undefined reference to `std::filesystem::weakly_canonical(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text+0x15f4): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::makeHeaderAbsolute(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) const':
main.cpp:(.text+0x1678): undefined reference to `std::filesystem::__cxx11::path::has_root_directory() const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o:(.ARM.extab+0xc4): undefined reference to `typeinfo for std::filesystem::__cxx11::filesystem_error'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::copyGeneratedHeadersToStagingDirectory(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)':
main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x11a): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x1bc): undefined reference to `std::filesystem::__cxx11::path::_M_split_cmpts()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x260): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x2b6): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x300): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x312): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x318): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x31e): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x326): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::operator*() const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x36c): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::operator++()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x3e6): undefined reference to `std::filesystem::remove(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x45a): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x460): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN11SyncScanner38copyGeneratedHeadersToStagingDirectoryERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x466): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::parseVersionScriptContent(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, SyncScanner::ParsingResult&)':
main.cpp:(.text._ZN11SyncScanner25parseVersionScriptContentENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_13ParsingResultE[_ZN11SyncScanner25parseVersionScriptContentENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_13ParsingResultE]+0x1ca): undefined reference to `std::filesystem::relative(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner25parseVersionScriptContentENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_13ParsingResultE[_ZN11SyncScanner25parseVersionScriptContentENSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERNS_13ParsingResultE]+0x532): undefined reference to `std::filesystem::relative(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::parseHeader(std::filesystem::__cxx11::path const&, SyncScanner::ParsingResult&, unsigned int)':
main.cpp:(.text._ZN11SyncScanner11parseHeaderERKNSt10filesystem7__cxx114pathERNS_13ParsingResultEj[_ZN11SyncScanner11parseHeaderERKNSt10filesystem7__cxx114pathERNS_13ParsingResultEj]+0x1512): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::processHeader(std::filesystem::__cxx11::path const&)':
main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x1de): undefined reference to `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&, std::error_code&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x330): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x350): undefined reference to `std::filesystem::weakly_canonical(std::filesystem::__cxx11::path const&, std::error_code&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x35e): undefined reference to `std::filesystem::__cxx11::path::root_name() const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x612): undefined reference to `std::filesystem::__cxx11::path::compare(std::filesystem::__cxx11::path const&) const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x62c): undefined reference to `std::filesystem::relative(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE[_ZN11SyncScanner13processHeaderERKNSt10filesystem7__cxx114pathE]+0x6f2): undefined reference to `std::filesystem::relative(std::filesystem::__cxx11::path const&, std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `SyncScanner::sync()':
main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x2d6): undefined reference to `std::filesystem::last_write_time(std::filesystem::__cxx11::path const&, std::error_code&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x3b4): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::recursive_directory_iterator(std::filesystem::__cxx11::path const&, std::filesystem::directory_options, std::error_code*)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x40a): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x45e): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x46e): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x474): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x47a): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x482): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::operator*() const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x49a): undefined reference to `std::filesystem::status(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x4b4): undefined reference to `std::filesystem::__cxx11::path::_M_find_extension() const'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x604): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::operator++()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x8c6): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x8cc): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text._ZN11SyncScanner4syncEv[_ZN11SyncScanner4syncEv]+0x8d2): undefined reference to `std::filesystem::__cxx11::recursive_directory_iterator::~recursive_directory_iterator()'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o: in function `main':
main.cpp:(.text.startup+0x19a): undefined reference to `std::filesystem::weakly_canonical(std::filesystem::__cxx11::path const&)'
/opt/rpi/rpi-gcc-8.3.0/lib/gcc/arm-linux-gnueabihf/8.3.0/../../../../arm-linux-gnueabihf/bin/ld: main.cpp:(.text.startup+0x1a2): undefined reference to `std::filesystem::__cxx11::path::root_name() const'
collect2: error: ld returned 1 exit status
[65/1690] Building CXX object src/tools/bootstrap/CMakeFiles/Bootstrap.dir/__/__/corelib/kernel/qcoreapplication.cpp.o
ninja: build stopped: subcommand failed.

So I then tried using the linaro toolchain you recommended

root@73630a1ab9aa:/opt/rpi/rpi-gcc-8.3.0# wget https://releases.linaro.org/components/toolchain/binaries/latest-7/arm-linux-gnueabihf/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf.tar.xz

and unzipped it

then i modified my toolchain to use this, first clearing the qt-cross directory and simply substituting the toolchain you had for this one, which succeeded yet again in configuring qt

root@73630a1ab9aa:~/qt-cross# cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_FEATURE_eglfs_egldevice=ON -DQT_FEATURE_eglfs_gbm=ON -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON  -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/root/qt6Host -DCMAKE_STAGING_PREFIX=/root/qt6rpi -DCMAKE_INSTALL_PREFIX=/root/qt6crosspi -DCMAKE_PREFIX_PATH=/root/rpi-sdk/sysroot/usr/lib/ -DCMAKE_TOOLCHAIN_FILE=/root/qt-cross/toolchain.cmake /root/qt-cross/qtbase-everywhere-src-6.6.0/
-- The CXX compiler identification is GNU 7.5.0
-- The C compiler identification is GNU 7.5.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/rpi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rpi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rpi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done

and resulted in a similar error as the other toolchain when i tried to build it

root@73630a1ab9aa:~/qt-cross# cmake --build . --parallel 8
[15/1690] Running rcc for resource example_icons
Detected locale "C" with character encoding "ANSI_X3.4-1968", which is not UTF-8.
Qt depends on a UTF-8 locale, and has switched to "C.UTF-8" instead.
If this causes problems, reconfigure your locale. See the locale(1) manual
for more information.
[20/1690] Building CXX object src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o
FAILED: src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o 
/opt/rpi/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ --sysroot=/root/rpi-sdk/sysroot -DQT_DISABLE_DEPRECATED_UP_TO=0x050000 -DQT_EXPLICIT_QFILE_CONSTRUCTION_FROM_PATH -DQT_LEAN_HEADERS=1 -DQT_NAMESPACE=\"\" -DQT_NO_AS_CONST -DQT_NO_DEBUG -DQT_NO_JAVA_STYLE_ITERATORS -DQT_NO_NARROWING_CONVERSIONS_IN_CONNECT -DQT_NO_QEXCHANGE -DQT_USE_QSTRINGBUILDER -DQT_VERSION_MAJOR=6 -DQT_VERSION_MINOR=6 -DQT_VERSION_PATCH=0 -DQT_VERSION_STR=\"6.6.0\" -DQT_WARN_DEPRECATED_UP_TO=0x070000 -D_LARGEFILE64_SOURCE -D_LARGEFILE_SOURCE -I/root/qt-cross/qtbase-everywhere-src-6.6.0/src/tools/syncqt -I/root/qt-cross/src/tools/syncqt -I/root/qt-cross/qtbase-everywhere-src-6.6.0/mkspecs/linux-g++ -I/root/qt-cross/include -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -DNDEBUG -O3 -fexceptions -std=c++1z -fPIE -fvisibility=hidden -fvisibility-inlines-hidden -Wall -Wextra -pthread -MD -MT src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o -MF src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o.d -o src/tools/syncqt/CMakeFiles/syncqt_native.dir/main.cpp.o -c /root/qt-cross/qtbase-everywhere-src-6.6.0/src/tools/syncqt/main.cpp
/root/qt-cross/qtbase-everywhere-src-6.6.0/src/tools/syncqt/main.cpp:25:10: fatal error: filesystem: No such file or directory
 #include <filesystem>
          ^~~~~~~~~~~~
compilation terminated.
[27/1690] Building CXX object src/assets/icons/CMakeFile...consPrivate_resources_1.dir/.rcc/qrc_example_icons.cpp.
ninja: build stopped: subcommand failed.

Then i looked up what this was and it recommended doing <experimental/filesystem>
so i changed that line in that file which resulted in getting the same error i got with the original toolchain

so then i changed to the newer version of gcc
$ sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu

and then reconfigured my toolchain.cmake file to use this which resulted in the error i just sent when trying to configure qt. Any help would be so unbelievably appreciated.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

I can supply the full success configuration output for your guide’s toolchain because I pretty much am getting to that point with the linaro toolchain if youd like.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

What is your host machine ? have you followed exactly same steps ? Need to see history. It looks like, you make sth different.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

I believe ive followed all the steps exactly right

root@73630a1ab9aa:~/qt-cross# uname -a
Linux 73630a1ab9aa 6.4.16-linuxkit #1 SMP PREEMPT Thu Nov 16 10:49:20 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux

Heres the configuration output

root@73630a1ab9aa:~/qt-cross# cmake -GNinja -DCMAKE_BUILD_TYPE=Release -DQT_FEATURE_eglfs_egldevice=ON -DQT_FEATURE_eglfs_gbm=ON -DQT_BUILD_TOOLS_WHEN_CROSSCOMPILING=ON  -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=/root/qt6Host -DCMAKE_STAGING_PREFIX=/root/qt6rpi -DCMAKE_INSTALL_PREFIX=/root/qt6crosspi -DCMAKE_PREFIX_PATH=/root/rpi-sdk/sysroot/usr/lib/ -DCMAKE_TOOLCHAIN_FILE=/root/qt-cross/toolchain.cmake /root/qt-cross/qtbase-everywhere-src-6.6.0/
-- The CXX compiler identification is GNU 8.3.0
-- The C compiler identification is GNU 8.3.0
-- The ASM compiler identification is GNU
-- Found assembler: /opt/rpi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf-gcc
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /opt/rpi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf-g++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /opt/rpi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf-gcc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
CMake Warning at cmake/QtSetup.cmake:293 (message):
  QT_BUILD_TOOLS_WHEN_CROSSCOMPILING is deprecated.  Please use
  QT_FORCE_BUILD_TOOLS instead.
Call Stack (most recent call first):
  cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:265 (include)
  cmake/QtBuildInternals/QtBuildInternalsConfig.cmake:427 (qt_build_internals_set_up_private_api)
  CMakeLists.txt:127 (qt_build_repo_begin)


            -DCMAKE_C_FLAGS= -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
            -DCMAKE_C_FLAGS_DEBUG=-g
            -DCMAKE_C_FLAGS_RELEASE=-O3 -DNDEBUG
            -DCMAKE_C_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG
            -DCMAKE_CXX_FLAGS= -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
            -DCMAKE_CXX_FLAGS_DEBUG=-g
            -DCMAKE_CXX_FLAGS_RELEASE=-O3 -DNDEBUG
            -DCMAKE_CXX_FLAGS_RELWITHDEBINFO=-O2 -g -DNDEBUG
            -DCMAKE_OBJCOPY=/opt/rpi/rpi-gcc-8.3.0/bin/arm-linux-gnueabihf-objcopy
            -DCMAKE_EXE_LINKER_FLAGS= -fPIC -Wl,-rpath-link,/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf -L/root/rpi-sdk/sysroot/usr/lib/arm-linux-gnueabihf
            -DCMAKE_TOOLCHAIN_FILE=/root/qt-cross/toolchain.cmake
            -DCMAKE_C_STANDARD=11
            -DCMAKE_C_STANDARD_REQUIRED=ON
            -DCMAKE_CXX_STANDARD=17
            -DCMAKE_CXX_STANDARD_REQUIRED=ON
            -DCMAKE_MODULE_PATH:STRING=/root/qt-cross/qtbase-everywhere-src-6.6.0/cmake/platforms

-- Configuration summary shown below. It has also been written to /root/qt-cross/config.summary
-- Configure with --log-level=STATUS or higher to increase CMake's message verbosity. The log level does not persist across reconfigurations.
 
-- Configure summary:

Building for: linux-g++ (arm, CPU features: )
Compiler: gcc 8.3.0
Build options:
  Mode ................................... release
  Optimize release build for size ........ no
  Fully optimize release builds (-O3) .... no
  Building shared libraries .............. yes
  Using ccache ........................... no
  Unity Build ............................ no
  Using new DTAGS ........................ yes
  Relocatable ............................ yes
  Using precompiled headers .............. yes
  Using Link Time Optimization (LTCG) .... no
  Using Intel CET ........................ no
  Target compiler supports:
    ARM Extensions ....................... <none>
  Sanitizers:
    Addresses ............................ no
    Threads .............................. no
    Memory ............................... no
    Fuzzer (instrumentation only) ........ no
    Undefined ............................ no
  Build parts ............................ libs tools
  Install examples sources ............... no
Qt modules and options:
  Qt Concurrent .......................... yes
  Qt D-Bus ............................... yes
  Qt D-Bus directly linked to libdbus .... yes
  Qt Gui ................................. yes
  Qt Network ............................. yes
  Qt PrintSupport ........................ yes
  Qt Sql ................................. yes
  Qt Testlib ............................. yes
  Qt Widgets ............................. yes
  Qt Xml ................................. yes
Support enabled for:
  Using pkg-config ....................... yes
  Using vcpkg ............................ no
  udev ................................... no
  OpenSSL ................................ yes
    Qt directly linked to OpenSSL ........ no
  OpenSSL 1.1 ............................ yes
  OpenSSL 3.0 ............................ no
  Using system zlib ...................... yes
  Zstandard support ...................... no
  Thread support ......................... yes
Common build options:
  Linker can resolve circular dependencies  yes
Qt Core:
  backtrace .............................. yes
  DoubleConversion ....................... yes
    Using system DoubleConversion ........ no
  CLONE_PIDFD support in forkfd .......... yes
  GLib ................................... yes
  ICU .................................... yes
  Using system libb2 ..................... no
  Built-in copy of the MIME database ..... yes
  Application permissions ................ yes
  Defaulting legacy IPC to POSIX ......... no
  Tracing backend ........................ <none>
  OpenSSL based cryptographic hash ....... no
  Logging backends:
    journald ............................. no
    syslog ............................... no
    slog2 ................................ no
  PCRE2 .................................. yes
    Using system PCRE2 ................... yes
Qt Sql:
  SQL item models ........................ yes
Qt Network:
  getifaddrs() ........................... yes
  IPv6 ifname ............................ yes
  libproxy ............................... no
  Linux AF_NETLINK ....................... yes
  DTLS ................................... yes
  OCSP-stapling .......................... yes
  SCTP ................................... no
  Use system proxies ..................... yes
  GSSAPI ................................. no
  Brotli Decompression Support ........... yes
  qIsEffectiveTLD() ...................... yes
    Built-in publicsuffix database ....... yes
    System publicsuffix database ......... yes
Core tools:
  Android deployment tool ................ no
  macOS deployment tool .................. no
  Windows deployment tool ................ no
  qmake .................................. yes
Qt Gui:
  Accessibility .......................... yes
  FreeType ............................... yes
    Using system FreeType ................ yes
  HarfBuzz ............................... yes
    Using system HarfBuzz ................ no
  Fontconfig ............................. yes
  Image formats:
    GIF .................................. yes
    ICO .................................. yes
    JPEG ................................. yes
      Using system libjpeg ............... yes
    PNG .................................. yes
      Using system libpng ................ yes
  Text formats:
    HtmlParser ........................... yes
    CssParser ............................ yes
    OdfWriter ............................ yes
    MarkdownReader ....................... yes
      Using system libmd4c ............... no
    MarkdownWriter ....................... yes
  EGL .................................... yes
  OpenVG ................................. no
  OpenGL:
    Desktop OpenGL ....................... yes
    OpenGL ES 2.0 ........................ no
    OpenGL ES 3.0 ........................ no
    OpenGL ES 3.1 ........................ no
    OpenGL ES 3.2 ........................ no
  Vulkan ................................. no
  Session Management ..................... yes
Features used by QPA backends:
  evdev .................................. yes
  libinput ............................... no
  HiRes wheel support in libinput ........ no
  INTEGRITY HID .......................... no
  mtdev .................................. no
  tslib .................................. no
  xkbcommon .............................. yes
  X11 specific:
    XLib ................................. yes
    XCB Xlib ............................. yes
    EGL on X11 ........................... yes
    xkbcommon-x11 ........................ yes
    xcb-sm ............................... no
QPA backends:
  DirectFB ............................... no
  EGLFS .................................. yes
  EGLFS details:
    EGLFS OpenWFD ........................ no
    EGLFS i.Mx6 .......................... no
    EGLFS i.Mx6 Wayland .................. no
    EGLFS RCAR ........................... no
    eglfs_egldevice ...................... yes
    eglfs_gbm ............................ yes
    EGLFS VSP2 ........................... no
    EGLFS Mali ........................... no
    EGLFS Raspberry Pi ................... no
    EGLFS X11 ............................ yes
  LinuxFB ................................ yes
  VNC .................................... yes
  VK_KHR_display ......................... no
  QNX:
    lgmon ................................ no
    IMF .................................. no
  XCB:
    Using system-provided xcb-xinput ..... no
    GL integrations:
      GLX Plugin ......................... yes
        XCB GLX .......................... yes
      EGL-X11 Plugin ..................... yes
  Windows:
    Direct 2D ............................ no
    Direct 2D 1.1 ........................ no
    DirectWrite .......................... no
    DirectWrite 3 ........................ no
Qt Widgets:
  GTK+ ................................... no
  Styles ................................. Fusion Windows
Qt Testlib:
  Tester for item models ................. yes
  Batch tests ............................ no
Qt PrintSupport:
  CUPS ................................... yes
Qt Sql Drivers:
  DB2 (IBM) .............................. no
  InterBase .............................. yes
  MySql .................................. no
  OCI (Oracle) ........................... no
  ODBC ................................... no
  PostgreSQL ............................. yes
  SQLite ................................. yes
    Using system provided SQLite ......... no
  Mimer .................................. no
 

Note: Due to CMAKE_STAGING_PREFIX usage and an unfixed CMake bug,
      to ensure correct build time rpaths, directory-level install
      rules like ninja src/gui/install will not work.
      Check QTBUG-102592 for further details.

-- 

Qt is now configured for building. Just run 'cmake --build . --parallel'

Once everything is built, you must run 'cmake --install .'
Qt will be installed into '/root/qt6crosspi'

To configure and build other Qt modules, you can use the following convenience script:
        /root/qt6rpi/bin/qt-configure-module

If reconfiguration fails for some reason, try removing 'CMakeCache.txt' from the build directory
Alternatively, you can add the --fresh flag to your CMake flags.

-- Configuring done (119.8s)
-- Generating done (2.0s)
-- Build files have been written to: /root/qt-cross

Attached is the absolute complete terminal output. Its very very long (i may have ran the find command in the root directory :()). Ive tried alot of things

Full Terminal Output.txt

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

The error about filesystem/undefined references is about there is a mismatch between toolchain and the cpp version. You should check which cpp version is used for qt version then find the correct toolchain for it.

for instance here https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi 6.4 is used, and as you did they install default toolchain.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Ok yeah I tried following that, Ill retry using gcc-9 instead of 11 then

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Your host is not ubuntu ?

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

it should be... the image name is amd64/ubuntu

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Could you please paste lsb_release -a

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024
lsb_release -a
LSB Version:	core-11.1.0ubuntu4-noarch:security-11.1.0ubuntu4-noarch
Distributor ID:	Ubuntu
Description:	Ubuntu 22.04.3 LTS
Release:	22.04
Codename:	jammy

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Ok yeah I tried following that, Ill retry using gcc-9 instead of 11 then

I tested this toolchain with 6.3(qt). But as I see you try to use 6.6. That means you do not follow exactly same. Maybe I should have told this in the video or readme about the mismatch. You should find the correct toolchain for your qt version. And probably some flags are needed to be set from cmake.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

The error about filesystem/undefined references is about there is a mismatch between toolchain and the cpp version. You should check which cpp version is used for qt version then find the correct toolchain for it.

for instance here https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi 6.4 is used, and as you did they install default toolchain.

Try exactly same here. Use 6.4.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Ok, I believe I tried using 6.3 before but i remember getting a similar error, but I think I was on the wrong docker container then. Ill try both. Thank you for helping me out I’ve been banging my head against the wall for a while. Ill let you know if 6.3 or 6.4 works.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Oh now i remember why i didnt use 6.3 I got this error

root@73630a1ab9aa:~# wget https://download.qt.io/official_releases/qt/6.3/6.3.0/submodules/qtbase-everywhere-src-6.3.0.tar.xz
--2023-12-08 23:23:37--  https://download.qt.io/official_releases/qt/6.3/6.3.0/submodules/qtbase-everywhere-src-6.3.0.tar.xz
Resolving download.qt.io (download.qt.io)... 77.86.162.2
Connecting to download.qt.io (download.qt.io)|77.86.162.2|:443... connected.
HTTP request sent, awaiting response... 404 Not Found
2023-12-08 23:23:38 ERROR 404: Not Found.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Ok, just for clarity, Im going to first try following your guide exactly, using 6.3 instead of 6.6. On a brand new amd64/ubuntu image docker container. Again I really really appreciate the time youre giving me.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Ok, I wont be able to complete this until Monday, as I dont have access to the pi that Im deploying on until then unfortunately. Will let you now how it goes.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

So I finally was able to get the files off the pi again. However I was wondering if you wanted me to build cmake from source or apt install it as its not specified in the guide. Ive done both and building it from source has gotten me further in the past.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

If the default one is working the go for it. But as you said, try both.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Sorry for the delay, I had to figure out how to resize my vm which resulted in me just deleting it and then remaking one with a bigger disk, which required me to reget all the files off the pi again. When I follow the instructions exactly (with slight modifications based off the discussions tab of the post) I get this error,

ubuntu@ubuntu:~/qtpi-build$ cmake ../qt5/ -GNinja -DCMAKE_BUILD_TYPE=Release -DINPUT_opengl=es2 -DQT_BUILD_EXAMPLES=OFF -DQT_BUILD_TESTS=OFF -DQT_HOST_PATH=$HOME/qt-host -DCMAKE_STAGING_PREFIX=$HOME/qt-raspi -DCMAKE_INSTALL_PREFIX=/usr/local/qt6 -DCMAKE_TOOLCHAIN_FILE=$HOME/toolchain.cmake -DQT_QMAKE_TARGET_MKSPEC=devices/linux-rasp-pi4-aarch64 -DQT_FEATURE_xcb=ON -DFEATURE_xcb_xlib=ON -DQT_FEATURE_xlib=ON
-- The CXX compiler identification is GNU 11.4.0
-- The C compiler identification is GNU 11.4.0
-- The ASM compiler identification is GNU
-- Found assembler: /usr/bin/aarch64-linux-gnu-gcc-11
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/aarch64-linux-gnu-g++-11 - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/aarch64-linux-gnu-gcc-11 - skipped
-- Detecting C compile features
-- Detecting C compile features - done
Checking dependencies of submodule 'qtbase'
Checking dependencies of submodule 'qtimageformats'
Checking dependencies of submodule 'qtlanguageserver'
Checking dependencies of submodule 'qtshadertools'
Checking dependencies of submodule 'qtsvg'
Checking dependencies of submodule 'qtdeclarative'
Checking dependencies of submodule 'qtmultimedia'
Checking dependencies of submodule 'qt3d'
Checking dependencies of submodule 'qt5compat'
Checking dependencies of submodule 'qtactiveqt'
Checking dependencies of submodule 'qtcharts'
Checking dependencies of submodule 'qtcoap'
Checking dependencies of submodule 'qtconnectivity'
Checking dependencies of submodule 'qtdatavis3d'
Checking dependencies of submodule 'qttools'
Checking dependencies of submodule 'qtdoc'
Checking dependencies of submodule 'qtwebsockets'
Checking dependencies of submodule 'qthttpserver'
Checking dependencies of submodule 'qtlottie'
Checking dependencies of submodule 'qtmqtt'
Checking dependencies of submodule 'qtnetworkauth'
Checking dependencies of submodule 'qtopcua'
Checking dependencies of submodule 'qtserialport'
Checking dependencies of submodule 'qtpositioning'
Checking dependencies of submodule 'qtqa'
Checking dependencies of submodule 'qtquicktimeline'
Checking dependencies of submodule 'qtquick3d'
Checking dependencies of submodule 'qtquick3dphysics'
Checking dependencies of submodule 'qtremoteobjects'
Checking dependencies of submodule 'qtscxml'
Checking dependencies of submodule 'qtsensors'
Checking dependencies of submodule 'qtserialbus'
Checking dependencies of submodule 'qtspeech'
Checking dependencies of submodule 'qttranslations'
Checking dependencies of submodule 'qtvirtualkeyboard'
Checking dependencies of submodule 'qtwayland'
Checking dependencies of submodule 'qtwebchannel'
Checking dependencies of submodule 'qtwebengine'
Checking dependencies of submodule 'qtwebview'
Configuring submodule 'qtbase'
CMake Error at qtbase/cmake/QtBaseConfigureTests.cmake:27 (message):
  Failed to build architecture extraction project.  Build output:

   Change Dir: /home/ubuntu/qtpi-build/qtbase/config.tests/arch

  

  Run Build Command(s):/usr/bin/ninja && [1/2] Building CXX object
  CMakeFiles/architecture_test.dir/arch.cpp.o

  FAILED: CMakeFiles/architecture_test.dir/arch.cpp.o

  /usr/bin/aarch64-linux-gnu-g++-11 --sysroot=/home/ubuntu/rpi-sysroot
  -I/home/ubuntu/rpi-sysroot/usr/include
  -I/home/ubuntu/rpi-sysroot/usr/include -o
  CMakeFiles/architecture_test.dir/arch.cpp.o -c
  /home/ubuntu/qt5/qtbase/config.tests/arch/arch.cpp

  In file included from /home/ubuntu/qt5/qtbase/config.tests/arch/arch.cpp:7:

  /home/ubuntu/rpi-sysroot/usr/include/stdio.h:27:10: fatal error:
  bits/libc-header-start.h: No such file or directory

     27 | #include <bits/libc-header-start.h>
        |          ^~~~~~~~~~~~~~~~~~~~~~~~~~

  compilation terminated.

  ninja: build stopped: subcommand failed.

  

Call Stack (most recent call first):
  qtbase/cmake/QtBaseConfigureTests.cmake:173 (qt_run_config_test_architecture)
  qtbase/cmake/QtBaseConfigureTests.cmake:186 (qt_run_qtbase_config_tests)
  qtbase/CMakeLists.txt:119 (include)


-- Configuring incomplete, errors occurred!
See also "/home/ubuntu/qtpi-build/CMakeFiles/CMakeOutput.log".

The only thing that is different is that this command $ sudo apt install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu downloaded gcc-11 not gcc-9 which is what they use in the tutorial. This is the same error I was encountering before when I tried this tutorial and whenever I try using this toolchain.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Do you have this file libc-header-start.h ? in your system ? Can you search it.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Yes its inside arm-linux-gnueabihf/bits

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Then defining path is a problem. include_directories(/path/to/arm-linux-gnueabihf/bits)
maybe like this ? if it is in sysroot set(CMAKE_SYSROOT /path/to/sysroot)

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024
Screenshot 2023-12-20 at 3 05 32 PM Do you mean instead of these includes i use arm-linux-gnueabihf because I dont have these files in my sys-root

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

You should update each path accordingly. If cmake can not fınd sth then it is also problem

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

well arent those for installation? I’m not entirely sure what they are doing. But if I include the directory by adding -I{TARGET_SYSROOT}/usr/include/arm-linux-gnueabihf to the Cflag I get passed that error and to this one

CMake Error at qtbase/cmake/QtBaseConfigureTests.cmake:27 (message):
  Failed to build architecture extraction project.  Build output:

   Change Dir: /home/ubuntu/qtpi-build/qtbase/config.tests/arch

  

  Run Build Command(s):/usr/bin/ninja && [1/2] Building CXX object
  CMakeFiles/architecture_test.dir/arch.cpp.o

  FAILED: CMakeFiles/architecture_test.dir/arch.cpp.o

  /usr/bin/aarch64-linux-gnu-g++-11 --sysroot=/home/ubuntu/rpi-sysroot
  -march=armv8-a -I/home/ubuntu/rpi-sysroot/usr/include
  -I/home/ubuntu/rpi-sysroot/usr/include/arm-linux-gnueabihf
  -I/home/ubuntu/rpi-sysroot/usr/include
  -I/home/ubuntu/rpi-sysroot/usr/include/arm-linux-gnueabihf -o
  CMakeFiles/architecture_test.dir/arch.cpp.o -c
  /home/ubuntu/qt5/qtbase/config.tests/arch/arch.cpp

  In file included from /home/ubuntu/rpi-sysroot/usr/include/features.h:485,

                   from /home/ubuntu/rpi-sysroot/usr/include/arm-linux-gnueabihf/bits/libc-header-start.h:33,
                   from /home/ubuntu/rpi-sysroot/usr/include/stdio.h:27,
                   from /home/ubuntu/qt5/qtbase/config.tests/arch/arch.cpp:7:

  /home/ubuntu/rpi-sysroot/usr/include/arm-linux-gnueabihf/gnu/stubs.h:7:11:
  fatal error: gnu/stubs-soft.h: No such file or directory

      7 | # include <gnu/stubs-soft.h>
        |           ^~~~~~~~~~~~~~~~~~

  compilation terminated.

  ninja: build stopped: subcommand failed.

  

Call Stack (most recent call first):
  qtbase/cmake/QtBaseConfigureTests.cmake:173 (qt_run_config_test_architecture)
  qtbase/cmake/QtBaseConfigureTests.cmake:186 (qt_run_qtbase_config_tests)
  qtbase/CMakeLists.txt:119 (include)

Which is something ive gotten before because inside that arm-linux-gnueabihf it doesnt have a stubs-soft.h it just has stub-hard.h

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024
Screenshot 2023-12-20 at 4 08 06 PM

this is the source code

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

For qt 6.5.1 they use gcc 10.3.0, binutils 2.35.2, glibc 2.31
You can compile these on your host machine for cross compilation.

mkdir gcc_all && cd gcc_all
wget https://ftpmirror.gnu.org/binutils/binutils-2.35.2.tar.bz2
wget https://ftpmirror.gnu.org/glibc/glibc-2.31.tar.bz2
wget https://ftpmirror.gnu.org/gcc/gcc-10.3.0/gcc-10.3.0.tar.gz
git clone --depth=1 https://github.com/raspberrypi/linux
tar xf binutils-2.35.2.tar.bz2
tar xf glibc-2.31.tar.bz2
tar xf gcc-10.3.0.tar.gz
rm *.tar.*
cd gcc-10.3.0
contrib/download_prerequisites
sudo mkdir -p /opt/cross-pi-gcc
sudo chown $USER /opt/cross-pi-gcc
export PATH=/opt/cross-pi-gcc/bin:$PATH

Copy kernel headers

cd ~/gcc_all
cd linux
KERNEL=kernel7
make ARCH=arm64 INSTALL_HDR_PATH=/opt/cross-pi-gcc/aarch64-linux-gnu headers_install
cd ~/gcc_all
mkdir build-binutils && cd build-binutils
../binutils-2.35.2/configure --prefix=/opt/cross-pi-gcc --target=aarch64-linux-gnu --with-arch=armv8 --disable-multilib
make -j 8
make install

Edit gcc-10.3.0/libsanitizer/asan/asan_linux.cpp. Add following piece of code.

#ifndef PATH_MAX
#define PATH_MAX 4096
#endif
cd ~/gcc_all
mkdir build-gcc && cd build-gcc
../gcc-10.3.0/configure --prefix=/opt/cross-pi-gcc --target=aarch64-linux-gnu --enable-languages=c,c++ --disable-multilib
make -j8 all-gcc
make install-gcc
cd ~/gcc_all
mkdir build-glibc && cd build-glibc
../glibc-2.31/configure --prefix=/opt/cross-pi-gcc/aarch64-linux-gnu --build=$MACHTYPE --host=aarch64-linux-gnu --target=aarch64-linux-gnu --with-headers=/opt/cross-pi-gcc/aarch64-linux-gnu/include --disable-multilib libc_cv_forced_unwind=yes
make install-bootstrap-headers=yes install-headers
make -j8 csu/subdir_lib
install csu/crt1.o csu/crti.o csu/crtn.o /opt/cross-pi-gcc/aarch64-linux-gnu/lib
aarch64-linux-gnu-gcc -nostdlib -nostartfiles -shared -x c /dev/null -o /opt/cross-pi-gcc/aarch64-linux-gnu/lib/libc.so
touch /opt/cross-pi-gcc/aarch64-linux-gnu/include/gnu/stubs.h

Compile

cd ~/gcc_all/build-gcc
make -j8 all-target-libgcc
make install-target-libgcc
cd ~/gcc_all/build-glibc
make -j8
make install
cd ~/gcc_all/build-gcc
make -j8
make install

I will try this myself when I find time.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

And also there is pre compiled toolchains here https://github.com/abhiTronix/raspberry-pi-cross-compilers you can give it a try, first try from here

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

I assume Id have to change my toolchain.cmake file as well for this right?

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

You should update CMAKE_C_COMPILER and CMAKE_CXX_COMPILER I think. I compiled gcc, and I am able to compile qt 6.6.1 for rasp 4. (I tried only base). I will share soon only commands. I am going to close this thread ?

In the steps that I shared there is a mistake, kernel should be 8 not 7. I took reference this page https://docs.slackware.com/howtos:hardware:arm:gcc-10.x_aarch64_cross-compiler

I recommend you to check also.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Sounds good, we actually ended up using buildroot as a workaround and got it compiling that way this past week.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

With buildroot ? You created the image which has qt already ?

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

we just added the libraries we needed for the application and then compiled the binaries using the image.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Do you have steps ? or any link for refenrece ?

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Another team member was investigating build root so once he documents his steps I will link that here, I do not know the specific steps as I was focused on trying to cross compile.

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Thanks, it will be good for people who searchs about the topic. Then I will keep this thread open until you share it :)

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

Yes It would also be awesome to be able to know how to cross compile as the build root is definitely specific to our embedded use case as well.

from qtonraspberrypi.

Peyton-McKee avatar Peyton-McKee commented on May 18, 2024

I assume an updated guide for cross compilation will be made for the readme?

from qtonraspberrypi.

PhysicsX avatar PhysicsX commented on May 18, 2024

Hi, I created a page which shows the details for compilation(6.6.1) with docker. I tested it is working. Link I can update the page later, the video will be available soon. I close this thread.
This page will be moved to main page when video is ready.

If you share buildroot notes, it will be great for others.

from qtonraspberrypi.

Related Issues (13)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.