Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-66465

Unable to cross compile with EGLFS BRCM on Raspbian Stretch

    XMLWordPrintable

Details

    • Bug
    • Resolution: Duplicate
    • Not Evaluated
    • None
    • 5.9.4
    • None
    • Raspbian Stretch 2017-11-29 + rpi-update

    Description

      I successfully cross compiled many Qt5 versions on Raspbian Wheezy and Jessie, but Stretch changed the availability of OpenGL drivers by having two GL options:

      • Mesa VC4 driver (X11 dependent)
      • Broadcom proprietary drivers (/opt/vc)

      I need the BRCM EGFS cause I provide a headless solution without Xorg.

      I followed the instructions here: http://wiki.qt.io/RaspberryPi2EGLFS

      Item #14 is what should do the trick, but unfortunately it seems Qt is not looking in the right place. I keep on getting:

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

      Inspecting the config.tests/egl-brcm/Makefile shows the evidence:

      #############################################################################
      # Makefile for building: egl-brcm
      # Generated by qmake (3.1) (Qt 5.9.4)
      # Project: egl-brcm.pro
      # Template: app
      # Command: /home/dragon/projects/rpi/qt-everywhere-opensource-src-5.9.4/qtbase/bin/qmake -o Makefile egl-brcm.pro 'CONFIG -= qt debug_and_release app_bundle lib_bundle' 'CONFIG += shared use_gold_linker warn_off console single_arch' 'QMAKE_CFLAGS += --sysroot=/mnt/rpi-rootfs' 'QMAKE_CXXFLAGS += --sysroot=/mnt/rpi-rootfs' 'QMAKE_LFLAGS += --sysroot=/mnt/rpi-rootfs' -early 'CONFIG += cross_compile' 'LIBS += -L/mnt/rpi-rootfs/usr/lib/arm-linux-gnueabihf -lEGL' 'QMAKE_CFLAGS += -I/mnt/rpi-rootfs/usr/include/libdrm' 'QMAKE_CXXFLAGS += -I/mnt/rpi-rootfs/usr/include/libdrm' 'LIBS += -lbcm_host'
      #############################################################################

      It looks for headers and libs in /usr, instead of /opt/vc as requested in 

      qtbase/mkspecs/devices/linux-rasp-pi-g++/qmake.conf

      The configure command line I'm providing is this:

      ./configure -opengl es2 -qpa eglfs -device linux-rasp-pi-g++ -device-option CROSS_COMP
      ILE=$BDIR/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin/arm-linux-gnueabihf- -sysroot /mnt/rpi-rootfs -opensource -conf
      irm-license -optimized-qmake -reduce-exports -release -nomake tests -nomake examples -prefix /opt/qt5-rpi -no-pch -no-icu -gstreamer 1.0 -s
      kip qttools -skip qtwebengine -skip qtsensors -skip qtlocation -skip qtcanvas3d -skip qtxmlpatterns -skip qtcharts -skip qtdatavis3d

      Is there any obvious trick I'm missing or is there something wrong in the GL driver detection ?

      Attachments

        Issue Links

          No reviews matched the request. Check your Options in the drop-down menu of this sections header.

          Activity

            People

              buddenha Oswald Buddenhagen
              mcallegari79 Massimo Callegari
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Gerrit Reviews

                  There are no open Gerrit changes