Cannot properly ./configure to install Qt with eglfs and opegles2 support.

Hello to everyone.
I’m Jeremias, from Argentina.
Recently I started working with the BBB and Qt software.
Tooks me a long time, but i finally be able to install it and make some tests.
But, i never can run an app using eglfs, when I run an Qt example project , i get:

Could not find the Qt platform plugin “eglfs” in “”

After a time, i see i never install so many things within the Qt installation, so i read a lot and i start over again.
But, in the ./configure step, i got this error:

My configure:

sudo ./configure -no-gcc-sysroot -device linux-beagleboard-g++ -device-option CROSS_COMPILE=/opt/gcc-linaro-7.5.0-2019.12-x86_64_armv8l-linux-gnueabihf/bin/armv8l-linux-gnueabihf- -sysroot /mnt/bbb-rootfs -opensource -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -no-openssl -opengl es2 -eglfs -v

Error:

ERROR: Feature ‘opengles2’ was enabled, but the pre-condition ‘config.win32 || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)’ failed.

ERROR: Feature ‘eglfs’ was enabled, but the pre-condition ‘!config.android && !config.darwin && !config.win32 && features.egl’ failed.

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

Config.log snippet:

Trying source 1 (type makeSpec) of library opengl_es2 …
None of [libGLESv2.so libGLESv2.a] found in [] and global paths.
None of [libEGL.so libEGL.a] found in [] and global paths.
None of [libIMGegl.so libIMGegl.a] found in [] and global paths.
None of [libsrv_um.so libsrv_um.a] found in [] and global paths.
=> source produced no result.

I’m really trying to fix it by myself, but i can’t, i don’t want to give up with this…

Thanks in advice for any reply.

For EGLS on the Beaglebone, I found this site to be useful:
https://elinux.org/BeagleBoneBlack/SGX_%2B_Qt_EGLFS_%2B_Weston#QtQuick_.2B_EGLFS

These previous posts might be helpful to you as well:
https://mail.google.com/mail/u/0/?tab=rm&ogbl#search/eglfs/FMfcgxwHNDCsxVdDfLbmTGZpHNmfxJPC

https://mail.google.com/mail/u/0/?tab=rm&ogbl#search/eglfs/FMfcgxwDqTfbHNjgxpDXtlXccKJmMgCS

For the error you are seeing, do you have the QMAKE environment variables set as the error suggests? The should point to your sysroot location:

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

Cheers,

Jon

Hi Jon, thank you for the reply.

Thanks for the link, the first may be useful later, when this works.
The mailing links, are unavailale for me.

About the QMAKE variables, I try to change the paths on qmake.conf within the beagleboard device folder, but i dont know if I’m doing it wrong or something else because the error doesn’t seem to change.

At least my configurations doesn’t aply to those empty [].
None of [libGLESv2.so libGLESv2.a] found in [] and global paths.

Do you know how to edit those paths inside the ./configure command line to be sure be applied?

Thanks for the link, the first may be useful later, when this works.
The mailing links, are unavailale for me.

Thank you very much for your time.

These should be set in the qmake.conf:
Ref:
https://wlhe.github.io/2018/01/Build-Qt5.10-for-Raspberry-PI3
https://doc.qt.io/qt-5/qmake-variable-reference.html

More References:
https://forum.qt.io/topic/71850/opengl-es2-cross-compile-for-beaglebone-black-using-os-debian-when-built-qt5-7-0/15
https://groups.google.com/g/beagleboard/c/Xx6NxdUkqAw/m/fNCXyFJXBwAJ

See Robert’s note about installing QT:
https://groups.google.com/forum/embed/?place=forum/beagleboard&showsearch=true&showpopout=true&showtabs=false&hideforumtitle=true&parenturl=https%3A%2F%2Fbeagleboard.org%2Fdiscuss#!searchin/beagleboard/qt$20egl|sort:date/beagleboard/hpgDq4pj0YQ/9NN-OIRUAQAJ

Cheers,

Jon

Have any of those been installed?

debian@beaglebone:~$ apt search libgles
Sorting... Done
Full Text Search... Done
  <SNIP>
libgles2/stable 1.1.0-1 armhf
  Vendor neutral GL dispatch library -- GLESv2 support

