Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Can I build Qt own on Raspberry Pi ?
Forum Updated to NodeBB v4.3 + New Features

Can I build Qt own on Raspberry Pi ?

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
10 Posts 3 Posters 1.3k 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.
  • T Offline
    T Offline
    Takeyuki
    wrote on last edited by
    #1

    Hello,

    Because I don't have Linux PC, I've tried Qt build own on Raspberry Pi with following configure options:

    ./configure -release -opengl es2 -opensource -confirm-license -make libs -prefix /usr/local -v
    

    I've expected that configure detect correct EGL type as "raspberry", but result is EGLFS Raspberry Pi . no as follows:

      Build parts ............  libs
      Mode ................... release
      Using sanitizer(s)...... none
      Using C++ standard ..... c++1z
      Using gold linker....... yes
      Using new DTAGS ........ yes
      Using PCH .............. yes
      Using LTCG ............. no
      Target compiler supports:
        Neon ................. no
    
    Qt modules and options:
      Qt D-Bus ............... yes (linked to dbus-1)
      Qt Concurrent .......... yes
      Qt GUI ................. yes
      Qt Widgets ............. yes
      Large File ............. yes
      QML debugging .......... yes
      Use system proxies ..... no
    
    Support enabled for:
      Accessibility .......... yes
      ALSA ................... yes
      CUPS ................... yes
      Evdev .................. yes
      FontConfig ............. yes
      FreeType ............... yes (system library)
      Glib ................... yes
      GStreamer .............. yes (1.0)
      GTK theme .............. yes
      HarfBuzz ............... yes (bundled copy)
      Iconv .................. yes
      ICU .................... yes
      Image formats: 
        GIF .................. yes (plugin, using bundled copy)
        JPEG ................. yes (plugin, using system library)
        PNG .................. yes (in QtGui, using system library)
      libinput................ yes
      Logging backends: 
        journald ............... no
        syslog   ............... no
      mtdev .................. yes (system library)
      Networking: 
        getaddrinfo .......... yes
        getifaddrs ........... yes
        IPv6 ifname .......... yes
        libproxy.............. yes
        OpenSSL .............. yes (loading libraries at run-time)
      OpenGL / OpenVG: 
        EGL .................. yes
        OpenGL ............... yes (OpenGL ES 2.0+)
        OpenVG ............... no
      PCRE ................... system
      pkg-config ............. yes 
      PulseAudio ............. yes
      QPA backends: 
        DirectFB ............. no
        EGLFS ................ yes
          EGLFS i.MX6 ........ no
          EGLFS i.MX6 Wayland. no
          EGLFS EGLDevice .... yes
          EGLFS GBM .......... yes
          EGLFS Mali ......... no
          EGLFS Raspberry Pi . no
          EGLFS X11 .......... yes
        LinuxFB .............. yes
        Mir client............ no
        XCB .................. yes (system library)
          EGL on X ........... yes
          GLX ................ yes
          MIT-SHM ............ yes
          Xcb-Xlib ........... yes
          Xcursor ............ yes (loaded at runtime)
          Xfixes ............. yes (loaded at runtime)
          Xi ................. no
          Xi2 ................ yes
          Xinerama ........... yes (loaded at runtime)
          Xrandr ............. yes (loaded at runtime)
          Xrender ............ yes
          XKB ................ yes
          XShape ............. yes
          XSync .............. yes
          XVideo ............. yes
      Session management ..... yes
      SQL drivers: 
        DB2 .................. no
        InterBase ............ no
        MySQL ................ yes (plugin)
        OCI .................. no
        ODBC ................. yes (plugin)
        PostgreSQL ........... yes (plugin)
        SQLite 2 ............. yes (plugin)
        SQLite ............... yes (plugin, using bundled copy)
        TDS .................. yes (plugin)
      tslib .................. yes
      udev ................... yes
      xkbcommon-x11........... yes (system library)
      xkbcommon-evdev......... yes
      zlib ................... yes (system library)
    

    Does anyone know how to set correct parameter's of configure for own compiling, thank you!

    Pablo J. RoginaP jsulmJ 2 Replies Last reply
    0
    • T Takeyuki

      Hello,

      Because I don't have Linux PC, I've tried Qt build own on Raspberry Pi with following configure options:

      ./configure -release -opengl es2 -opensource -confirm-license -make libs -prefix /usr/local -v
      

      I've expected that configure detect correct EGL type as "raspberry", but result is EGLFS Raspberry Pi . no as follows:

        Build parts ............  libs
        Mode ................... release
        Using sanitizer(s)...... none
        Using C++ standard ..... c++1z
        Using gold linker....... yes
        Using new DTAGS ........ yes
        Using PCH .............. yes
        Using LTCG ............. no
        Target compiler supports:
          Neon ................. no
      
      Qt modules and options:
        Qt D-Bus ............... yes (linked to dbus-1)
        Qt Concurrent .......... yes
        Qt GUI ................. yes
        Qt Widgets ............. yes
        Large File ............. yes
        QML debugging .......... yes
        Use system proxies ..... no
      
      Support enabled for:
        Accessibility .......... yes
        ALSA ................... yes
        CUPS ................... yes
        Evdev .................. yes
        FontConfig ............. yes
        FreeType ............... yes (system library)
        Glib ................... yes
        GStreamer .............. yes (1.0)
        GTK theme .............. yes
        HarfBuzz ............... yes (bundled copy)
        Iconv .................. yes
        ICU .................... yes
        Image formats: 
          GIF .................. yes (plugin, using bundled copy)
          JPEG ................. yes (plugin, using system library)
          PNG .................. yes (in QtGui, using system library)
        libinput................ yes
        Logging backends: 
          journald ............... no
          syslog   ............... no
        mtdev .................. yes (system library)
        Networking: 
          getaddrinfo .......... yes
          getifaddrs ........... yes
          IPv6 ifname .......... yes
          libproxy.............. yes
          OpenSSL .............. yes (loading libraries at run-time)
        OpenGL / OpenVG: 
          EGL .................. yes
          OpenGL ............... yes (OpenGL ES 2.0+)
          OpenVG ............... no
        PCRE ................... system
        pkg-config ............. yes 
        PulseAudio ............. yes
        QPA backends: 
          DirectFB ............. no
          EGLFS ................ yes
            EGLFS i.MX6 ........ no
            EGLFS i.MX6 Wayland. no
            EGLFS EGLDevice .... yes
            EGLFS GBM .......... yes
            EGLFS Mali ......... no
            EGLFS Raspberry Pi . no
            EGLFS X11 .......... yes
          LinuxFB .............. yes
          Mir client............ no
          XCB .................. yes (system library)
            EGL on X ........... yes
            GLX ................ yes
            MIT-SHM ............ yes
            Xcb-Xlib ........... yes
            Xcursor ............ yes (loaded at runtime)
            Xfixes ............. yes (loaded at runtime)
            Xi ................. no
            Xi2 ................ yes
            Xinerama ........... yes (loaded at runtime)
            Xrandr ............. yes (loaded at runtime)
            Xrender ............ yes
            XKB ................ yes
            XShape ............. yes
            XSync .............. yes
            XVideo ............. yes
        Session management ..... yes
        SQL drivers: 
          DB2 .................. no
          InterBase ............ no
          MySQL ................ yes (plugin)
          OCI .................. no
          ODBC ................. yes (plugin)
          PostgreSQL ........... yes (plugin)
          SQLite 2 ............. yes (plugin)
          SQLite ............... yes (plugin, using bundled copy)
          TDS .................. yes (plugin)
        tslib .................. yes
        udev ................... yes
        xkbcommon-x11........... yes (system library)
        xkbcommon-evdev......... yes
        zlib ................... yes (system library)
      

      Does anyone know how to set correct parameter's of configure for own compiling, thank you!

      Pablo J. RoginaP Offline
      Pablo J. RoginaP Offline
      Pablo J. Rogina
      wrote on last edited by
      #2

      @Takeyuki

      I don't have Linux PC

      What about using a VM with Linux installed? That way you could achieve cross-compilation of Qt in your "host" which will be faster that on the own device. In that case I'd suggest this guide just in case.

      Upvote the answer(s) that helped you solve the issue
      Use "Topic Tools" button to mark your post as Solved
      Add screenshots via postimage.org
      Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

      1 Reply Last reply
      2
      • T Offline
        T Offline
        Takeyuki
        wrote on last edited by Takeyuki
        #3

        @Pablo-J.-Rogina

        Thank you for kindly nice suggestion! It seems good for me as a last resort.

        If it is possible I'd rather do own compile because it's more simple than cross compile.
        Also, Raspberry Pi 3 is enough power full, the make process of this is finished within 1 hour.
        Unfortunately the completed Qt can't run well with EGL due to configure can't select Raspberry Pi EGL as correct. So, I'm looking for the way to select to correct EGL type. Any suggestion are welcome!

        Pablo J. RoginaP 1 Reply Last reply
        0
        • T Takeyuki

          @Pablo-J.-Rogina

          Thank you for kindly nice suggestion! It seems good for me as a last resort.

          If it is possible I'd rather do own compile because it's more simple than cross compile.
          Also, Raspberry Pi 3 is enough power full, the make process of this is finished within 1 hour.
          Unfortunately the completed Qt can't run well with EGL due to configure can't select Raspberry Pi EGL as correct. So, I'm looking for the way to select to correct EGL type. Any suggestion are welcome!

          Pablo J. RoginaP Offline
          Pablo J. RoginaP Offline
          Pablo J. Rogina
          wrote on last edited by
          #4

          @Takeyuki maybe this post can help regarding the EGLFS issue

          Upvote the answer(s) that helped you solve the issue
          Use "Topic Tools" button to mark your post as Solved
          Add screenshots via postimage.org
          Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

          1 Reply Last reply
          2
          • T Takeyuki

            Hello,

            Because I don't have Linux PC, I've tried Qt build own on Raspberry Pi with following configure options:

            ./configure -release -opengl es2 -opensource -confirm-license -make libs -prefix /usr/local -v
            

            I've expected that configure detect correct EGL type as "raspberry", but result is EGLFS Raspberry Pi . no as follows:

              Build parts ............  libs
              Mode ................... release
              Using sanitizer(s)...... none
              Using C++ standard ..... c++1z
              Using gold linker....... yes
              Using new DTAGS ........ yes
              Using PCH .............. yes
              Using LTCG ............. no
              Target compiler supports:
                Neon ................. no
            
            Qt modules and options:
              Qt D-Bus ............... yes (linked to dbus-1)
              Qt Concurrent .......... yes
              Qt GUI ................. yes
              Qt Widgets ............. yes
              Large File ............. yes
              QML debugging .......... yes
              Use system proxies ..... no
            
            Support enabled for:
              Accessibility .......... yes
              ALSA ................... yes
              CUPS ................... yes
              Evdev .................. yes
              FontConfig ............. yes
              FreeType ............... yes (system library)
              Glib ................... yes
              GStreamer .............. yes (1.0)
              GTK theme .............. yes
              HarfBuzz ............... yes (bundled copy)
              Iconv .................. yes
              ICU .................... yes
              Image formats: 
                GIF .................. yes (plugin, using bundled copy)
                JPEG ................. yes (plugin, using system library)
                PNG .................. yes (in QtGui, using system library)
              libinput................ yes
              Logging backends: 
                journald ............... no
                syslog   ............... no
              mtdev .................. yes (system library)
              Networking: 
                getaddrinfo .......... yes
                getifaddrs ........... yes
                IPv6 ifname .......... yes
                libproxy.............. yes
                OpenSSL .............. yes (loading libraries at run-time)
              OpenGL / OpenVG: 
                EGL .................. yes
                OpenGL ............... yes (OpenGL ES 2.0+)
                OpenVG ............... no
              PCRE ................... system
              pkg-config ............. yes 
              PulseAudio ............. yes
              QPA backends: 
                DirectFB ............. no
                EGLFS ................ yes
                  EGLFS i.MX6 ........ no
                  EGLFS i.MX6 Wayland. no
                  EGLFS EGLDevice .... yes
                  EGLFS GBM .......... yes
                  EGLFS Mali ......... no
                  EGLFS Raspberry Pi . no
                  EGLFS X11 .......... yes
                LinuxFB .............. yes
                Mir client............ no
                XCB .................. yes (system library)
                  EGL on X ........... yes
                  GLX ................ yes
                  MIT-SHM ............ yes
                  Xcb-Xlib ........... yes
                  Xcursor ............ yes (loaded at runtime)
                  Xfixes ............. yes (loaded at runtime)
                  Xi ................. no
                  Xi2 ................ yes
                  Xinerama ........... yes (loaded at runtime)
                  Xrandr ............. yes (loaded at runtime)
                  Xrender ............ yes
                  XKB ................ yes
                  XShape ............. yes
                  XSync .............. yes
                  XVideo ............. yes
              Session management ..... yes
              SQL drivers: 
                DB2 .................. no
                InterBase ............ no
                MySQL ................ yes (plugin)
                OCI .................. no
                ODBC ................. yes (plugin)
                PostgreSQL ........... yes (plugin)
                SQLite 2 ............. yes (plugin)
                SQLite ............... yes (plugin, using bundled copy)
                TDS .................. yes (plugin)
              tslib .................. yes
              udev ................... yes
              xkbcommon-x11........... yes (system library)
              xkbcommon-evdev......... yes
              zlib ................... yes (system library)
            

            Does anyone know how to set correct parameter's of configure for own compiling, thank you!

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

            @Takeyuki said in Can I build Qt own on Raspberry Pi ?:

            EGLFS Raspberry Pi . no as follows

            Add -v parameter to configure call - it will show you more information about what exactly is missing

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

            T 1 Reply Last reply
            4
            • jsulmJ jsulm

              @Takeyuki said in Can I build Qt own on Raspberry Pi ?:

              EGLFS Raspberry Pi . no as follows

              Add -v parameter to configure call - it will show you more information about what exactly is missing

              T Offline
              T Offline
              Takeyuki
              wrote on last edited by
              #6

              @jsulm

              Thank you for your suggestion.
              I'm afraid I've use -v at the end of the configure script mentioned before...

              jsulmJ 1 Reply Last reply
              0
              • T Takeyuki

                @jsulm

                Thank you for your suggestion.
                I'm afraid I've use -v at the end of the configure script mentioned before...

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

                @Takeyuki But then there should be much more output than what you posted above.

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

                T 1 Reply Last reply
                1
                • jsulmJ jsulm

                  @Takeyuki But then there should be much more output than what you posted above.

                  T Offline
                  T Offline
                  Takeyuki
                  wrote on last edited by
                  #8

                  @jsulm

                  I've refer the post which is recommended by @Pablo-J.-Rogina, then add brcm specific libraries on /home/pi/qtbase/mkspecs/linux-g++/qmake.conf as follows:

                  #
                  # qmake configuration for linux-g++
                  #
                  
                  MAKEFILE_GENERATOR      = UNIX
                  CONFIG                 += incremental
                  QMAKE_INCREMENTAL_STYLE = sublib
                  
                  include(../common/linux.conf)
                  include(../common/gcc-base-unix.conf)
                  include(../common/g++-unix.conf)
                  load(qt_config)
                  
                  QMAKE_INCDIR_OPENGL_ES2 = /opt/vc/include
                  QMAKE_LIBDIR_OPENGL_ES2 = /opt/vc/lib
                  QMAKE_LIBS_OPENGL_ES2   = -lbrcmGLESv2 -lbrcmWFC -lbrcmEGL -lbrcmOpenVG -lbrcmEGL
                  

                  Then, configure as follows:

                  ./configure -release -opengl es2 -opensource -confirm-license -make libs -prefix /usr/local -v
                  

                  The result of configure is here.
                  The line #249 seems to indicate that expected libraries can be linked to opengles2

                  g++ -Wl,-O1 -o opengles2 opengles2.o   -lGLESv2 -L/opt/vc/lib -lbrcmGLESv2 -lbrcmWFC -lbrcmOpenVG -lbrcmEGL 
                  g++ -Wl,-O1 -o opengles3 opengles3.o   -lGLESv2 -L/opt/vc/lib -lbrcmGLESv2 -lbrcmWFC -lbrcmOpenVG -lbrcmEGL 
                  g++ -Wl,-O1 -o opengles31 opengles31.o   -lGLESv2 -L/opt/vc/lib -lbrcmGLESv2 -lbrcmWFC -lbrcmOpenVG -lbrcmEGL 
                  checking for eglfs-brcm... 
                  g++ -c -pipe -O2 -Wall -W -fPIC  -I. -I../../../mkspecs/linux-g++ -o eglfs-brcm.o eglfs-brcm.cpp
                  

                  Then make, make_install, build qopenglwidget and run on the RPi, but result is still QXcbConnection: Could not connect to display

                  Are there any necessary steps which I've missed? Thank you for your suggestion!

                  Pablo J. RoginaP 1 Reply Last reply
                  0
                  • T Takeyuki

                    @jsulm

                    I've refer the post which is recommended by @Pablo-J.-Rogina, then add brcm specific libraries on /home/pi/qtbase/mkspecs/linux-g++/qmake.conf as follows:

                    #
                    # qmake configuration for linux-g++
                    #
                    
                    MAKEFILE_GENERATOR      = UNIX
                    CONFIG                 += incremental
                    QMAKE_INCREMENTAL_STYLE = sublib
                    
                    include(../common/linux.conf)
                    include(../common/gcc-base-unix.conf)
                    include(../common/g++-unix.conf)
                    load(qt_config)
                    
                    QMAKE_INCDIR_OPENGL_ES2 = /opt/vc/include
                    QMAKE_LIBDIR_OPENGL_ES2 = /opt/vc/lib
                    QMAKE_LIBS_OPENGL_ES2   = -lbrcmGLESv2 -lbrcmWFC -lbrcmEGL -lbrcmOpenVG -lbrcmEGL
                    

                    Then, configure as follows:

                    ./configure -release -opengl es2 -opensource -confirm-license -make libs -prefix /usr/local -v
                    

                    The result of configure is here.
                    The line #249 seems to indicate that expected libraries can be linked to opengles2

                    g++ -Wl,-O1 -o opengles2 opengles2.o   -lGLESv2 -L/opt/vc/lib -lbrcmGLESv2 -lbrcmWFC -lbrcmOpenVG -lbrcmEGL 
                    g++ -Wl,-O1 -o opengles3 opengles3.o   -lGLESv2 -L/opt/vc/lib -lbrcmGLESv2 -lbrcmWFC -lbrcmOpenVG -lbrcmEGL 
                    g++ -Wl,-O1 -o opengles31 opengles31.o   -lGLESv2 -L/opt/vc/lib -lbrcmGLESv2 -lbrcmWFC -lbrcmOpenVG -lbrcmEGL 
                    checking for eglfs-brcm... 
                    g++ -c -pipe -O2 -Wall -W -fPIC  -I. -I../../../mkspecs/linux-g++ -o eglfs-brcm.o eglfs-brcm.cpp
                    

                    Then make, make_install, build qopenglwidget and run on the RPi, but result is still QXcbConnection: Could not connect to display

                    Are there any necessary steps which I've missed? Thank you for your suggestion!

                    Pablo J. RoginaP Offline
                    Pablo J. RoginaP Offline
                    Pablo J. Rogina
                    wrote on last edited by
                    #9

                    @Takeyuki said in Can I build Qt own on Raspberry Pi ?:

                    QXcbConnection: Could not connect to display

                    It looks like you don't have X11 service available in the device.

                    What if you try with:

                    ./your-app -platform eglfs
                    

                    Upvote the answer(s) that helped you solve the issue
                    Use "Topic Tools" button to mark your post as Solved
                    Add screenshots via postimage.org
                    Don't ask support requests via chat/PM. Please use the forum so others can benefit from the solution in the future

                    T 1 Reply Last reply
                    0
                    • Pablo J. RoginaP Pablo J. Rogina

                      @Takeyuki said in Can I build Qt own on Raspberry Pi ?:

                      QXcbConnection: Could not connect to display

                      It looks like you don't have X11 service available in the device.

                      What if you try with:

                      ./your-app -platform eglfs
                      
                      T Offline
                      T Offline
                      Takeyuki
                      wrote on last edited by
                      #10

                      @Pablo-J.-Rogina

                      I've get strange error message...

                      ./qopenglwidt -platform eglfs
                      Could not find DRM device!
                      Aborted
                      
                      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