gst1-plugins-base: pin GStreamer GL to the GLES2/EGL API
authorDaniel Golle <redacted>
Fri, 22 May 2026 19:21:32 +0000 (20:21 +0100)
committerDaniel Golle <redacted>
Mon, 1 Jun 2026 23:32:31 +0000 (00:32 +0100)
The 'gl_api' meson option was left at its 'auto' default, so the
GL plugin probed for desktop OpenGL. OpenWrt's Mesa is built with
-Dglx=disabled and -Dglvnd=disabled on every target, so it ships
no linkable desktop-GL library (no libGL.so, no gl.pc) - desktop
GL is only reachable through EGL. With nothing to satisfy the
probe in the sysroot, meson's cc.find_library('GL') fallback
escaped into the build host's /usr/lib and, on a host that has a
desktop libGL installed, put that foreign library on the link
line, breaking the cross link with:

  mold: fatal: /usr/lib/libGL.so: incompatible file type:
  riscv64 is expected but got x86_64

Pin -Dgl_api=gles2 and -Dgl_platform=egl to match what Mesa
actually provides (libGLESv2 + libEGL). This is correct on every
target, including x86_64: the desktop-GL link path was never
functional on OpenWrt and only ever "succeeded" by picking up a
host library.

Signed-off-by: Daniel Golle <redacted>
multimedia/gst1-plugins-base/Makefile

index f65e949a9c57847a0becf7c7a4659a64c2c60a34..b318228f4d05d69c2d5b12563becd7aa4ebd50aa 100644 (file)
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gst1-plugins-base
 PKG_VERSION:=1.26.4
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=gst-plugins-base-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=https://gstreamer.freedesktop.org/src/gst-plugins-base
@@ -139,6 +139,8 @@ MESON_ARGS += \
        $(call GST_COND_SELECT,encoding) \
        $(call GST_COND_SELECT,gio) \
        -Dgl=$(if $(CONFIG_PACKAGE_libgst1gl),en,dis)abled \
+       -Dgl_api=gles2 \
+       -Dgl_platform=egl \
        $(call GST_COND_SELECT,overlaycomposition) \
        $(call GST_COND_SELECT,pbtypes) \
        $(call GST_COND_SELECT,playback) \
git clone https://git.99rst.org/PROJECT