libgles2-mesa/unknown 19.1.6-1rcnee2~buster+20200513 armhf
  transitional dummy package

  <SNIP>

debian@beaglebone:~$ apt search libegl
Sorting... Done
Full Text Search... Done
  <SNIP>
libegl1/stable 1.1.0-1 armhf
  Vendor neutral GL dispatch library -- EGL support

  <SNIP>

If they are doing cross compiling from a remote host, then should they not be using the BB specific libs under sysroot and not the host OpenGL libs?

Jon

Hi Dennis, thanks for the reply.
This is the output of the apt search commands:

ubuntu@beaglebone:~$ apt search libgles
Sorting… Done
Full Text Search… Done
libgles1/bionic-updates,now 1.0.0-2ubuntu2.3 armhf [installed,automatic]
Vendor neutral GL dispatch library – GLESv1 support

libgles2/bionic-updates,now 1.0.0-2ubuntu2.3 armhf [installed,automatic]
Vendor neutral GL dispatch library – GLESv2 support

libgles2-mesa/bionic-updates 20.0.8-0ubuntu1~18.04.1 armhf
transitional dummy package

libgles2-mesa-dev/bionic-updates,now 20.0.8-0ubuntu1~18.04.1 armhf [installed]
free implementation of the OpenGL|ES 2.x API – development files

ubuntu@beaglebone:~$ apt search libegl
Sorting… Done
Full Text Search… Done
libegl-mesa0/bionic-updates,now 20.0.8-0ubuntu1~18.04.1 armhf [installed,automatic]
free implementation of the EGL API – Mesa vendor library

libegl1/bionic-updates,now 1.0.0-2ubuntu2.3 armhf [installed,automatic]
Vendor neutral GL dispatch library – EGL support

libegl1-mesa/bionic-updates 20.0.8-0ubuntu1~18.04.1 armhf
transitional dummy package

libegl1-mesa-dev/bionic-updates,now 20.0.8-0ubuntu1~18.04.1 armhf [installed]
free implementation of the EGL API – development files

Jon, i’ve looking the links you provided, in fact, i need how to make a configuration like this:

VC_LIBRARY_PATH = $$[QT_SYSROOT]/opt/vc/lib
VC_INCLUDE_PATH = $$[QT_SYSROOT]/opt/vc/include

QMAKE_LIBDIR_OPENGL_ES2 = $${VC_LIBRARY_PATH}
QMAKE_LIBDIR_EGL = $$QMAKE_LIBDIR_OPENGL_ES2
QMAKE_LIBDIR_OPENVG = $$QMAKE_LIBDIR_OPENGL_ES2

QMAKE_INCDIR_EGL =
$${VC_INCLUDE_PATH}
$${VC_INCLUDE_PATH}/interface/vcos/pthreads
$${VC_INCLUDE_PATH}/interface/vmcs_host/linux
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}

QMAKE_LIBS_OPENGL_ES2 = -lGLESv2
QMAKE_LIBS_EGL = -lEGL -lGLESv2
QMAKE_LIBS_OPENVG = -lEGL -lOpenVG -lGLESv2

I think, please correct me if i’m wrong, i need to change the in this folder:
sitara@workstation:/opt/qt5bbb/qt5/qtbase/mkspecs/devices/linux-beagleboard-g++$ ls
qmake.conf qmake.conf.bkup qmake.conf.edited qmake.conf.save qplatformdefs.h
(Some of those files are backup while i’m testing)

So, right now, my qmake.conf file is:

Extra stuff (OpenGL, DirectFB, …)

QMAKE_INCDIR_EGL =
QMAKE_LIBDIR_EGL =
QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL}

QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}

I try to fill those blanks with my paths, but no one works.

I think, i’m working with the wrong file, or using wrong paths.
Do i see changes in the config.log with differents paths?

I search inside the log and when it shows the EGL error, only notice me that cant found the libraries on [ ] , and thats all, a pair of empty square brackets.

Again, thanks for the replies, i’m very glad to have someone to ask and talk, every site or forum with this troubles has at least a few years of inactivity.

Jeremias.

