Skip to contentSkip to conversation

libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

PATCH New Vicente Olivert Riera 4 participants 8 messages Mar 22, 2017 – Apr 4, 2017

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

The --disable-egl configure option doesn't exist:

configure: WARNING: unrecognized options: [snip] --disable-egl

If you don't have EGL support the configure script will fail like this:

checking for EGL... no
configure: error: Package requirements (egl) were not met:

Also, libepoxy use dlsym to load a GLES2 library when EGL support is enabled, see src/dispatch_common.c:

So, OpenGL ES dependency is also mandatory.

Fixes:
http://autobuild.buildroot.net/results/3eca5ba26a521f6cc5a611309ba066472af7769c
http://autobuild.buildroot.net/results/cf9ec7da196d70548ae1413e4a3730314f6434d6
http://autobuild.buildroot.net/results/069b80101afc4719db6d6d41cf5fc923be21ddc0

---
Changes v1 -> v2:
- Add OpenGL ES dependency and modify commit log accordingly. (Thanks Romain)

---
 package/libepoxy/Config.in   | 10 +++++++---
 package/libepoxy/libepoxy.mk |  9 +--------
 2 files changed, 8 insertions(+), 11 deletions(-)
package/libepoxy/Config.in +7 -3
index c87366a..301e3ed 100644
@@ -1,12 +1,16 @@
 config BR2_PACKAGE_LIBEPOXY
 	bool "libepoxy"
 	select BR2_PACKAGE_XUTIL_UTIL_MACROS
-	depends on BR2_PACKAGE_HAS_LIBEGL || BR2_PACKAGE_HAS_LIBGL
+	# OpenGL EGL is mandatory and libepoxy uses dlsym to load a
+	# GLES2 library when EGL support is enabled. Details in
+	# src/dispatch/dispatch_common.c
+	depends on BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES
 	help
 	  Epoxy is a library for handling OpenGL function pointer
 	  management for you.
 
 	  https://github.com/anholt/libepoxy
 
-comment "libepoxy needs an OpenGL and/or OpenGL EGL backend"
-	depends on !BR2_PACKAGE_HAS_LIBEGL && !BR2_PACKAGE_HAS_LIBGL
+comment "libepoxy needs OpenGL EGL and OpenGL ES backends"
+	depends on !BR2_PACKAGE_HAS_LIBEGL
+	depends on !BR2_PACKAGE_HAS_LIBGLES
package/libepoxy/libepoxy.mk +1 -8
index be8c55e..4dbdefc 100644
@@ -9,17 +9,10 @@ LIBEPOXY_VERSION = $(LIBEPOXY_VERSION_MAJOR).1
 LIBEPOXY_SITE = http://ftp.gnome.org/pub/gnome/sources/libepoxy/$(LIBEPOXY_VERSION_MAJOR)
 LIBEPOXY_SOURCE = libepoxy-$(LIBEPOXY_VERSION).tar.xz
 LIBEPOXY_INSTALL_STAGING = YES
-LIBEPOXY_DEPENDENCIES = host-pkgconf xutil_util-macros
+LIBEPOXY_DEPENDENCIES = host-pkgconf libegl libgles xutil_util-macros
 LIBEPOXY_LICENSE = MIT
 LIBEPOXY_LICENSE_FILES = COPYING
 
-ifeq ($(BR2_PACKAGE_HAS_LIBEGL),y)
-LIBEPOXY_CONF_OPTS += --enable-egl
-LIBEPOXY_DEPENDENCIES += libegl
-else
-LIBEPOXY_CONF_OPTS += --disable-egl
-endif
-
 ifeq ($(BR2_PACKAGE_HAS_LIBGL)$(BR2_PACKAGE_XLIB_LIBX11),yy)
 LIBEPOXY_CONF_OPTS += --enable-glx
 LIBEPOXY_DEPENDENCIES += libgl xlib_libX11
Signature · 1 line
2.10.2
#1 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

Hello,

Quoted 14 lines · Vicente Olivert Riera

The --disable-egl configure option doesn't exist:

configure: WARNING: unrecognized options: [snip] --disable-egl

If you don't have EGL support the configure script will fail like this:

checking for EGL... no
configure: error: Package requirements (egl) were not met:

Also, libepoxy use dlsym to load a GLES2 library when EGL support is enabled, see src/dispatch_common.c:

So, OpenGL ES dependency is also mandatory.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/3eca5ba26a521f6cc5a611309ba066472af7769c
http://autobuild.buildroot.net/results/cf9ec7da196d70548ae1413e4a3730314f6434d6
http://autobuild.buildroot.net/results/069b80101afc4719db6d6d41cf5fc923be21ddc0

I would really like to hear about this patch from Gustavo. Gustavo, could you review/comment?

package/libepoxy/Config.in line 7

Quoted 4 lines
package/libepoxy/Config.in +4 -0
+	# OpenGL EGL is mandatory and libepoxy uses dlsym to load a
+	# GLES2 library when EGL support is enabled. Details in
+	# src/dispatch/dispatch_common.c
+	depends on BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES

