I have an application running on Yocto Zeus 3.0.1 with Qt5 and relies on OpenGL EGL. The application builds fine, but fails with the following message:
QXcbIntegration: Cannot create platform OpenGL context, neither GLX nor EGL are enabled
QXcbIntegration: Cannot create platform offscreen surface, neither GLX nor EGL are enabled
I have added all the needed OpenGL drivers in image .bb file:
IMAGE_INSTALL += "libegl-mesa libgl-mesa libegl-mesa-dev libgl-mesa-dev libgles3-mesa-dev mesa-megadriver"
The following is my qt5/qtbase_%.bbappend file.
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
PACKAGECONFIG_append = "gles2 mtdev sql-sqlite glib fontconfig gif accessibility"
PACKAGECONFIG_append = " widgets"
do_configure_prepend () {
cat >> ${S}/mkspecs/linux-oe-g++/qmake.conf <<EOF
# the below indentation is important - Soham
QMAKE_LIBS_EGL += -lEGL -ldl -lglib-2.0 -lpthread
QMAKE_LIBS_OPENGL_ES2 += -lGLESv2 -lgsl -lEGL -ldl -lglib-2.0 -lpthread
QMAKE_CFLAGS += -DLINUX=1 -DWL_EGL_PLATFORM -DEGL_API_FB=1
QMAKE_CXXFLAGS += -DLINUX=1 -DWL_EGL_PLATFORM -DEGL_API_FB=1
QT_QPA_DEFAULT_PLATFORM = xcb
load(qt_config)
EOF
}
I am building the application on the target itself. Therefore, I added the -dev files.
What am I missing here?