Cannot get configure script to detect "EGLFS Rasberry Pi"
-
Hi,
I am trying to build Qt 5.12.1 natively on my Pi3B+ running the latest Raspbian Lite version, following theconfigure
parameters of this guide:PKG_CONFIG_LIBDIR=/usr/lib/arm-linux-gnueabihf/pkgconfig:/usr/share/pkgconfig \ /home/pi/qt-everywhere-src-5.12.1/configure \ -v \ -opengl es2 -eglfs \ -no-gtk \ -opensource -confirm-license -release \ -reduce-exports \ -force-pkg-config \ -nomake examples -no-compile-examples \ -skip qtwayland \ -skip qtwebengine \ -skip qtscript \ -no-feature-geoservices_mapboxgl \ -qt-pcre \ -no-pch \ -ssl \ -evdev \ -system-freetype \ -fontconfig \ -glib \ -prefix /opt/Qt5.12 \ -qpa eglfs \ QMAKE_CFLAGS="-march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8" \ QMAKE_CXXFLAGS="-march=armv8-a -mtune=cortex-a53 -mfpu=crypto-neon-fp-armv8" \ QMAKE_LIBS_EGL="-lbrcmEGL -lbrcmGLESv2" QMAKE_LIBS_OPENVG="-lbrcmEGL -lbrcmOpenVG -lbrcmGLESv2" \ QMAKE_LIBDIR_OPENGL_ES2=/opt/vc/lib QMAKE_INCDIR_OPENGL_ES2="/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface/vmcs_host/linux" \ QMAKE_LIBDIR_EGL=/opt/vc/lib QMAKE_INCDIR_EGL="/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface/vmcs_host/linux" \ QMAKE_LIBDIR_OPENVG=/opt/vc/lib QMAKE_INCDIR_OPENVG="/opt/vc/include /opt/vc/include/interface/vcos/pthreads /opt/vc/include/interface/vmcs_host/linux" \ -DEGLFS_DEVICE_INTEGRATION=eglfs_brcm
The Broadcom libraries are at installed:
/opt/vc/lib/libbrcmGLESv2.so /opt/vc/lib/libbrcmWFC.so /opt/vc/lib/libbrcmEGL.so /opt/vc/lib/libbrcmOpenVG.so
Yet, the
configure
script always returns: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 ............................ no EGLFS VSP2 ........................... no EGLFS Mali ........................... no EGLFS Raspberry Pi ................... no <-- NOT DETECTED EGLFS X11 ............................ yes LinuxFB ................................ yes
The parameters passed to the
configure
script seem to make sense, so why does it not work? -
@chadr
Thanks! I had to add-I /opt/vc/include
as well.At first, the verbose output of the
configure
step only showed:Trying source 0 (type inline) of library bcm_host ... None of [libbcm_host.so libbcm_host.a] found in [] and global paths. => source produced no result.
So, by looking at the
qtbase/src/gui/configure.json
file, it became clear that the error came from theegl-brcm
test defined therein:"egl-brcm": { "label": "Broadcom EGL (Raspberry Pi)", "type": "compile", "test": { "include": [ "EGL/egl.h", "bcm_host.h" ], "main": "vc_dispmanx_display_open(0);" }, "use": "egl bcm_host" },
Since I checked that I had all the headers and the library files, the solution of adding the -L and -I arguments to the
configure
script make much sense now.Thanks again!
-
@Diracsbracket Just add "-L /opt/vc/lib" to your configure command line.
When I build the qt5.12.0 on Raspbian, it was successful but qt5.12.0 wasn't.So, I have added the " -L /opt/vc/lib" in configure command line and it was ok.
-
@chadr
Thanks! I had to add-I /opt/vc/include
as well.At first, the verbose output of the
configure
step only showed:Trying source 0 (type inline) of library bcm_host ... None of [libbcm_host.so libbcm_host.a] found in [] and global paths. => source produced no result.
So, by looking at the
qtbase/src/gui/configure.json
file, it became clear that the error came from theegl-brcm
test defined therein:"egl-brcm": { "label": "Broadcom EGL (Raspberry Pi)", "type": "compile", "test": { "include": [ "EGL/egl.h", "bcm_host.h" ], "main": "vc_dispmanx_display_open(0);" }, "use": "egl bcm_host" },
Since I checked that I had all the headers and the library files, the solution of adding the -L and -I arguments to the
configure
script make much sense now.Thanks again!
-
Hello everyone!
I'm trying to cross-compile QT 5.12.1 to Rasperry PI 3, but I have a big issue. I'm following this guide https://wiki.qt.io/RaspberryPi2EGLFS but the configure script return: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 ............................ no
EGLFS VSP2 ........................... no
EGLFS Mali ........................... no
EGLFS Raspberry Pi ................... no <-- NOT DETECTED
EGLFS X11 ............................ yes
LinuxFB ................................ yenI tried also to modified the library name into qtbase/mspeck/devices/raspi/ as suggest Javier Bonilla in this tutorial https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/ but without any result.
"Note: In new Raspbian stretch versions, EGL libraries have different names than those assumed in Qt configuration files, so edit the ./qtbase/mkspecs/devices/linux-rasp-pi3-g++/qmake.conf file and substitute all references to -lEGL and -LGLESv2 for -lbrcmEGL and -lbrcmGLESv2, respectively. The linux-rasp-pi3-g++ folder applies to Raspberry Pi 3 version, if you have a different board version check the list of compatible devices which can be found in ./qtbase/mkspecs/devices. For further information have a look at Qt supported devices."
This is the config.log about opengl test:
looking for library opengl_es2
Trying source 0 (type pkgConfig) of library opengl_es2 ...- PKG_CONFIG_SYSROOT_DIR=/home/rasp/raspi/sysroot PKG_CONFIG_LIBDIR=/home/rasp/raspi/sysroot/usr/lib/pkgconfig:/home/rasp/raspi/sysroot/usr/share/pkgconfig:/home/rasp/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --exists --silence-errors glesv2
- PKG_CONFIG_SYSROOT_DIR=/home/rasp/raspi/sysroot PKG_CONFIG_LIBDIR=/home/rasp/raspi/sysroot/usr/lib/pkgconfig:/home/rasp/raspi/sysroot/usr/share/pkgconfig:/home/rasp/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --modversion glesv2
13.0.6
- PKG_CONFIG_SYSROOT_DIR=/home/rasp/raspi/sysroot PKG_CONFIG_LIBDIR=/home/rasp/raspi/sysroot/usr/lib/pkgconfig:/home/rasp/raspi/sysroot/usr/share/pkgconfig:/home/rasp/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-L glesv2
-L/home/rasp/raspi/sysroot/usr/lib/arm-linux-gnueabihf
- PKG_CONFIG_SYSROOT_DIR=/home/rasp/raspi/sysroot PKG_CONFIG_LIBDIR=/home/rasp/raspi/sysroot/usr/lib/pkgconfig:/home/rasp/raspi/sysroot/usr/share/pkgconfig:/home/rasp/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --libs-only-l glesv2
-lGLESv2
- PKG_CONFIG_SYSROOT_DIR=/home/rasp/raspi/sysroot PKG_CONFIG_LIBDIR=/home/rasp/raspi/sysroot/usr/lib/pkgconfig:/home/rasp/raspi/sysroot/usr/share/pkgconfig:/home/rasp/raspi/sysroot/usr/lib/arm-linux-gnueabihf/pkgconfig /usr/bin/pkg-config --cflags glesv2
header entry 'config.qtbase_gui.libraries.opengl_es2.headers.0' passed condition.
GLES2/gl2.h not found in [] and global paths.
=> source produced no result.
Trying source 1 (type makeSpec) of library opengl_es2 ...
Library path =/opt/vc/lib is invalid.
Library path =/opt/vc/lib is invalid.
None of [libGLESv2.so libGLESv2.a] found in [=/opt/vc/lib] and global paths.
=> source produced no result.
test config.qtbase_gui.libraries.opengl_es2 FAILED
Thanks a lot for any advice!
-
@Giulio-Dalla-Vecchia said in Cannot get configure script to detect "EGLFS Rasberry Pi":
.
Hi,
Have you got the solution for this?