I’ve tried to set this up and I am seeing a similar issue. I piped the output to tee and a log file and found it is not able to locate a lib which from what I can tell is there.

This is the configure statement I used:

./configure -no-gcc-sysroot -device linux-beagleboard-g++ -device-option CROSS_COMPILE=~/development/beaglbone/bbbuild/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf- -sysroot ~/development/beaglbone/bbbuild/sysroot -confirm-license -optimized-qmake -reduce-exports -release -make libs -prefix /usr/local/qt5bbb -extprefix /usr/local/qt5bbb -hostprefix /usr/local/qt5bbb -qt-zlib -qt-libpng -no-openssl -opengl es2 -eglfs -v |& tee ~/development/beaglbone/bbbuild/config-bbgr.log

This is what I see in the log file:

/home/jomodev/development/beaglbone/bbbuild/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/arm-linux-gnueabihf-g++ -mfloat-abi=hard --sysroot=/home/jomodev/development/beaglbone/bbbuild/sysroot -Wl,-O1 -o dbus main.o -L/home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/arm-linux-gnueabihf -ldbus-1 -lrt -lpthread -ldl

/home/jomodev/development/beaglbone/bbbuild/gcc-linaro-7.5.0-2019.12-x86_64_arm-linux-gnueabihf/bin/…/lib/gcc/arm-linux-gnueabihf/7.5.0/…/…/…/…/arm-linux-gnueabihf/bin/ld: warning: libsystemd.so.0, needed by /home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/arm-linux-gnueabihf/libdbus-1.so, not found (try using -rpath or -rpath-link)
/home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/arm-linux-gnueabihf/libdbus-1.so: undefined reference to sd_listen_fds@LIBSYSTEMD_209' /home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/arm-linux-gnueabihf/libdbus-1.so: undefined reference to sd_is_socket@LIBSYSTEMD_209’
collect2: error: ld returned 1 exit status
Makefile:69: recipe for target ‘dbus’ failed
make: *** [dbus] Error 1
=> source failed verification.
Trying source 1 (type inline) of library dbus …
=> source failed condition ‘config.win32’.
Trying source 2 (type inline) of library dbus …
dbus/dbus.h not found in [] and global paths.
=> source produced no result.

This seems to be what is causing the ending error for the ELS libs.

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

ERROR: Feature ‘opengles2’ was enabled, but the pre-condition ‘(config.win32 && !features.opengl-dynamic) || (!config.watchos && !features.opengl-desktop && libs.opengl_es2)’ failed.

ERROR: Feature ‘eglfs’ was enabled, but the pre-condition ‘!config.android && !config.darwin && !config.win32 && !config.wasm && features.egl’ failed.

ERROR: The OpenGL functionality tests failed!
You might need to modify the include and library search paths by editing QMAKE_INCDIR_OPENGL[_ES2],
QMAKE_LIBDIR_OPENGL[_ES2] and QMAKE_LIBS_OPENGL[_ES2] in the mkspec for your platform.

From what I can tell, the library is located in my sysroot:

$ ls -lt sysroot/lib/arm-linux-gnueabihf/libsystemd.so.0
lrwxrwxrwx 1 jomodev jomodev 20 May 9 10:08 sysroot/lib/arm-linux-gnueabihf/libsystemd.so.0 → libsystemd.so.0.25.0

Perhaps it is not looking under the sysroot/lib folder but I am not sure.

I did ensure the Opengl ES libs are installed on the Beaglebone and ran rsync to bring in the changes to sysroot and the add the lib and include ref in the qmake.conf file:
~/opt/qt5bb/qt-everywhere-src-5.15.1/qtbase/mkspecs/devices/linux-beagleboard-g++/qmake.conf

# Extra stuff (OpenGL, DirectFB, …)
QMAKE_INCDIR_EGL = '/home/jomodev/development/beaglbone/bbbuild/sysroot/usr/include’
QMAKE_LIBDIR_EGL = '/home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.1.0’

I’m not sure why it is failing for the libsystemd.so.0 but will continue to look.

Cheers,

Jon

I will try to reproduce your way to log the error, maybe can throw some light on this.
Thanks for your time. I really appreciate it.

