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. raspberry pi cross compiling
Forum Updated to NodeBB v4.3 + New Features

raspberry pi cross compiling

Scheduled Pinned Locked Moved Unsolved Installation and Deployment
5 Posts 3 Posters 1.2k 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.
  • N Offline
    N Offline
    NR5P
    wrote on last edited by
    #1

    I think learning c++ is easier than trying to get setup for cross compiling on the raspberry pi.

    I have a raspberry pi 3 with raspbian. My development computer is kubuntu 18.04.

    I'm following instructions here https://wiki.qt.io/RaspberryPi2EGLFS.

    First off step 10. states If your system is 64 bit you may also edit device option to:

    -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro- arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
    

    I was not even aware there was a 64 bit option for raspbian? It's not talking about my local system is it?


    As for the issues I'm running into, (unless I'm supposed to use the device-option above), I'm getting to the point of this, I'm putting 5.12 for my qt version

    git clone git://code.qt.io/qt/qtbase.git -b <qt-version>
    cd qtbase
    ./configure -release -opengl es2 -device <rpi-version> -device-option      CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-  gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot   -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix   ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
    
    make
    make install
    

    However when I do ./configure here is the error I'm getting along with build options read out before it hits the error.

    Build options:
      Mode ................................... release
      Optimize release build for size ........ no
      Building shared libraries .............. yes
      Using C standard ....................... C11
      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 ................................. yes
      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 ....................... no
      udev ................................... no
      Using system zlib ...................... no
    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
      DTLS ................................... no
      SCTP ................................... no
      Use system proxies ..................... yes
    Qt Gui:
      Accessibility .......................... yes
      FreeType ............................... yes
        Using system FreeType ................ no
      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 ................ no
      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 .............................. no
      X11 specific:
        XLib ................................. no
        XCB Xlib ............................. no
        EGL on X11 ........................... no
    QPA backends:
      DirectFB ............................... no
       EGLFS .................................. no
      LinuxFB ................................ yes
      VNC .................................... yes
      Mir client ............................. no
    Qt Sql:
      SQL item models ........................ yes
    Qt Widgets:
      GTK+ ................................... no
      Styles ................................. Fusion Windows
    Qt PrintSupport:
     CUPS ................................... no
    Qt Sql Drivers:
      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
    Qt Testlib:
      Tester for item models ................. yes
    
    Note: Also available for Linux: linux-clang linux-icc
    
    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.
    
    jsulmJ 1 Reply Last reply
    0
    • N NR5P

      I think learning c++ is easier than trying to get setup for cross compiling on the raspberry pi.

      I have a raspberry pi 3 with raspbian. My development computer is kubuntu 18.04.

      I'm following instructions here https://wiki.qt.io/RaspberryPi2EGLFS.

      First off step 10. states If your system is 64 bit you may also edit device option to:

      -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro- arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf-
      

      I was not even aware there was a 64 bit option for raspbian? It's not talking about my local system is it?


      As for the issues I'm running into, (unless I'm supposed to use the device-option above), I'm getting to the point of this, I'm putting 5.12 for my qt version

      git clone git://code.qt.io/qt/qtbase.git -b <qt-version>
      cd qtbase
      ./configure -release -opengl es2 -device <rpi-version> -device-option      CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-  gnueabihf-raspbian/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot   -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix   ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -v
      
      make
      make install
      

      However when I do ./configure here is the error I'm getting along with build options read out before it hits the error.

      Build options:
        Mode ................................... release
        Optimize release build for size ........ no
        Building shared libraries .............. yes
        Using C standard ....................... C11
        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 ................................. yes
        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 ....................... no
        udev ................................... no
        Using system zlib ...................... no
      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
        DTLS ................................... no
        SCTP ................................... no
        Use system proxies ..................... yes
      Qt Gui:
        Accessibility .......................... yes
        FreeType ............................... yes
          Using system FreeType ................ no
        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 ................ no
        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 .............................. no
        X11 specific:
          XLib ................................. no
          XCB Xlib ............................. no
          EGL on X11 ........................... no
      QPA backends:
        DirectFB ............................... no
         EGLFS .................................. no
        LinuxFB ................................ yes
        VNC .................................... yes
        Mir client ............................. no
      Qt Sql:
        SQL item models ........................ yes
      Qt Widgets:
        GTK+ ................................... no
        Styles ................................. Fusion Windows
      Qt PrintSupport:
       CUPS ................................... no
      Qt Sql Drivers:
        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
      Qt Testlib:
        Tester for item models ................. yes
      
      Note: Also available for Linux: linux-clang linux-icc
      
      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.
      
      jsulmJ Offline
      jsulmJ Offline
      jsulm
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @NR5P said in raspberry pi cross compiling:

      I think learning c++ is easier than trying to get setup for cross compiling on the raspberry pi

      I disagree. Why do you want to use Raspberry Pi and cross compiling just to learn C++? Cross compiling is a complex area and makes it harder to even get a working development environment. It is way easier to either write code for your PC or do it on Raspberry Pi.

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

      1 Reply Last reply
      1
      • N Offline
        N Offline
        NR5P
        wrote on last edited by
        #3

        Sorry meant to say learning c++ seemed easier. I'm building an automation program with QT. https://github.com/NR5P/homestead_automation . I try to work on stuff when I get time at work and I figured cross compiling would make it easier to work on it and test when I'm not at home. I don't really want to bring the pi with me.

        jsulmJ 1 Reply Last reply
        0
        • N NR5P

          Sorry meant to say learning c++ seemed easier. I'm building an automation program with QT. https://github.com/NR5P/homestead_automation . I try to work on stuff when I get time at work and I figured cross compiling would make it easier to work on it and test when I'm not at home. I don't really want to bring the pi with me.

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

          @NR5P It looks like OpenGL/ES header/libs are missing in your sysroot.
          You can call configure with -v parameter to see what exactly is missing.

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

          1 Reply Last reply
          0
          • Q Offline
            Q Offline
            QURORO
            wrote on last edited by
            #5

            Using the sourcecode qt-everywhere-src-5.12.0 will be fine.
            https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/

            If the sourcecode version newer than 5.12.0, it must getting "The OpenGL functionality tests failed!" Error.

            None of [libGLESv2.so libGLESv2.a] found in [/home/alex/raspi/sysroot/usr/lib/arm-linux-gnueabihf] and global paths.
            => source produced no result.

            I have check those files is really exist, but system can not detected.

            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