Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. (Cross-)Compiler Qt6.8 for Ubuntu and Raspberry Pi
Forum Update on Monday, May 27th 2025

(Cross-)Compiler Qt6.8 for Ubuntu and Raspberry Pi

Scheduled Pinned Locked Moved Solved General and Desktop
3 Posts 2 Posters 710 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MHermann
    wrote on 25 Jul 2024, 09:42 last edited by
    #1

    Hello all,

    I try to cross-compile Qt6.8 on my host machine Ubuntu 20.04 64-bit for Raspberry Pi 4B Bookworm 32-bit.
    First I tried to compile Qt6.8 for the host machine itself.
    I think I need another compiler for host-build and maybe also for raspi-build.
    Can someone help me?

    After hours of compilation I got following errors:

    ..
    -- Build files have been written to: /home/user/qt-hostbuild/qtwebengine/src/gn
    [10860/12932] Performing build step for 'gn'
    [0/1] Generating gn
    ninja: Entering directory `/home/user/qt-hostbuild/qtwebengine/src/gn/Release'
    [1/200] CXX src/base/command_line.o
    FAILED: src/base/command_line.o 
    /usr/bin/c++ -MMD -MF src/base/command_line.o.d -I../../../../../qt5/qtwebengine/src/3rdparty/gn/src -I. -DNO_LAST_COMMIT_POSITION -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -Wno-redundant-move -Wno-restrict -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -std=gnu++20 -c ../../../../../qt5/qtwebengine/src/3rdparty/gn/src/base/command_line.cc -o src/base/command_line.o
    c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    [2/200] CXX src/base/environment.o
    FAILED: src/base/environment.o 
    /usr/bin/c++ -MMD -MF src/base/environment.o.d -I../../../../../qt5/qtwebengine/src/3rdparty/gn/src -I. -DNO_LAST_COMMIT_POSITION -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -Wno-redundant-move -Wno-restrict -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -std=gnu++20 -c ../../../../../qt5/qtwebengine/src/3rdparty/gn/src/base/environment.cc -o src/base/environment.o
    c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    [3/200] CXX src/base/files/file.o
    FAILED: src/base/files/file.o 
    /usr/bin/c++ -MMD -MF src/base/files/file.o.d -I../../../../../qt5/qtwebengine/src/3rdparty/gn/src -I. -DNO_LAST_COMMIT_POSITION -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -Wno-redundant-move -Wno-restrict -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -std=gnu++20 -c ../../../../../qt5/qtwebengine/src/3rdparty/gn/src/base/files/file.cc -o src/base/files/file.o
    c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    [4/200] CXX src/base/files/file_enumerator.o
    FAILED: src/base/files/file_enumerator.o 
    /usr/bin/c++ -MMD -MF src/base/files/file_enumerator.o.d -I../../../../../qt5/qtwebengine/src/3rdparty/gn/src -I. -DNO_LAST_COMMIT_POSITION -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -Wno-redundant-move -Wno-restrict -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -std=gnu++20 -c ../../../../../qt5/qtwebengine/src/3rdparty/gn/src/base/files/file_enumerator.cc -o src/base/files/file_enumerator.o
    c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    [5/200] CXX src/base/files/file_path_constants.o
    FAILED: src/base/files/file_path_constants.o 
    /usr/bin/c++ -MMD -MF src/base/files/file_path_constants.o.d -I../../../../../qt5/qtwebengine/src/3rdparty/gn/src -I. -DNO_LAST_COMMIT_POSITION -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -Wno-redundant-move -Wno-restrict -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -std=gnu++20 -c ../../../../../qt5/qtwebengine/src/3rdparty/gn/src/base/files/file_path_constants.cc -o src/base/files/file_path_constants.o
    c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    [6/200] CXX src/base/files/file_path.o
    FAILED: src/base/files/file_path.o 
    /usr/bin/c++ -MMD -MF src/base/files/file_path.o.d -I../../../../../qt5/qtwebengine/src/3rdparty/gn/src -I. -DNO_LAST_COMMIT_POSITION -DNDEBUG -O3 -fdata-sections -ffunction-sections -Werror -D_FILE_OFFSET_BITS=64 -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -pthread -pipe -fno-exceptions -fno-rtti -fdiagnostics-color -Wall -Wextra -Wno-unused-parameter -Wextra-semi -Wundef -Wno-redundant-move -Wno-restrict -Wno-deprecated-copy -Wno-implicit-fallthrough -Wno-redundant-move -Wno-unused-variable -Wno-format -Wno-strict-aliasing -Wno-cast-function-type -std=gnu++20 -c ../../../../../qt5/qtwebengine/src/3rdparty/gn/src/base/files/file_path.cc -o src/base/files/file_path.o
    c++: error: unrecognized command line option ‘-std=gnu++20’; did you mean ‘-std=gnu++2a’?
    ninja: build stopped: subcommand failed.
    FAILED: gn /home/user/qt-hostbuild/qtwebengine/src/gn/gn 
    cd /home/user/qt-hostbuild/qtwebengine/src/gn && /usr/bin/python3.8 /home/user/qt5/qtwebengine/src/3rdparty/gn/build/gen.py --no-last-commit-position --out-path /home/user/qt-hostbuild/qtwebengine/src/gn/Release --cc /usr/bin/cc --cxx /usr/bin/c++ --ld /usr/bin/c++ --platform linux --ar /usr/bin/ar --qt-version 6.8.0.qtwebengine.qt.io && /usr/bin/ninja -C /home/user/qt-hostbuild/qtwebengine/src/gn/Release gn
    ninja: build stopped: subcommand failed.
    [10865/12932] Running syncqt.cpp for module: QtProtobuf
    FAILED: qtwebengine/src/gn/src/gn-stamp/gn-build /home/user/qt-hostbuild/qtwebengine/src/gn/src/gn-stamp/gn-build 
    cd /home/user/qt-hostbuild/qtwebengine/src/gn && /usr/local/bin/cmake --build . && /usr/local/bin/cmake -E touch /home/user/qt-hostbuild/qtwebengine/src/gn/src/gn-stamp/gn-build
    [10873/12932] Building CXX object qtwebchannel/src/webchannel/CMakeFiles/WebChannel.dir/cmake_pch.hxx.gch
    ninja: build stopped: subcommand failed.
    
    1 Reply Last reply
    0
    • J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 25 Jul 2024, 10:58 last edited by
      #2

      You need a compiler which is supported by Qt 6.8.
      You can see what versions are required here https://doc.qt.io/qt-6/supported-platforms.html
      For cross compilation you need a cross-compiler and sysroot. https://doc.qt.io/qt-6/qt-edu-raspberry-pi.html

      https://forum.qt.io/topic/113070/qt-code-of-conduct

      1 Reply Last reply
      2
      • M Offline
        M Offline
        MHermann
        wrote on 26 Jul 2024, 06:25 last edited by
        #3

        Thank you.
        I installed gcc-11 and g++-11 and it worked.

        1 Reply Last reply
        0
        • M MHermann has marked this topic as solved on 26 Jul 2024, 06:25

        1/3

        25 Jul 2024, 09:42

        • Login

        • Login or register to search.
        1 out of 3
        • First post
          1/3
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups
        • Search
        • Get Qt Extensions
        • Unsolved