Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Installation and Deployment
  4. Cross-compiling Qt Embedded for Raspberry (Pi 4 model B)
Forum Updated to NodeBB v4.3 + New Features

Cross-compiling Qt Embedded for Raspberry (Pi 4 model B)

Scheduled Pinned Locked Moved Solved Installation and Deployment
7 Posts 3 Posters 1.8k Views 1 Watching
  • 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.
  • G Offline
    G Offline
    Gio26
    wrote on last edited by
    #1

    hello,
    I'm trying to compile "Qt Embedded for Raspberry" on Windows 10.
    I follow this guide: https://visualgdb.com/tutorials/raspberry/qt/embedded/ I have not found anything more recent.
    Windows Tools compilation fails.
    Thanks for your help.

    $ ../configure -platform win32-g++ -release -opengl es2 -device linux-rasp-pi2-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5

    • cd qtbase
    • /D/Download/Qt/qt-everywhere-src-5.14.1/qtbase/configure -top-level -platform win32-g++ -release -opengl es2 -device linux-rasp-pi2-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5
      Preparing build tree...
      Creating qmake...
      ................................................................................................Done.
      Info: creating super cache file D:\Download\Qt\qt-everywhere-src-5.14.1\qt-build.qmake.super
      Info: creating cache file D:\Download\Qt\qt-everywhere-src-5.14.1\qt-build.qmake.cache
      Info: creating stash file D:\Download\Qt\qt-everywhere-src-5.14.1\qt-build.qmake.stash
      Project ERROR: Cannot run target compiler 'g++'. Output:
      ===================
      g++: error: unrecognized argument in option '-mabi=aapcs-linux'
      g++: note: valid arguments to '-mabi=' are: ms sysv
      Using built-in specs.
      COLLECT_GCC=g++
      g++: error: unrecognized command line option '-marm'; did you mean '-mabm'?
      g++: error: unrecognized command line option '-mthumb-interwork'
      g++: error: unrecognized command line option '-mfpu=neon-vfpv4'
      g++: error: unrecognized command line option '-mfloat-abi=hard'
      Target: i686-w64-mingw32
      Configured with: ../gcc-9.1.0/configure --prefix=/mingw32 --with-local-prefix=/mingw32/local --build=i686-w64-mingw32 --host=i686-w64-mingw32 --target=i686-w64-mingw32 --with-native-system-header-dir=/mingw32/i686-w64-mingw32/include --libexecdir=/mingw32/lib --enable-bootstrap --with-arch=i686 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++ --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --enable-plugin --with-libiconv --with-system-zlib --with-gmp=/mingw32 --with-mpfr=/mingw32 --with-mpc=/mingw32 --with-isl=/mingw32 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld --disable-sjlj-exceptions --with-dwarf2
      Thread model: posix
      gcc version 9.1.0 (Rev3, Built by MSYS2 project)
      ===================
      Maybe you forgot to setup the environment?
    1 Reply Last reply
    0
    • G Gio26

      In the end after a tough battle I got the compilation !!!
      However, I find two directories and not one as I imagined: I have the one indicated by me "qt5" and another "Qt-5.14.1".
      Which one should I upload on the raspberry?
      Thanks

      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #5

      @Gio26 The one containing Qt libs

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

      1 Reply Last reply
      0
      • sierdzioS Offline
        sierdzioS Offline
        sierdzio
        Moderators
        wrote on last edited by
        #2

        That guide is grossly outdated, do not use it! Or at least modify it to get a chance of success. But really, it has fixes for issues which have long ago been fixed in Qt itself (so there is no need to do them).

        -device linux-rasp-pi2-g++

        You are not compiling for RPi2. Pick a device with "pi4" in it's name (there are 2 to choose from, depending on chosen GPU driver).

        gcc version 9.1.0 (Rev3, Built by MSYS2 project)

        Is this a cross-compiler? From the output it looks like this is x86_64 compiler, not good for cross-compiling to ARM.

        (Z(:^

        1 Reply Last reply
        1
        • G Offline
          G Offline
          Gio26
          wrote on last edited by
          #3

          @sierdzio said in Cross-compiling Qt Embedded for Raspberry (Pi 4 model B):

          That guide is grossly outdated, do not use it! Or at least modify it to get a chance of success. But really, it has fixes for issues which have long ago been fixed in Qt itself (so there is no need to do them).

          Thanks for your answer.
          I found this new guide: https://forum.qt.io/topic/68381/cross-compile-qt-windows-to-raspberry-3/2. I have reviewed and updated the software but still have compilation errors.
          $ ../configure -platform win32-g++ -release -opengl es2 -device linux-rasp-pi3-vc4-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -opensource -confirm-license

          • cd qtbase
          • /D/Download/Qt/qt-everywhere-src-5.14.1/qtbase/configure -top-level -platform win32-g++ -release -opengl es2 -device linux-rasp-pi3-vc4-g++ -sysroot C:/SysGCC/Raspberry/arm-linux-gnueabihf/sysroot -prefix /usr/local/qt5 -opensource -confirm-license
            Preparing build tree...
            Creating qmake...
            ................................................................................................Done.
            Info: creating super cache file D:\Download\Qt\qt-everywhere-src-5.14.1\qt-build.qmake.super
            Info: creating cache file D:\Download\Qt\qt-everywhere-src-5.14.1\qt-build.qmake.cache
            Info: creating stash file D:\Download\Qt\qt-everywhere-src-5.14.1\qt-build.qmake.stash
            Project ERROR: Cannot run target compiler 'g++'. Output:
            ===================
            Using built-in specs.
            COLLECT_GCC=g++
            g++: error: unrecognized command line option '-mfpu=crypto-neon-fp-armv8'
            g++: error: unrecognized command line option '-mfloat-abi=hard'
            Target: x86_64-w64-mingw32
            Configured with: ../gcc-9.1.0/configure --prefix=/mingw64 --with-local-prefix=/mingw64/local --build=x86_64-w64-mingw32 --host=x86_64-w64-mingw32 --target=x86_64-w64-mingw32 --with-native-system-header-dir=/mingw64/x86_64-w64-mingw32/include --libexecdir=/mingw64/lib --enable-bootstrap --with-arch=x86-64 --with-tune=generic --enable-languages=c,lto,c++,fortran,ada,objc,obj-c++ --enable-shared --enable-static --enable-libatomic --enable-threads=posix --enable-graphite --enable-fully-dynamic-string --enable-libstdcxx-filesystem-ts=yes --enable-libstdcxx-time=yes --disable-libstdcxx-pch --disable-libstdcxx-debug --disable-isl-version-check --enable-lto --enable-libgomp --disable-multilib --enable-checking=release --disable-rpath --disable-win32-registry --disable-nls --disable-werror --disable-symvers --enable-plugin --with-libiconv --with-system-zlib --with-gmp=/mingw64 --with-mpfr=/mingw64 --with-mpc=/mingw64 --with-isl=/mingw64 --with-pkgversion='Rev3, Built by MSYS2 project' --with-bugurl=https://sourceforge.net/projects/msys2 --with-gnu-as --with-gnu-ld
            Thread model: posix
            gcc version 9.1.0 (Rev3, Built by MSYS2 project)
            ===================
            Maybe you forgot to setup the environment?
          1 Reply Last reply
          0
          • G Offline
            G Offline
            Gio26
            wrote on last edited by
            #4

            In the end after a tough battle I got the compilation !!!
            However, I find two directories and not one as I imagined: I have the one indicated by me "qt5" and another "Qt-5.14.1".
            Which one should I upload on the raspberry?
            Thanks

            jsulmJ 1 Reply Last reply
            0
            • G Gio26

              In the end after a tough battle I got the compilation !!!
              However, I find two directories and not one as I imagined: I have the one indicated by me "qt5" and another "Qt-5.14.1".
              Which one should I upload on the raspberry?
              Thanks

              jsulmJ Offline
              jsulmJ Offline
              jsulm
              Lifetime Qt Champion
              wrote on last edited by
              #5

              @Gio26 The one containing Qt libs

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

              1 Reply Last reply
              0
              • G Offline
                G Offline
                Gio26
                wrote on last edited by
                #6

                @jsulm
                Thanks!!!

                1 Reply Last reply
                0
                • G Offline
                  G Offline
                  Gio26
                  wrote on last edited by
                  #7

                  Again me!!! :)
                  I'm trying some examples and some is fine like "hellogl2" many others no!!!!
                  The error: "qt.qpa.egldeviceintegration: Failed to load EGL device integration" eglfs_kms ".
                  I can't compile kms because drm failed, it doesn't find "drm.h" which is however present in "sysroot/usr/include/drm".
                  Could this be the problem or I need to see anything else?
                  Thanks a lot for your help.

                  1 Reply Last reply
                  0

                  • Login

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