Hi Dennis, thanks for the reply.
This is the output of the apt search commands:

  Okay, I'm out of ideas -- other than maybe burn a Debian image and try
the same builds from it...

Based upon the OP's response, they are building on a Beagle -- but that
Beagle is running a Ubuntu image (or have some other ARM-based build
environment).

Hi again.
Yes, the BBB is running Ubuntu 18.04 for Arm.
The workstation is running Ubuntu 18.04 too.

I think I can run the Debian image from the board memory, I have the SD with the Ubuntu distro and I don’t have other SD available rigth now.
I will try with that sysroot in a couple hours.
Thanks.

I have a Debian 9.13 Docker instance on Ubuntu 20.04 that I have been building so that might be an option. I could try a 64-bit Debian VirtualBox image but only have a 32-bit in place now. However, I am not seeing anything that would indicate it is an Ubuntu vs Debian thing but it is possible and the libsystemd.so.0 might be an indicator. I too have been using Ubuntu 18.04 for this exercise.

Cheers,

Jon

Jon, which version of Qt are you trying to build?

Qt 5.15.1 from source.

I’m working with 5.12.9, so I think isn’t a version issue either.

Yeah, I just downloaded 5.12.9 and tied that but got the same end result but more info in the log.
Also, I am following these two links and ensured both my Host and BB have the proper libs installed and such.
https://mechatronicsblog.com/cross-compile-and-deploy-qt-5-12-for-raspberry-pi/#comment-1706

https://wiki.qt.io/BeagleBone_Black_Beginners_Guide

Also, I have edits the qmake.conf and added the following but still no go:

QMAKE_LFLAGS += -Wl,-rpath-link,$$[QT_SYSROOT]/lib
# Extra stuff (OpenGL, DirectFB, …)
*QMAKE_INCDIR_EGL = $$[QT_SYSROOT]/usr/include *
*$$[QT_SYSROOT]/usr/include/GLES2 *
*$$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf *
$$[QT_SYSROOT]/usr/include/arm-linux-gnueabihf/bits

*QMAKE_LIBDIR_EGL = $$[QT_SYSROOT]/lib *
*$$[QT_SYSROOT]/usr/lib *
$$[QT_SYSROOT]/usr/lib/arm-linux-gnueabihf

QMAKE_INCDIR_OPENGL_ES2 = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENGL_ES2 = $${QMAKE_LIBDIR_EGL}
QMAKE_INCDIR_OPENVG = $${QMAKE_INCDIR_EGL}
QMAKE_LIBDIR_OPENVG = $${QMAKE_LIBDIR_EGL}

QMAKE_LIBS_EGL = -lEGL -lIMGegl -lsrv_um
QMAKE_LIBS_OPENGL_ES2 = -lGLESv2 $${QMAKE_LIBS_EGL}
QMAKE_LIBS_OPENVG = -lOpenVG $${QMAKE_LIBS_EGL}

DISTRO_OPTS += hard-float

No need for any special EGL device integration.

Prioritize the default, compiled-in integration over any plugins.

With 5.12.9 and all the libs and stuff in place, I now see this in the log file.

  • PKG_CONFIG_SYSROOT_DIR=/home/jomodev/development/beaglbone/bbbuild/sysroot PKG_CONFIG_LIBDIR=/home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/pkgconfig:/home/jomodev/development/beaglbone/bbbuild/sysroot/usr/share/pkgconfig:/home/jomodev/development/beaglbone/bbbuild/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 …
    None of [libIMGegl.so libIMGegl.a] found in [/home/jomodev/development/beaglbone/bbbuild/sysroot/lib /home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib /home/jomodev/development/beaglbone/bbbuild/sysroot/usr/lib/arm-linux-gnueabihf] and global paths.

I know gl2.h is in sysroot so perhaps there is a Path not set properly.

$ find sysroot/ -name "gl2.h"
sysroot/usr/include/GLES2/gl2.h

The adventure continues.

Cheers,

Jon

I don’t know how path vars work in this kind of files, but, if you see that file, at the start includes an linux.conf file, that file also make reference to the $varPaths whom we are trying to especify.

Yeah, I tried with Debian 9.13 64-bit and it still shows the same error for the OpenGL ES libs.

Must be missing something.

Jon