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

Qt on Raspberry pi3

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
qt5.11raspberry pi 3xcbxcb opengl
20 Posts 7 Posters 11.0k Views 4 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.
  • C Offline
    C Offline
    chek
    wrote on 7 Jul 2018, 07:17 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
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 7 Jul 2018, 08:23 last edited by sierdzio 7 Jul 2018, 11:30
      #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 8 Jul 2018, 08:52
      2
      • S sierdzio
        7 Jul 2018, 08:23

        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 8 Jul 2018, 08:52 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?

        S 1 Reply Last reply 8 Jul 2018, 10:03
        0
        • C chek
          8 Jul 2018, 08:52

          @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?

          S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 8 Jul 2018, 10:03 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 10 Jul 2018, 10:04 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
            • S Offline
              S Offline
              sierdzio
              Moderators
              wrote on 10 Jul 2018, 10:18 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 10 Jul 2018, 11:28 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
                • S Offline
                  S Offline
                  sierdzio
                  Moderators
                  wrote on 10 Jul 2018, 11:30 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
                  • S sierdzio
                    7 Jul 2018, 08:23

                    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 20 Jul 2018, 19:58 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
                    • S Offline
                      S Offline
                      sierdzio
                      Moderators
                      wrote on 21 Jul 2018, 07:48 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 21 Jul 2018, 19:45
                      0
                      • S sierdzio
                        21 Jul 2018, 07:48

                        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 21 Jul 2018, 19:45 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

                        S 1 Reply Last reply 22 Jul 2018, 05:45
                        0
                        • R ronpetit
                          21 Jul 2018, 19:45

                          @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

                          S Offline
                          S Offline
                          sierdzio
                          Moderators
                          wrote on 22 Jul 2018, 05:45 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