New dependency -> don't forget to check the reverse dependencies of libepoxy:

package/libgtk3/Config.in: select BR2_PACKAGE_LIBEPOXY
package/x11r7/xdriver_xf86-video-amdgpu/Config.in: select BR2_PACKAGE_LIBEPOXY

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#2 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

Quoted 26 lines · Thomas Petazzoni

Hello,

Quoted 14 lines · Vicente Olivert Riera

The --disable-egl configure option doesn't exist:

configure: WARNING: unrecognized options: [snip] --disable-egl

If you don't have EGL support the configure script will fail like this:

checking for EGL... no
configure: error: Package requirements (egl) were not met:

Also, libepoxy use dlsym to load a GLES2 library when EGL support is enabled, see src/dispatch_common.c:

So, OpenGL ES dependency is also mandatory.

Quoted 8 lines

Fixes:
http://autobuild.buildroot.net/results/3eca5ba26a521f6cc5a611309ba066472af7769c
http://autobuild.buildroot.net/results/cf9ec7da196d70548ae1413e4a3730314f6434d6
http://autobuild.buildroot.net/results/069b80101afc4719db6d6d41cf5fc923be21ddc0

Quoted 8 lines

I would really like to hear about this patch from Gustavo. Gustavo, could you review/comment?

package/libepoxy/Config.in line 7

Quoted 4 lines
package/libepoxy/Config.in +4 -0
+	# OpenGL EGL is mandatory and libepoxy uses dlsym to load a
+	# GLES2 library when EGL support is enabled. Details in
+	# src/dispatch/dispatch_common.c
+	depends on BR2_PACKAGE_HAS_LIBEGL && BR2_PACKAGE_HAS_LIBGLES

Also, this should be two separate lines:

depends on BR2_PACKAGE_HAS_LIBEGL
depends on BR2_PACKAGE_HAS_LIBGLES

Regards,
Arnout

Quoted 11 lines

New dependency -> don't forget to check the reverse dependencies of libepoxy:

package/libgtk3/Config.in: select BR2_PACKAGE_LIBEPOXY
package/x11r7/xdriver_xf86-video-amdgpu/Config.in: select BR2_PACKAGE_LIBEPOXY

Best regards,

Thomas

Signature · 6 lines
Arnout Vandecappelle                          arnout at mind be
Senior Embedded Software Architect            +32-16-286500
Essensium/Mind                                http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium           BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint:  7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
#3 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

In reply to Thomas Petazzoni
Quoted 11 lines · Thomas Petazzoni
Quoted 11 lines

Also, libepoxy use dlsym to load a GLES2 library when EGL support is enabled, see src/dispatch_common.c:

So, OpenGL ES dependency is also mandatory.

Fixes:

http://autobuild.buildroot.net/results/3eca5ba26a521f6cc5a611309ba066472af7769c

http://autobuild.buildroot.net/results/cf9ec7da196d70548ae1413e4a3730314f6434d6

Quoted 8 lines
Quoted 5 lines

http://autobuild.buildroot.net/results/069b80101afc4719db6d6d41cf5fc923be21ddc0

I would really like to hear about this patch from Gustavo. Gustavo, could you review/comment?

Hi all.
According to my tests this isn't a hard requirement - libepoxy builds and works fine with just EGL, in fact a PoC is pretty easy, just clone
http://repo.or.cz/buildroot-gz.git/shortlog/refs/heads/desktop, make pc_x86_64_bios_wayland_defconfig, make menuconfig, disable GLES, build and the resulting image which is wayland-weston-midori (hence gtk3, plus some other gtk3 apps) works just fine.
And by looking at the source i don't see where in dispatch_common.c the lack of GLES errors out hard.
Regards.

#4 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

Hello,

Quoted 22 lines · Gustavo Zacarias
Quoted 11 lines · Thomas Petazzoni
Quoted 11 lines

Also, libepoxy use dlsym to load a GLES2 library when EGL support is enabled, see src/dispatch_common.c:

So, OpenGL ES dependency is also mandatory.

Fixes:

http://autobuild.buildroot.net/results/3eca5ba26a521f6cc5a611309ba066472af7769c

http://autobuild.buildroot.net/results/cf9ec7da196d70548ae1413e4a3730314f6434d6

Quoted 8 lines
Quoted 5 lines

http://autobuild.buildroot.net/results/069b80101afc4719db6d6d41cf5fc923be21ddc0

I would really like to hear about this patch from Gustavo. Gustavo, could you review/comment?

Quoted 9 lines

Hi all.
According to my tests this isn't a hard requirement - libepoxy builds and works fine with just EGL, in fact a PoC is pretty easy, just clone
http://repo.or.cz/buildroot-gz.git/shortlog/refs/heads/desktop, make pc_x86_64_bios_wayland_defconfig, make menuconfig, disable GLES, build and the resulting image which is wayland-weston-midori (hence gtk3, plus some other gtk3 apps) works just fine.
And by looking at the source i don't see where in dispatch_common.c the lack of GLES errors out hard.

