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 5.12.2 Raspberry Pi X11
QtWS25 Last Chance

Qt 5.12.2 Raspberry Pi X11

Scheduled Pinned Locked Moved Solved Mobile and Embedded
19 Posts 8 Posters 7.1k 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.
  • L Offline
    L Offline
    Lashc
    wrote on 20 Mar 2019, 05:13 last edited by
    #1

    Hi all,

    I recently cross-compiled Qt 5.12.2 to my Raspberry Pi 3 B+ from a Linux Mint machine, but I've learned that I don't want to use EGLFS. Currently, I can only run my application using EGLFS as the platform, but I want to run my application as a standard X11 application. I've tried using xcb as a platform, but my Raspberry Pi cannot find this platform. In addition, when I try to run the configure script with options -no-eglfs -qt-xcb -xcb, I get the following error:
    ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.

    This is the full command I'm using:
    ./configure -release -no-eglfs -qt-xcb -xcb -device linux-rasp-pi3-g++ -device-option CROSS_COMPILE=~/raspi/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot ~/raspi/sysroot -opensource -confirm-license -make libs -prefix /usr/local/qt5pi -extprefix ~/raspi/qt5pi -hostprefix ~/raspi/qt5 -no-use-gold-linker -v -no-gbm

    I've been searching forums and tutorials and cannot seem to figure out how to accomplish my goal, so I'd greatly appreciate any help I can get!

    1 Reply Last reply
    0
    • S Offline
      S Offline
      sierdzio
      Moderators
      wrote on 20 Mar 2019, 06:05 last edited by
      #2

      @Lashc said in Qt 5.12.2 Raspberry Pi X11:

      -no-eglfs -qt-xcb -xcb

      No need to put it here, XCB is built by default even if you don't specify it.

      ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed.

      You need to install all missing dependencies. These should do it:

      sudo apt-get build-dep qt4-x11
      sudo apt-get build-dep libqt5gui5
      sudo apt-get install libudev-dev libinput-dev libts-dev libxcb-xinerama0-dev libxcb-xinerama0
      

      (Z(:^

      1 Reply Last reply
      2
      • L Offline
        L Offline
        Lashc
        wrote on 20 Mar 2019, 22:10 last edited by
        #3

        I've installed those dependencies, updated my sysroot, and recompiled Qt, but I still cannot run my application using XCB. The configure script continues to produce these lines:

        X11 specific:
            XLib ................................. no
            XCB Xlib ............................. no
            EGL on X11 ........................... no
        

        And just to be clear, I'm compiling Qt on my Linux machine and then transferring the resulting files to my Raspberry Pi. What else can I try?

        J 1 Reply Last reply 21 Mar 2019, 07:45
        0
        • S Offline
          S Offline
          sierdzio
          Moderators
          wrote on 21 Mar 2019, 06:06 last edited by
          #4

          I've checked my build scripts and came up with a few more dependencies. Now, these are probably too many, but maybe they will help:

          sudo apt-get build-dep qt5-default
          sudo apt-get install libiconv-hook-dev libinput-dev libts-dev bluez libbluetooth-dev libgstreamer1.0-dev libegl1-mesa
          sudo apt-get install "^libxcb.*" libx11-xcb-dev libglu1-mesa-dev libxrender-dev libatspi2.0-dev libdbus-1-dev
          

          (Z(:^

          1 Reply Last reply
          2
          • L Lashc
            20 Mar 2019, 22:10

            I've installed those dependencies, updated my sysroot, and recompiled Qt, but I still cannot run my application using XCB. The configure script continues to produce these lines:

            X11 specific:
                XLib ................................. no
                XCB Xlib ............................. no
                EGL on X11 ........................... no
            

            And just to be clear, I'm compiling Qt on my Linux machine and then transferring the resulting files to my Raspberry Pi. What else can I try?

            J Offline
            J Offline
            jsulm
            Lifetime Qt Champion
            wrote on 21 Mar 2019, 07:45 last edited by
            #5

            @Lashc To add to @sierdzio : you can add -v parameter to configure - you will then see what exactly is missing (headers/libs).

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

            1 Reply Last reply
            3
            • L Offline
              L Offline
              Lashc
              wrote on 21 Mar 2019, 23:08 last edited by
              #6

              @sierdzio I've installed those dependencies and still can't run the application under X11. @jsulm When I run configure with that option, the only thing that I could find that may be a problem is this:

              Trying source 0 (type pkgConfig) of library xkbcommon ...
              + PKG_CONFIG_SYSROOT_DIR=/home/christian/raspi/sysroot PKG_CONFIG_LIBDIR=/home/christian/raspi/sysroot/usr/lib/pkgconfig:/home/christian/raspi/sysroot/usr/share/pkgconfig:/home/christian/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors xkbcommon '>=' 0.5.0
              + PKG_CONFIG_SYSROOT_DIR=/home/christian/raspi/sysroot PKG_CONFIG_LIBDIR=/home/christian/raspi/sysroot/usr/lib/pkgconfig:/home/christian/raspi/sysroot/usr/share/pkgconfig:/home/christian/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion xkbcommon '>=' 0.5.0
              > 0.7.1
              + PKG_CONFIG_SYSROOT_DIR=/home/christian/raspi/sysroot PKG_CONFIG_LIBDIR=/home/christian/raspi/sysroot/usr/lib/pkgconfig:/home/christian/raspi/sysroot/usr/share/pkgconfig:/home/christian/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L xkbcommon '>=' 0.5.0
              > -L/home/christian/raspi/sysroot/usr/lib/arm-linux-gnueabihf
              + PKG_CONFIG_SYSROOT_DIR=/home/christian/raspi/sysroot PKG_CONFIG_LIBDIR=/home/christian/raspi/sysroot/usr/lib/pkgconfig:/home/christian/raspi/sysroot/usr/share/pkgconfig:/home/christian/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l xkbcommon '>=' 0.5.0
              > -lxkbcommon
              + PKG_CONFIG_SYSROOT_DIR=/home/christian/raspi/sysroot PKG_CONFIG_LIBDIR=/home/christian/raspi/sysroot/usr/lib/pkgconfig:/home/christian/raspi/sysroot/usr/share/pkgconfig:/home/christian/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags xkbcommon '>=' 0.5.0
              xkbcommon/xkbcommon.h not found in [] and global paths.
                => source produced no result.
              test config.qtbase_gui.libraries.xkbcommon FAILED
              

              This sticks out to me because running configure with the -qt-xcb option gives me "ERROR: Feature 'xcb' was enabled, but the pre-condition 'features.thread && features.xkbcommon && libs.xcb' failed." If I run configure without this option, that error does not appear. Also, the libqxcb.so file is missing from /plugins/platforms in my Qt directory on the Raspberry Pi.

              1 Reply Last reply
              0
              • S Offline
                S Offline
                sierdzio
                Moderators
                wrote on 22 Mar 2019, 06:25 last edited by
                #7

                @sierdzio said in Qt 5.12.2 Raspberry Pi X11:

                sudo apt-get install "^libxcb.*"

                This line should have installed libxcb. Weird! Last time I tried, I think I was compiling Qt 5.10.1. Try with that version perhaps? More importantly, though - make sure you update your sysroot after installing all these new dependencies.

                (Z(:^

                L 1 Reply Last reply 22 Mar 2019, 20:41
                2
                • S sierdzio
                  22 Mar 2019, 06:25

                  @sierdzio said in Qt 5.12.2 Raspberry Pi X11:

                  sudo apt-get install "^libxcb.*"

                  This line should have installed libxcb. Weird! Last time I tried, I think I was compiling Qt 5.10.1. Try with that version perhaps? More importantly, though - make sure you update your sysroot after installing all these new dependencies.

                  L Offline
                  L Offline
                  Lashc
                  wrote on 22 Mar 2019, 20:41 last edited by
                  #8

                  @sierdzio @jsulm Compiling Qt 5.10.1 instead did the trick! I don't think there's anything I'll miss from Qt 5.12. Thank you all so much!

                  1 Reply Last reply
                  0
                  • SGaistS Offline
                    SGaistS Offline
                    SGaist
                    Lifetime Qt Champion
                    wrote on 22 Mar 2019, 20:43 last edited by
                    #9

                    Hi,

                    Since Qt 5.12.1, xkbcommon is not provided anymore as all older platforms supported now provides that dependency.

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

                    L 1 Reply Last reply 23 Mar 2019, 23:11
                    1
                    • SGaistS SGaist
                      22 Mar 2019, 20:43

                      Hi,

                      Since Qt 5.12.1, xkbcommon is not provided anymore as all older platforms supported now provides that dependency.

                      L Offline
                      L Offline
                      Lashc
                      wrote on 23 Mar 2019, 23:11 last edited by
                      #10

                      @SGaist I checked to see if I have any xkbcommon packages installed on my Raspberry Pi, and I discovered the following ones:

                      libxkbcommon-dev, libxkbcommon-x11-0, libxkbcommon-x11-dev, and libxkbcommon0
                      

                      I tried to compile Qt 5.12.2 again, but I still received errors about xkbcommon and xcb.

                      1 Reply Last reply
                      0
                      • SGaistS Offline
                        SGaistS Offline
                        SGaist
                        Lifetime Qt Champion
                        wrote on 24 Mar 2019, 20:55 last edited by
                        #11

                        Which version are they ?

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

                        L 1 Reply Last reply 27 Mar 2019, 03:54
                        0
                        • Nikhilesh NN Offline
                          Nikhilesh NN Offline
                          Nikhilesh N
                          wrote on 25 Mar 2019, 04:39 last edited by
                          #12

                          This topic has garnered my interest, and I'll follow it from now. Getting to know very interesting revelations by the way, Samuel.

                          1 Reply Last reply
                          0
                          • SGaistS SGaist
                            24 Mar 2019, 20:55

                            Which version are they ?

                            L Offline
                            L Offline
                            Lashc
                            wrote on 27 Mar 2019, 03:54 last edited by
                            #13

                            @SGaist Here's a list of the packages and their respective versions:
                            libxkbcommon-dev: 0.7.1-2~deb9u1
                            libxkbcommon-x11-0: 0.7.1-2~deb9u1
                            libxkbcommon-x11-dev: 0.7.1-2~deb9u1
                            libxkbcommon0: 0.7.1-2~deb9u1

                            1 Reply Last reply
                            0
                            • H Offline
                              H Offline
                              hlmjr
                              wrote on 30 Mar 2019, 16:01 last edited by
                              #14

                              This is due to changes in Qt's configure system in 5.12+. Namely, commits like this one: https://github.com/qt/qtbase/commit/e80bf655e922e9864f8843b5e7bbb47019a6d95a

                              Anywhere there once was "include": "suchandsuch" inside a test that was changed to "headers": "suchandsuch" outside the test fails now when cross-compiling for Raspbian.

                              I'm in the process of trying to find and revert them all but have gotten stuck on the somewhat more complicated Xlib detection:

                              "xlib": {
                              	"label": "XLib",
                              	"test": {
                              		"main": [
                              			"Display *d = XOpenDisplay(NULL);",
                              			"XCloseDisplay(d);"
                              		]
                              	},
                              	"headers": "X11/Xlib.h",
                              	"sources": [
                              		{ "type": "makeSpec", "spec": "X11" }
                              	]
                              },
                              

                              It's that { "type": "makeSpec", "spec": "X11" } line that is failing. I'm not yet sure how to modify that one. Once I figure this out I'll open a bug and see if we can boil it down to a root cause. I'm sure the way I'm adjusting the configure.json isn't quite correct.

                              /ranton How changes that can break this on this level made their debut in an LTS is beyond me. /rantoff

                              1 Reply Last reply
                              3
                              • H Offline
                                H Offline
                                hlmjr
                                wrote on 31 Mar 2019, 03:01 last edited by
                                #15

                                As I suspected, I was going down the wrong path. The issue is QTBUG-74326, and resolved in this patch which is scheduled for Qt 5.12.3.

                                It doesn't seem to be a perfect fix as it corrects the system library detection for me but breaks linking QtWebEngine.

                                A 1 Reply Last reply 1 Apr 2019, 15:28
                                2
                                • H hlmjr
                                  31 Mar 2019, 03:01

                                  As I suspected, I was going down the wrong path. The issue is QTBUG-74326, and resolved in this patch which is scheduled for Qt 5.12.3.

                                  It doesn't seem to be a perfect fix as it corrects the system library detection for me but breaks linking QtWebEngine.

                                  A Offline
                                  A Offline
                                  Antiheld
                                  wrote on 1 Apr 2019, 15:28 last edited by
                                  #16

                                  @hlmjr said in Qt 5.12.2 Raspberry Pi X11:

                                  As I suspected, I was going down the wrong path. The issue is QTBUG-74326, and resolved in this patch which is scheduled for Qt 5.12.3.

                                  It doesn't seem to be a perfect fix as it corrects the system library detection for me but breaks linking QtWebEngine.

                                  I tried to apply the patch, however it changed nothing. Can you explain how you did it? There's no explanation online on how to apply such patches manually, only via git when having previously cloned the git repo. I wanted to apply it to the current source release (qt-everywhere-src-5.12.2), though.

                                  I myself am currently trying to cross-compile Qt 5.12.2 for Raspberry Pi 3 B+.
                                  Weirdly enough I have to configure with -device linux-rasp-pi-g++ to get EGLFS to work, might that be the problem?

                                  H 1 Reply Last reply 2 Apr 2019, 13:27
                                  0
                                  • A Antiheld
                                    1 Apr 2019, 15:28

                                    @hlmjr said in Qt 5.12.2 Raspberry Pi X11:

                                    As I suspected, I was going down the wrong path. The issue is QTBUG-74326, and resolved in this patch which is scheduled for Qt 5.12.3.

                                    It doesn't seem to be a perfect fix as it corrects the system library detection for me but breaks linking QtWebEngine.

                                    I tried to apply the patch, however it changed nothing. Can you explain how you did it? There's no explanation online on how to apply such patches manually, only via git when having previously cloned the git repo. I wanted to apply it to the current source release (qt-everywhere-src-5.12.2), though.

                                    I myself am currently trying to cross-compile Qt 5.12.2 for Raspberry Pi 3 B+.
                                    Weirdly enough I have to configure with -device linux-rasp-pi-g++ to get EGLFS to work, might that be the problem?

                                    H Offline
                                    H Offline
                                    hlmjr
                                    wrote on 2 Apr 2019, 13:27 last edited by
                                    #17

                                    @Antiheld True, it is difficult to get a patch from those changesets they way they're displayed in gerrit. I created one myself you can obtain from https://www.sky-meyg.com/downloads/rpi-qt5.12-configure.patch. Apply it with patch -p0 < rpi-qt5.12-configure.patch in your Qt source directory.

                                    A 1 Reply Last reply 2 Apr 2019, 17:21
                                    0
                                    • H hlmjr
                                      2 Apr 2019, 13:27

                                      @Antiheld True, it is difficult to get a patch from those changesets they way they're displayed in gerrit. I created one myself you can obtain from https://www.sky-meyg.com/downloads/rpi-qt5.12-configure.patch. Apply it with patch -p0 < rpi-qt5.12-configure.patch in your Qt source directory.

                                      A Offline
                                      A Offline
                                      Antiheld
                                      wrote on 2 Apr 2019, 17:21 last edited by
                                      #18

                                      @hlmjr Thank you for your quick answer!
                                      Weirdly enough it doesn't change anything for me. Maybe I'm doing something wrong.
                                      For now EGLFS will have to suffice, I guess.
                                      Thank you anyway!

                                      1 Reply Last reply
                                      0
                                      • S Offline
                                        S Offline
                                        silicon
                                        wrote on 18 Feb 2020, 13:57 last edited by
                                        #19

                                        @Lashc said in Qt 5.12.2 Raspberry Pi X11:

                                        12.2 to my Raspberry Pi 3 B+ f

                                        Hello,
                                        I'm also using same setup RPi 3B+ with Qt5.12.2
                                        facing the same issue with xcb.
                                        i've tried all above mentioned solutions nothing works for me.
                                        Could you solve the issue?

                                        Thanks in advance.

                                        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