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. Building Qt5 for cross-compilling to Raspberry Pi error
Forum Updated to NodeBB v4.3 + New Features

Building Qt5 for cross-compilling to Raspberry Pi error

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
12 Posts 4 Posters 2.8k Views 2 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.
  • sierdzioS Offline
    sierdzioS Offline
    sierdzio
    Moderators
    wrote on last edited by
    #2

    Configure prints a summary after it finishes. If it didn't in your case, something went wrong.

    I recommend following this guide https://wiki.qt.io/RaspberryPi2EGLFS it definitely works.

    (Z(:^

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

      You can also run configure in verbose mode to see exactly what goes wrong.

      (Z(:^

      V 1 Reply Last reply
      0
      • sierdzioS sierdzio

        You can also run configure in verbose mode to see exactly what goes wrong.

        V Offline
        V Offline
        Vertebro
        wrote on last edited by
        #4

        @sierdzio Thanks, I will try that tutorial !
        I made the configure with verbose option, and after creating qmake, it adds that "make : nothing to do for 'first'", so it seems that something is going wrong but I can't see what.

        sierdzioS 1 Reply Last reply
        0
        • V Vertebro

          @sierdzio Thanks, I will try that tutorial !
          I made the configure with verbose option, and after creating qmake, it adds that "make : nothing to do for 'first'", so it seems that something is going wrong but I can't see what.

          sierdzioS Offline
          sierdzioS Offline
          sierdzio
          Moderators
          wrote on last edited by
          #5

          @Vertebro said in Building Qt5 for cross-compilling to Raspberry Pi error:

          @sierdzio Thanks, I will try that tutorial !
          I made the configure with verbose option, and after creating qmake, it adds that "make : nothing to do for 'first'", so it seems that something is going wrong but I can't see what.

          Until you post more info here (like the output you're getting), we can't see what's wrong, too.

          (Z(:^

          V 1 Reply Last reply
          0
          • sierdzioS sierdzio

            @Vertebro said in Building Qt5 for cross-compilling to Raspberry Pi error:

            @sierdzio Thanks, I will try that tutorial !
            I made the configure with verbose option, and after creating qmake, it adds that "make : nothing to do for 'first'", so it seems that something is going wrong but I can't see what.

            Until you post more info here (like the output you're getting), we can't see what's wrong, too.

            V Offline
            V Offline
            Vertebro
            wrote on last edited by
            #6

            @sierdzio Okay sorry, here is the output :

            nathan@BTSSNIR-8:~/opt/qt5/qtbase$ sudo ./configure -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=~/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi -v
            <srcbase> = /home/nathan/opt/qt5/qtbase 
            <bldbase> = /home/nathan/opt/qt5/qtbase 
            <outbase> = /home/nathan/opt/qt5/qtbase 
            Creating qmake...
            make: rien à faire pour « first ».
            Command line: -opengl es2 -device linux-rasp-pi-g++ -device-option CROSS_COMPILE=/home/nathan/opt/gcc-4.7-linaro-rpi-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /mnt/rasp-pi-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -hostprefix /usr/local/qt5pi -v
            
            This is the Qt Open Source Edition.
            
            You have already accepted the terms of the Open Source license.
            
            Running configuration tests...
            Done running configuration tests.
            
            Configure summary:
            
            Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
            Building for: devices/linux-rasp-pi-g++ (arm, CPU features: <none>)
            Configuration: cross_compile compile_examples enable_new_dtags largefile precompile_header shared rpath release c++11 concurrent dbus reduce_exports release_tools stl
            Build options:
              Mode ................................... release; optimized tools
              Optimize release build for size ........ no
              Building shared libraries .............. yes
              Using C++ standard ..................... C++11
              Using ccache ........................... no
              Using gold linker ...................... no
              Using new DTAGS ........................ yes
              Using precompiled headers .............. yes
              Using LTCG ............................. no
              Target compiler supports:
                NEON ................................. no
              Build parts ............................ libs
            Qt modules and options:
              Qt Concurrent .......................... yes
              Qt D-Bus ............................... yes
              Qt D-Bus directly linked to libdbus .... no
              Qt Gui ................................. yes
              Qt Network ............................. yes
              Qt Sql ................................. yes
              Qt Testlib ............................. yes
              Qt Widgets ............................. yes
              Qt Xml ................................. yes
            Support enabled for:
              Using pkg-config ....................... yes
              udev ................................... no
              Using system zlib ...................... yes
            Qt Core:
              DoubleConversion ....................... yes
                Using system DoubleConversion ........ no
              GLib ................................... no
              iconv .................................. yes
              ICU .................................... no
              Tracing backend ........................ <none>
              Logging backends:
                journald ............................. no
                syslog ............................... no
                slog2 ................................ no
              Using system PCRE2 ..................... no
            Qt Network:
              getifaddrs() ........................... yes
              IPv6 ifname ............................ yes
              libproxy ............................... no
              Linux AF_NETLINK ....................... yes
              OpenSSL ................................ no
                Qt directly linked to OpenSSL ........ no
              OpenSSL 1.1 ............................ no
              SCTP ................................... no
              Use system proxies ..................... yes
            Qt Gui:
              Accessibility .......................... yes
              FreeType ............................... yes
                Using system FreeType ................ yes
              HarfBuzz ............................... yes
                Using system HarfBuzz ................ no
              Fontconfig ............................. no
              Image formats:
                GIF .................................. yes
                ICO .................................. yes
                JPEG ................................. yes
                  Using system libjpeg ............... no
                PNG .................................. yes
                  Using system libpng ................ yes
              EGL .................................... no
              OpenVG ................................. no
              OpenGL:
                Desktop OpenGL ....................... no
                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
              INTEGRITY HID .......................... no
              mtdev .................................. no
              tslib .................................. no
              xkbcommon-evdev ........................ no
            QPA backends:
              DirectFB ............................... no
              EGLFS .................................. no
              LinuxFB ................................ yes
              VNC .................................... yes
              Mir client ............................. no
            Qt Widgets:
              GTK+ ................................... no
              Styles ................................. Fusion Windows
            Qt PrintSupport:
              CUPS ................................... no
            Qt Sql:
              DB2 (IBM) .............................. no
              InterBase .............................. no
              MySql .................................. no
              OCI (Oracle) ........................... no
              ODBC ................................... no
              PostgreSQL ............................. no
              SQLite2 ................................ no
              SQLite ................................. yes
                Using system provided SQLite ......... no
              TDS (Sybase) ........................... no
            
            Note: Also available for Linux: linux-clang linux-icc
            
            Note: -optimized-tools is not useful in -release mode.
            
            ERROR: Feature 'opengles2' was enabled, but the pre-condition 'config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)' failed.
            
            ERROR: The OpenGL functionality tests failed!
            You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
            QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.
            

            Here you go, but I extracted the most important info in my last post I think, but if you want the output here it is

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

              Ok, I see 3 issues here:

              • you run configure via sudo... that's not good. Not necessarily an error, but there is certainly no need for root permissions when compiling Qt
              • you're running configure from qtbase dir instead of the main configure from Qt (from root Qt dir). But maybe that's specific to the way this tutorial works
              • your OpenGL tests are failing! This means that configure has not actually finished, so no wonder that Makefile is missing or empty! You need to fix the OpenGL issue first and then try to run clean and configure again

              (Z(:^

              1 Reply Last reply
              1
              • V Offline
                V Offline
                Vertebro
                wrote on last edited by
                #8

                I finally managed to complete the process by using your tutorial.
                I added to qt creator and done everything, it compiles fine, but it won't run :

                pi@raspi_15:~ $ ./RPItest
                -bash: ./RPItest: cannot execute binary file: Exec format error
                

                What append ?

                1 Reply Last reply
                1
                • V Offline
                  V Offline
                  Vertebro
                  wrote on last edited by
                  #9

                  Okay everything done ! I messed up a bit. Cross compilation is working;

                  Now my only problem is to get libmysqlcppconn to work on raspberry pi 3.

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

                    Nice, congrats!

                    Unfortunately I've never used Qt & MySQL together on a RPi so I (probably) can't help with that.

                    (Z(:^

                    1 Reply Last reply
                    0
                    • V Offline
                      V Offline
                      Vertebro
                      wrote on last edited by
                      #11

                      Thanks ! DOn't worry now that cross compilation works everything will go smooth, I'll probably use python for sql if I don't succeed with c++ and sql

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on last edited by
                        #12

                        Hi,

                        You'll likely have to use the MariaDB package to be able to build the plugin for RPi.

                        Hope it helps

                        Interested in AI ? www.idiap.ch
                        Please read the Qt Code of Conduct - https://forum.qt.io/topic/113070/qt-code-of-conduct

                        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