Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Qt for MCUs
  4. Cannot compile qt6 for Raspberry Pi 3

Cannot compile qt6 for Raspberry Pi 3

Scheduled Pinned Locked Moved Unsolved Qt for MCUs
3 Posts 3 Posters 225 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.
  • B Offline
    B Offline
    britesc
    wrote on 24 Jan 2025, 12:26 last edited by
    #1

    Hi,

    I am using the guide at:
    [link text]
    https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
    (link url)
    I have set up a Virtualbox of Ubuntu 24.04 and have followed the instructions to the letter, as all was going well without any errors. When I get to:
    Building Qt 6 for Host Machine
    -> cmake --build . --parallel 8
    it all falls apart, with the following errors (last few)

    /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 158 is invalid
    /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 159 is invalid
    /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 160 is invalid
    [1828/10443] Building CXX object qtd...Qml.dir/compiler/qqmlirbuilder.cpp.o
    ninja: build stopped: subcommand failed.
    
    

    I have tried to use 6.4.0 as in the guide, but that failed. So I tried 6.5.2 and that fails at the same spot.
    I have tried 6 or so times with clean VMS but always when I reach that part it croaks.

    My only thought is that perhaps the Raspberry Pi 3 OS (Bullseye) Full (Legacy 64 Bit) is causing the problems.
    I have a number of Raspberry Pi 3s I want to use on projects rather than gathering dust.

    So, do I need a higher spec Raspberry Pi?
    A different Raspberry Pi Version?

    Anyone with any advice gratefully received.
    I'll even name the project after you if I can get it setup and compiled!!!

    Thanks and kind regards,

    jB

    Silver Haired Newbie to PySide6

    J J 2 Replies Last reply 24 Jan 2025, 12:39
    0
    • B britesc
      24 Jan 2025, 12:26

      Hi,

      I am using the guide at:
      [link text]
      https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
      (link url)
      I have set up a Virtualbox of Ubuntu 24.04 and have followed the instructions to the letter, as all was going well without any errors. When I get to:
      Building Qt 6 for Host Machine
      -> cmake --build . --parallel 8
      it all falls apart, with the following errors (last few)

      /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 158 is invalid
      /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 159 is invalid
      /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 160 is invalid
      [1828/10443] Building CXX object qtd...Qml.dir/compiler/qqmlirbuilder.cpp.o
      ninja: build stopped: subcommand failed.
      
      

      I have tried to use 6.4.0 as in the guide, but that failed. So I tried 6.5.2 and that fails at the same spot.
      I have tried 6 or so times with clean VMS but always when I reach that part it croaks.

      My only thought is that perhaps the Raspberry Pi 3 OS (Bullseye) Full (Legacy 64 Bit) is causing the problems.
      I have a number of Raspberry Pi 3s I want to use on projects rather than gathering dust.

      So, do I need a higher spec Raspberry Pi?
      A different Raspberry Pi Version?

      Anyone with any advice gratefully received.
      I'll even name the project after you if I can get it setup and compiled!!!

      Thanks and kind regards,

      jB

      J Offline
      J Offline
      jsulm
      Lifetime Qt Champion
      wrote on 24 Jan 2025, 12:39 last edited by
      #2

      @britesc said in Cannot compile qt6 for Raspberry Pi 3:

      with the following errors (last few)

      You should look for the very first error

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

      1 Reply Last reply
      0
      • B britesc
        24 Jan 2025, 12:26

        Hi,

        I am using the guide at:
        [link text]
        https://wiki.qt.io/Cross-Compile_Qt_6_for_Raspberry_Pi
        (link url)
        I have set up a Virtualbox of Ubuntu 24.04 and have followed the instructions to the letter, as all was going well without any errors. When I get to:
        Building Qt 6 for Host Machine
        -> cmake --build . --parallel 8
        it all falls apart, with the following errors (last few)

        /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 158 is invalid
        /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 159 is invalid
        /home/install/qt5/qtbase/src/gui/platform/unix/qxkbcommon.cpp:392:5: error: template argument 160 is invalid
        [1828/10443] Building CXX object qtd...Qml.dir/compiler/qqmlirbuilder.cpp.o
        ninja: build stopped: subcommand failed.
        
        

        I have tried to use 6.4.0 as in the guide, but that failed. So I tried 6.5.2 and that fails at the same spot.
        I have tried 6 or so times with clean VMS but always when I reach that part it croaks.

        My only thought is that perhaps the Raspberry Pi 3 OS (Bullseye) Full (Legacy 64 Bit) is causing the problems.
        I have a number of Raspberry Pi 3s I want to use on projects rather than gathering dust.

        So, do I need a higher spec Raspberry Pi?
        A different Raspberry Pi Version?

        Anyone with any advice gratefully received.
        I'll even name the project after you if I can get it setup and compiled!!!

        Thanks and kind regards,

        jB

        J Offline
        J Offline
        JonB
        wrote on 24 Jan 2025, 12:40 last edited by JonB
        #3

        @britesc
        I know nothing about this :) But did some Googling which may help?

        First I will say I was "surprised" that your work and the instructions seems to fetch/use "Qt5" stuff when you want to build Qt6, but I guess that's right, for whatever reason!

        For your error message I came across https://github.com/microsoft/vcpkg/issues/32135#issuecomment-1603081312

        I was able to resolve this issue by installing the additional required packages for qt5base (although I am targeting q6) and X11

        required by qt5-base for qt5-x11extras

        APT_PACKAGES="$APT_PACKAGES libxkbcommon-dev libxcb-keysyms1-dev \

        libxcb-image0-dev libxcb-shm0-dev libxcb-icccm4-dev libxcb-sync-dev \

        libxcb-xfixes0-dev libxcb-shape0-dev libxcb-randr0-dev \

        libxcb-render-util0-dev libxcb-xinerama0-dev libxcb-xkb-dev libxcb-xinput-dev"

        Does this list of dependencies have any relevance for your situation?

        That's all I know!

        P.S.
        I see @jsulm has just posted. You should listen to him more than to me!

        1 Reply Last reply
        0

        3/3

        24 Jan 2025, 12:40

        • Login

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