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. Qt on Raspberry pi3
QtWS25 Last Chance

Qt on Raspberry pi3

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qt5.11raspberry pi 3xcbxcb opengl
20 Posts 7 Posters 10.8k 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.
  • S Offline
    S Offline
    Saman19
    wrote on last edited by
    #1

    Hello. I want to compile Qt on raspberry pi3. I use qt-everywhere-src-5.11.0 and gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf for cross compile....

    my config command is :
    ./configure -release -opengl es2 -eglfs -optimized-qmake -no-pch -make libs -make tools -reduce-exports -sysroot $RPI_SYSROOT -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -opensource -nomake examples -nomake tests -confirm-license -xcb -skip qtwayland

    my config log is:
    Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

    Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.

    Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.

    Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.

    Qt is now configured for building. Just run 'make'.
    Once everything is built, you must run 'make install'.

    after run make command i occur with these errors:

    /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp: In member function 'virtual void QXcbEglWindow::create()':
    /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:96:92: error: invalid conversion from 'xcb_window_t {aka unsigned int}' to 'EGLNativeWindowType {aka void*}' [-fpermissive]
    m_surface = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, 0);
    ^
    In file included from /home/saman/qt-everywhere-src-5.11.0/qtbase/include/QtEglSupport/5.11.0/QtEglSupport/private/../../../../../src/platformsupport/eglconvenience/qt_egl_p.h:65:0,
    from /home/saman/qt-everywhere-src-5.11.0/qtbase/include/QtEglSupport/5.11.0/QtEglSupport/private/qt_egl_p.h:1,
    from /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h:49,
    from /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h:45,
    from /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:40:
    /media/saman/62ca0b6d-6291-4c40-b1fd-11bc291e4a38/opt/vc/include/EGL/egl.h:265:31: note: initializing argument 3 of 'void* eglCreateWindowSurface(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*)'
    EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
    ^
    Makefile:1779: recipe for target '.obj/qxcbeglwindow.o' failed
    make[7]: *** [.obj/qxcbeglwindow.o] Error 1
    make[7]: *** Waiting for unfinished jobs....
    make[7]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl'
    Makefile:44: recipe for target 'sub-xcb_egl-make_first' failed
    make[6]: *** [sub-xcb_egl-make_first] Error 2
    make[6]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms/xcb/gl_integrations'
    Makefile:104: recipe for target 'sub-gl_integrations-make_first-ordered' failed
    make[5]: *** [sub-gl_integrations-make_first-ordered] Error 2
    make[5]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms/xcb'
    Makefile:98: recipe for target 'sub-xcb-make_first' failed
    make[4]: *** [sub-xcb-make_first] Error 2
    make[4]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms'
    Makefile:102: recipe for target 'sub-platforms-make_first' failed
    make[3]: *** [sub-platforms-make_first] Error 2
    make[3]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins'
    Makefile:774: recipe for target 'sub-plugins-make_first' failed
    make[2]: *** [sub-plugins-make_first] Error 2
    make[2]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src'
    Makefile:48: recipe for target 'sub-src-make_first' failed
    make[1]: *** [sub-src-make_first] Error 2
    make[1]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase'
    Makefile:82: recipe for target 'module-qtbase-make_first' failed
    make: *** [module-qtbase-make_first] Error 2

    please help me.

    Pablo J. RoginaP 1 Reply Last reply
    0
    • mrjjM Offline
      mrjjM Offline
      mrjj
      Lifetime Qt Champion
      wrote on last edited by
      #2

      Hi
      If you get tired fighting cross compiling, there is also the option of using
      http://www.qtrpi.com/home
      its only Qt5.7 though so might not fit your use case.

      S 1 Reply Last reply
      5
      • J.HilkJ Offline
        J.HilkJ Offline
        J.Hilk
        Moderators
        wrote on last edited by
        #3

        There's also the option to download Qt and QtCreator directly to the pi via the package manager.
        The framework is limited to Qt 5.7, but as a quick entry to Qt on Pi its fine and the Pi3 is beefy enough to manage compiling projects itself.


        Be aware of the Qt Code of Conduct, when posting : https://forum.qt.io/topic/113070/qt-code-of-conduct


        Q: What's that?
        A: It's blue light.
        Q: What does it do?
        A: It turns blue.

        1 Reply Last reply
        3
        • S Saman19

          Hello. I want to compile Qt on raspberry pi3. I use qt-everywhere-src-5.11.0 and gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf for cross compile....

          my config command is :
          ./configure -release -opengl es2 -eglfs -optimized-qmake -no-pch -make libs -make tools -reduce-exports -sysroot $RPI_SYSROOT -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=$RPI_TOOLCHAIN -opensource -nomake examples -nomake tests -confirm-license -xcb -skip qtwayland

          my config log is:
          Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

          Note: Disabling X11 Accessibility Bridge: D-Bus or AT-SPI is missing.

          Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.

          Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.

          Qt is now configured for building. Just run 'make'.
          Once everything is built, you must run 'make install'.

          after run make command i occur with these errors:

          /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp: In member function 'virtual void QXcbEglWindow::create()':
          /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:96:92: error: invalid conversion from 'xcb_window_t {aka unsigned int}' to 'EGLNativeWindowType {aka void*}' [-fpermissive]
          m_surface = eglCreateWindowSurface(m_glIntegration->eglDisplay(), m_config, m_window, 0);
          ^
          In file included from /home/saman/qt-everywhere-src-5.11.0/qtbase/include/QtEglSupport/5.11.0/QtEglSupport/private/../../../../../src/platformsupport/eglconvenience/qt_egl_p.h:65:0,
          from /home/saman/qt-everywhere-src-5.11.0/qtbase/include/QtEglSupport/5.11.0/QtEglSupport/private/qt_egl_p.h:1,
          from /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglinclude.h:49,
          from /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.h:45,
          from /home/saman/qt-everywhere-src-5.11.0/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl/qxcbeglwindow.cpp:40:
          /media/saman/62ca0b6d-6291-4c40-b1fd-11bc291e4a38/opt/vc/include/EGL/egl.h:265:31: note: initializing argument 3 of 'void* eglCreateWindowSurface(EGLDisplay, EGLConfig, EGLNativeWindowType, const EGLint*)'
          EGLAPI EGLSurface EGLAPIENTRY eglCreateWindowSurface(EGLDisplay dpy, EGLConfig config,
          ^
          Makefile:1779: recipe for target '.obj/qxcbeglwindow.o' failed
          make[7]: *** [.obj/qxcbeglwindow.o] Error 1
          make[7]: *** Waiting for unfinished jobs....
          make[7]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms/xcb/gl_integrations/xcb_egl'
          Makefile:44: recipe for target 'sub-xcb_egl-make_first' failed
          make[6]: *** [sub-xcb_egl-make_first] Error 2
          make[6]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms/xcb/gl_integrations'
          Makefile:104: recipe for target 'sub-gl_integrations-make_first-ordered' failed
          make[5]: *** [sub-gl_integrations-make_first-ordered] Error 2
          make[5]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms/xcb'
          Makefile:98: recipe for target 'sub-xcb-make_first' failed
          make[4]: *** [sub-xcb-make_first] Error 2
          make[4]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins/platforms'
          Makefile:102: recipe for target 'sub-platforms-make_first' failed
          make[3]: *** [sub-platforms-make_first] Error 2
          make[3]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src/plugins'
          Makefile:774: recipe for target 'sub-plugins-make_first' failed
          make[2]: *** [sub-plugins-make_first] Error 2
          make[2]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase/src'
          Makefile:48: recipe for target 'sub-src-make_first' failed
          make[1]: *** [sub-src-make_first] Error 2
          make[1]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/build3/qtbase'
          Makefile:82: recipe for target 'module-qtbase-make_first' failed
          make: *** [module-qtbase-make_first] Error 2

          please help me.

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

          @Saman19 have you tried the steps of this guide? I succeeded with Qt 5.10.1 and Raspberry Pi Zero W.

          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

          mrjjM 1 Reply Last reply
          4
          • Pablo J. RoginaP Pablo J. Rogina

            @Saman19 have you tried the steps of this guide? I succeeded with Qt 5.10.1 and Raspberry Pi Zero W.

            mrjjM Offline
            mrjjM Offline
            mrjj
            Lifetime Qt Champion
            wrote on last edited by
            #5

            @Pablo-J.-Rogina
            Did it miss a link ?

            Pablo J. RoginaP 1 Reply Last reply
            0
            • mrjjM mrjj

              @Pablo-J.-Rogina
              Did it miss a link ?

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

              @mrjj Yes, good catch. Post edited. Thanks.

              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
              1
              • mrjjM mrjj

                Hi
                If you get tired fighting cross compiling, there is also the option of using
                http://www.qtrpi.com/home
                its only Qt5.7 though so might not fit your use case.

                S Offline
                S Offline
                Saman19
                wrote on last edited by
                #7

                @mrjj and @Pablo-J.-Rogina
                I install every library that system required but when I cross compile Qt I got these errors:

                tforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmmain.cpp -o .moc/qeglfskmsgbmmain.moc
                Makefile:2849: recipe for target '.obj/qeglfskmsgbmwindow.o' failed
                make[7]: *** [.obj/qeglfskmsgbmwindow.o] Error 1
                make[7]: *** Waiting for unfinished jobs....
                make[7]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/buildfinal/qtbase/src/plugins/platforms/eglfs/deviceintegration/eglfs_kms'
                Makefile:98: recipe for target 'sub-eglfs_kms-make_first' failed
                make[6]: *** [sub-eglfs_kms-make_first] Error 2
                make[6]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/buildfinal/qtbase/src/plugins/platforms/eglfs/deviceintegration'
                Makefile:104: recipe for target 'sub-deviceintegration-make_first-ordered' failed
                make[5]: *** [sub-deviceintegration-make_first-ordered] Error 2
                make[5]: Leaving directory '/home/saman/qt-everywhere-src-5.11.0/buildfinal/qtbase/src/plugins/platforms/eglfs'
                Makefile:125: recipe for target 'sub-eglfs-make_first' failed
                make[4]: *** [sub-eglfs-make_first] Error 2
                make[4]: *** Waiting for unfinished jobs....

                my configuration:
                ./configure -opengl es2 -ssl -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=/home/saman/QtonRaspb/tools-gcc-linaro-4.9/arm-bcm2708/gcc-linaro-4.9-2015.02-3-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot /media/saman/62ca0b6d-6291-4c40-b1fd-11bc291e4a381 -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5pi -extprefix /home/saman/raspi/qt5pi -hostprefix /home/saman/raspi/qt5 -v -skip qtwayland -hostprefix /home/saman/raspberryPi3/Qt5.11.0

                My config summery:

                Building on: linux-g++ (x86_64, CPU features: mmx sse sse2)
                Building for: devices/linux-rasp-pi3-g++ (arm, CPU features: neon)
                Configuration: cross_compile compile_examples enable_new_dtags largefile neon precompile_header shared rpath release c++11 c++14 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++14
                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 .... yes
                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 ........ yes
                GLib ................................... yes
                iconv .................................. no
                ICU .................................... yes
                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 ................................ yes
                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 ............................. yes
                Image formats:
                GIF .................................. yes
                ICO .................................. yes
                JPEG ................................. yes
                Using system libjpeg ............... yes
                PNG .................................. yes
                Using system libpng ................ yes
                EGL .................................... yes
                OpenVG ................................. yes
                OpenGL:
                Desktop OpenGL ....................... no
                OpenGL ES 2.0 ........................ yes
                OpenGL ES 3.0 ........................ yes
                OpenGL ES 3.1 ........................ yes
                OpenGL ES 3.2 ........................ yes
                Vulkan ................................. no
                Session Management ..................... yes
                Features used by QPA backends:
                evdev .................................. yes
                libinput ............................... no
                INTEGRITY HID .......................... no
                mtdev .................................. yes
                tslib .................................. yes
                xkbcommon-evdev ........................ yes
                QPA backends:
                DirectFB ............................... no
                EGLFS .................................. yes
                EGLFS details:
                EGLFS OpenWFD ........................ no
                EGLFS i.Mx6 .......................... no
                EGLFS i.Mx6 Wayland .................. no
                EGLFS RCAR ........................... no
                EGLFS EGLDevice ...................... yes
                EGLFS GBM ............................ yes
                EGLFS VSP2 ........................... no
                EGLFS Mali ........................... no
                EGLFS Raspberry Pi ................... no
                EGL on X11 ........................... yes
                LinuxFB ................................ yes
                VNC .................................... yes
                Mir client ............................. no
                X11:
                Using system-provided XCB libraries .. yes
                EGL on X11 ........................... yes
                Xinput2 .............................. yes
                XCB XKB .............................. yes
                XLib ................................. yes
                XCB render ........................... yes
                XCB GLX .............................. yes
                XCB Xlib ............................. yes
                Using system-provided xkbcommon ...... yes
                Native painting (experimental) ....... yes
                Qt Widgets:
                GTK+ ................................... no
                Styles ................................. Fusion Windows
                Qt PrintSupport:
                CUPS ................................... yes
                Qt Sql:
                DB2 (IBM) .............................. no
                InterBase .............................. no
                MySql .................................. no
                OCI (Oracle) ........................... no
                ODBC ................................... no
                PostgreSQL ............................. yes
                SQLite2 ................................ yes
                SQLite ................................. yes
                Using system provided SQLite ......... no
                TDS (Sybase) ........................... yes
                Qt Testlib:
                Tester for item models ................. yes
                Qt SerialBus:
                Socket CAN ............................. yes
                Socket CAN FD .......................... yes
                QtXmlPatterns:
                XML schema support ..................... yes
                Qt QML:
                QML network support .................... yes
                QML debugging and profiling support .... yes
                QML delegate model ..................... yes
                Qt Quick:
                Direct3D 12 ............................ no
                AnimatedImage item ..................... yes
                Canvas item ............................ yes
                Support for Qt Quick Designer .......... yes
                Flipable item .......................... yes
                GridView item .......................... yes
                ListView item .......................... yes
                Path support ........................... yes
                PathView item .......................... yes
                Positioner items ....................... yes
                Repeater item .......................... yes
                ShaderEffect item ...................... yes
                Sprite item ............................ yes
                Qt Gamepad:
                SDL2 ................................... no
                Qt 3D:
                Assimp ................................. yes
                System Assimp .......................... no
                Output Qt3D Job traces ................. no
                Output Qt3D GL traces .................. no
                Use SSE2 instructions .................. no
                Use AVX2 instructions .................. no
                Aspects:
                Render aspect ........................ yes
                Input aspect ......................... yes
                Logic aspect ......................... yes
                Animation aspect ..................... yes
                Extras aspect ........................ yes
                Qt 3D Renderers:
                OpenGL Renderer ........................ yes
                Qt 3D GeometryLoaders:
                Autodesk FBX ........................... no
                Qt Bluetooth:
                BlueZ .................................. yes
                BlueZ Low Energy ....................... yes
                Linux Crypto API ....................... yes
                WinRT Bluetooth API (desktop & UWP) .... no
                Qt Sensors:
                sensorfw ............................... no
                Qt Quick Controls 2:
                Styles ................................. Default Fusion Imagine Material Universal
                Qt Quick Templates 2:
                Hover support .......................... yes
                Multi-touch support .................... yes
                Qt Multimedia:
                ALSA ................................... yes
                GStreamer 1.0 .......................... yes
                GStreamer 0.10 ......................... no
                Video for Linux ........................ yes
                OpenAL ................................. no
                PulseAudio ............................. yes
                Resource Policy (libresourceqt5) ....... no
                Windows Audio Services ................. no
                DirectShow ............................. no
                Windows Media Foundation ............... no
                Qt WebEngine:
                Embedded build ......................... yes
                Pepper Plugins ......................... no
                Printing and PDF ....................... no
                Proprietary Codecs ..................... no
                Spellchecker ........................... yes
                Native Spellchecker .................... no
                WebRTC ................................. no
                Use System Ninja ....................... no
                Geolocation ............................ no
                Use v8 snapshot ........................ yes
                Building v8 snapshot supported ......... no
                Use ALSA ............................... yes
                Use PulseAudio ......................... yes
                Optional system libraries used:
                re2 .................................. no
                icu .................................. no
                libwebp, libwebpmux and libwebpdemux . no
                opus ................................. no
                ffmpeg ............................... no
                libvpx ............................... no
                snappy ............................... no
                libsrtp .............................. no
                glib ................................. yes
                zlib ................................. yes
                minizip .............................. no
                libevent ............................. no
                jsoncpp .............................. yes
                protobuf ............................. no
                libxml2 and libxslt .................. no
                lcms2 ................................ no
                png .................................. no
                JPEG ................................. no
                harfbuzz ............................. no
                Required system libraries:
                fontconfig ........................... yes
                dbus ................................. yes
                nss .................................. yes
                khr .................................. yes
                glibc ................................ yes
                Required system libraries for qpa-xcb:
                libdrm ............................... yes
                xcomposite ........................... yes
                xcursor .............................. yes
                xi ................................... yes
                xrandr ............................... yes
                xtst ................................. yes

                Note: Also available for Linux: linux-clang linux-icc

                Note: -optimized-tools is not useful in -release mode.

                Note: Dropped compiler flags '-pthread' when detecting library 'glib'.

                Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer'.

                Note: Dropped compiler flags '-pthread' when detecting library 'gstreamer_app'.

                Please help to Correct these errors...

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

                  @Saman19 said in Qt on Raspberry pi3:

                  tforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmmain.cpp -o .moc/qeglfskmsgbmmain.moc
                  Makefile:2849: recipe for target '.obj/qeglfskmsgbmwindow.o' failed

                  That's not the error message. Please look before it for the real cause of the compilation fail - and post it here.

                  EGLFS Raspberry Pi ................... no

                  You may want to check out -device linux-rasp-pi3-g++-vc4, it uses the GPU from on RPi. Note however, that your RPi sysroot needs to be up to date for Qt to find dependencies there.

                  (Z(:^

                  1 Reply Last reply
                  6
                  • C Offline
                    C Offline
                    chek
                    wrote on last edited by
                    #9

                    I'm also having issues cross compiling qt 5.11.0 for rpi3, has this been solved?

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

                      Well, compilation works for 5.10, 5.9 - they simply compile and work. With Qt 5.11.1, I've just tried and there seems to be a bug in QGeoMap.

                      If you want to try with 5.10:
                      You have to set up your toolchain and sysroot correctly, though. Follow the guide https://wiki.qt.io/RaspberryPi2EGLFS and you should be fine.

                      Remember to get all the dependencies and to run the symlink fix afterwards. You may throw in some extra libs just to be sure:

                      sudo apt build-dep qt5-default qt5-qmake
                      sudo apt install libiconv-hook-dev libinput-dev libts-dev bluez libbluetooth-dev libgstreamer1.0-dev libegl1-mesa
                      
                      # Optionally if it somehow still does not work:
                      sudo apt install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev
                      

                      And turn on OpenGL driver in raspi-config,

                      Here is my compilation script, if it helps:

                      export QTVER=5101
                      wget https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz
                      tar -xaf qt-everywhere-src-5.10.1.tar.xz
                      mv qt-everywhere-src-5.10.1 $QTVER-src
                      cd $QTVER-build
                      
                      ../$QTVER-src/configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ \
                      -device-option CROSS_COMPILE=/path/to/toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /path/to/sysroot \
                      -opensource -confirm-license -make libs -no-use-gold-linker \
                      -prefix /home/pi/qt/$QTVER -extprefix /path/to/qt-pi/$QTVER \
                      -hostprefix /path/to/$QTVER-qmake \
                      -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d \
                      -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard \
                      -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin \
                      -skip qtwebsockets
                      
                      make -j 8
                      
                      make install
                      

                      (Z(:^

                      C R 2 Replies Last reply
                      2
                      • sierdzioS sierdzio

                        Well, compilation works for 5.10, 5.9 - they simply compile and work. With Qt 5.11.1, I've just tried and there seems to be a bug in QGeoMap.

                        If you want to try with 5.10:
                        You have to set up your toolchain and sysroot correctly, though. Follow the guide https://wiki.qt.io/RaspberryPi2EGLFS and you should be fine.

                        Remember to get all the dependencies and to run the symlink fix afterwards. You may throw in some extra libs just to be sure:

                        sudo apt build-dep qt5-default qt5-qmake
                        sudo apt install libiconv-hook-dev libinput-dev libts-dev bluez libbluetooth-dev libgstreamer1.0-dev libegl1-mesa
                        
                        # Optionally if it somehow still does not work:
                        sudo apt install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev
                        

                        And turn on OpenGL driver in raspi-config,

                        Here is my compilation script, if it helps:

                        export QTVER=5101
                        wget https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz
                        tar -xaf qt-everywhere-src-5.10.1.tar.xz
                        mv qt-everywhere-src-5.10.1 $QTVER-src
                        cd $QTVER-build
                        
                        ../$QTVER-src/configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ \
                        -device-option CROSS_COMPILE=/path/to/toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /path/to/sysroot \
                        -opensource -confirm-license -make libs -no-use-gold-linker \
                        -prefix /home/pi/qt/$QTVER -extprefix /path/to/qt-pi/$QTVER \
                        -hostprefix /path/to/$QTVER-qmake \
                        -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d \
                        -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard \
                        -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin \
                        -skip qtwebsockets
                        
                        make -j 8
                        
                        make install
                        
                        C Offline
                        C Offline
                        chek
                        wrote on last edited by
                        #11

                        @sierdzio
                        Thank you so much for the reply, I think i'm also seeing the issue with qgeomap when doing 'make install' for 5.11.0. I'm trying to build qgroundcontrol for the raspberry and apparently it needs 5.11.0.
                        Do you know a solution for the qgeomap bug?

                        sierdzioS 1 Reply Last reply
                        0
                        • C chek

                          @sierdzio
                          Thank you so much for the reply, I think i'm also seeing the issue with qgeomap when doing 'make install' for 5.11.0. I'm trying to build qgroundcontrol for the raspberry and apparently it needs 5.11.0.
                          Do you know a solution for the qgeomap bug?

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

                          @chek said in Qt on Raspberry pi3:

                          @sierdzio
                          [...]
                          Do you know a solution for the qgeomap bug?

                          Not yet, but I will check it out.

                          I don't see it reported on Qt bugtracker yet.

                          (Z(:^

                          1 Reply Last reply
                          1
                          • C Offline
                            C Offline
                            chek
                            wrote on last edited by
                            #13

                            Hi, I've compiled 5.10.1 for the pi and it works, but when I try to open the qt-project qt-creator complains about my compiler: Unsuported Linux toolchain, only GCC 32- or 64-bit is supported.
                            I'm using "gcc-linaro-5.5.0-2017.10-x86_64_arm-linux-gnueabihf"
                            Do you know what this could be?

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

                              Have you added the linaro compiler in Qt Creator's settings?

                              (Z(:^

                              1 Reply Last reply
                              0
                              • C Offline
                                C Offline
                                chek
                                wrote on last edited by
                                #15

                                Yes,I've created a rpi kit, where I've added a gcc compiler for C and C++ which points to the linaro compiler I used when compiled the qt sources

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

                                  Hm so it should work. Please check if the kit really points to your cross-compiled Qt. I've made a mistake of not checking that many times already :D And Qt Creator seems to auto-set the Qt version wrongly sometimes.

                                  (Z(:^

                                  1 Reply Last reply
                                  2
                                  • sierdzioS sierdzio

                                    Well, compilation works for 5.10, 5.9 - they simply compile and work. With Qt 5.11.1, I've just tried and there seems to be a bug in QGeoMap.

                                    If you want to try with 5.10:
                                    You have to set up your toolchain and sysroot correctly, though. Follow the guide https://wiki.qt.io/RaspberryPi2EGLFS and you should be fine.

                                    Remember to get all the dependencies and to run the symlink fix afterwards. You may throw in some extra libs just to be sure:

                                    sudo apt build-dep qt5-default qt5-qmake
                                    sudo apt install libiconv-hook-dev libinput-dev libts-dev bluez libbluetooth-dev libgstreamer1.0-dev libegl1-mesa
                                    
                                    # Optionally if it somehow still does not work:
                                    sudo apt install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev
                                    

                                    And turn on OpenGL driver in raspi-config,

                                    Here is my compilation script, if it helps:

                                    export QTVER=5101
                                    wget https://download.qt.io/official_releases/qt/5.10/5.10.1/single/qt-everywhere-src-5.10.1.tar.xz
                                    tar -xaf qt-everywhere-src-5.10.1.tar.xz
                                    mv qt-everywhere-src-5.10.1 $QTVER-src
                                    cd $QTVER-build
                                    
                                    ../$QTVER-src/configure -release -opengl es2 -device linux-rasp-pi3-vc4-g++ \
                                    -device-option CROSS_COMPILE=/path/to/toolchain/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /path/to/sysroot \
                                    -opensource -confirm-license -make libs -no-use-gold-linker \
                                    -prefix /home/pi/qt/$QTVER -extprefix /path/to/qt-pi/$QTVER \
                                    -hostprefix /path/to/$QTVER-qmake \
                                    -skip qtserialbus -skip qtscxml -skip qtscript -skip qtcharts -skip qt3d \
                                    -skip qtdatavis3d -skip qtcanvas3d -skip qtgamepad -skip qtvirtualkeyboard \
                                    -skip qtwayland -skip qtwebengine -skip qtwebchannel -skip qtwebglplugin \
                                    -skip qtwebsockets
                                    
                                    make -j 8
                                    
                                    make install
                                    
                                    R Offline
                                    R Offline
                                    ronpetit
                                    wrote on last edited by
                                    #17

                                    @sierdzio I successfully compile Qt 5.10.1 on my raspberry pi 3 using the device "linux-rasp-pi3-vc4-g++", however, after activating the OPENGL driver on raspi-cofnig, when running the qopenglwidget example, it shows the error "Failed to create service, already in use?", I checked on the internet and everybody suggest to disable the vc4 drivers to get rid of the error, however, if I do that the eglfs will complain that it cannot find any GBM, and indeed, I compile it to use those drivers, any idea how can I fix that?

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

                                      Do you have X server running (Raspbian GUI) when you launch the example? If so, don't. Start the app directly from command line, without the X server. Not sure if it will help, but maybe.

                                      I have not encountered that error myself.

                                      (Z(:^

                                      R 1 Reply Last reply
                                      0
                                      • sierdzioS sierdzio

                                        Do you have X server running (Raspbian GUI) when you launch the example? If so, don't. Start the app directly from command line, without the X server. Not sure if it will help, but maybe.

                                        I have not encountered that error myself.

                                        R Offline
                                        R Offline
                                        ronpetit
                                        wrote on last edited by
                                        #19

                                        @sierdzio I'm running it without X server, as I should

                                        Now, I'm curious about this, what libs are you using for glesv2 and egl?, I'm using the ones in /opt/vc/lib folder, and I also cross compiled the Qt with those

                                        sierdzioS 1 Reply Last reply
                                        0
                                        • R ronpetit

                                          @sierdzio I'm running it without X server, as I should

                                          Now, I'm curious about this, what libs are you using for glesv2 and egl?, I'm using the ones in /opt/vc/lib folder, and I also cross compiled the Qt with those

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

                                          @ronpetit said in Qt on Raspberry pi3:

                                          @sierdzio I'm running it without X server, as I should

                                          Now, I'm curious about this, what libs are you using for glesv2 and egl?, I'm using the ones in /opt/vc/lib folder, and I also cross compiled the Qt with those

                                          Oh I don't remember to be honest. I think I didn't change anything from stock settings. I also didn't specify the OpenGL libs manually anywhere when building Qt or apps.

                                          (Z(:^

                                          1 Reply Last reply
                                          1

                                          • Login

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