Then what is your proposal to fix the build issues that this patch is trying to fix? The build log clearly points to missing EGL as being the issue:

checking for EGL... no
configure: error: Package requirements (egl) were not met:

Package egl was not found in the pkg-config search path. Perhaps you should add the directory containing `egl.pc' to the PKG_CONFIG_PATH environment variable Package 'egl', required by 'world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables EGL_CFLAGS
and EGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make[1]: *** [/home/buildroot/autobuild/run/instance-2/output/build/libepoxy-1.4.1/.stamp_configured] Error 1
make: *** [_all] Error 2
make: Leaving directory `/home/buildroot/autobuild/run/instance-2/buildroot'

Best regards,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#5 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

Quoted 62 lines · Thomas Petazzoni

Hello,

Quoted 22 lines · Gustavo Zacarias
Quoted 11 lines · Thomas Petazzoni
Quoted 11 lines

Also, libepoxy use dlsym to load a GLES2 library when EGL support is enabled, see src/dispatch_common.c:

So, OpenGL ES dependency is also mandatory.

Fixes:

http://autobuild.buildroot.net/results/3eca5ba26a521f6cc5a611309ba066472af7769c

http://autobuild.buildroot.net/results/cf9ec7da196d70548ae1413e4a3730314f6434d6

Quoted 8 lines
Quoted 5 lines

http://autobuild.buildroot.net/results/069b80101afc4719db6d6d41cf5fc923be21ddc0

I would really like to hear about this patch from Gustavo. Gustavo, could you review/comment?

Quoted 11 lines

Hi all.
According to my tests this isn't a hard requirement - libepoxy builds and works fine with just EGL, in fact a PoC is pretty easy, just clone
http://repo.or.cz/buildroot-gz.git/shortlog/refs/heads/desktop, make pc_x86_64_bios_wayland_defconfig, make menuconfig, disable GLES, build and the resulting image which is wayland-weston-midori (hence gtk3, plus
some other gtk3 apps) works just fine.
And by looking at the source i don't see where in dispatch_common.c the
lack of GLES errors out hard.

Then what is your proposal to fix the build issues that this patch is trying to fix? The build log clearly points to missing EGL as being the issue:

checking for EGL... no
configure: error: Package requirements (egl) were not met:

Package egl was not found in the pkg-config search path. Perhaps you should add the directory containing `egl.pc' to the PKG_CONFIG_PATH environment variable Package 'egl', required by 'world', not found

Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix.

Alternatively, you may set the environment variables EGL_CFLAGS
and EGL_LIBS to avoid the need to call pkg-config.
See the pkg-config man page for more details.
make[1]: *** [/home/buildroot/autobuild/run/instance-2/output/build/libepoxy-1.4.1/.stamp_configured] Error 1
make: *** [_all] Error 2
make: Leaving directory `/home/buildroot/autobuild/run/instance-2/buildroot'

Quoted 3 lines

Best regards,

Thomas

Hi Thomas.
The patch is mixing two different "issues":
1) It "fixes" that EGL support, without GLX, requires GLES, which isn't true.
2) It fixes the autobuilder failures that GLX requires EGL - which wasn't the case before (1.3.x versions). I need to consult upstream about this, my guess is that it's probably wrong since EGL isn't a hard requirement for GLX - GLX existed long before EGL did.

Regards.

#6 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

Hello,

Quoted 8 lines · Gustavo Zacarias

Hi Thomas.
The patch is mixing two different "issues":
1) It "fixes" that EGL support, without GLX, requires GLES, which isn't true.
2) It fixes the autobuilder failures that GLX requires EGL - which wasn't the case before (1.3.x versions). I need to consult upstream about this, my guess is that it's probably wrong since EGL isn't a hard requirement for GLX - GLX existed long before EGL did.

Has upstream spoken about this?

The build issue has been there for a long time, so I would really like to see it fixed.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com
#7 lore raw

PATCH v2 1/1 libepoxy: OpenGL EGL and OpenGL ES dependencies are mandatory

Quoted 13 lines · Thomas Petazzoni

Hello,

Quoted 8 lines · Gustavo Zacarias

Hi Thomas.
The patch is mixing two different "issues":
1) It "fixes" that EGL support, without GLX, requires GLES, which isn't true.
2) It fixes the autobuilder failures that GLX requires EGL - which wasn't the case before (1.3.x versions). I need to consult upstream about this, my guess is that it's probably wrong since EGL isn't a hard requirement for GLX - GLX existed long before EGL did.

Quoted 8 lines

Has upstream spoken about this?

The build issue has been there for a long time, so I would really like to see it fixed.

Thanks,

Thomas

Hi Thomas.
I haven't heard back from upstream on both pending points for libepoxy (clean solution for epoxy with mesa without x11) nor forcing EGL. IMO EGL isn't a hard requirement for X11 (GLX), i can rework the old patch for the new libepoxy and send another pull request to see what's up, though i was hoping upstream to clarify before being too annoying with pulls.
Regards.