Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/2] package/gcnano-binaries: create symlinks for libGLESv2 and libGLESv1_CM.so
@ 2022-08-04 20:41 Thomas Petazzoni via buildroot
  2022-08-04 20:41 ` [Buildroot] [PATCH 2/2] package/gcnano-binaries: set Version: field in .pc files Thomas Petazzoni via buildroot
  2022-08-05 16:33 ` [Buildroot] [PATCH 1/2] package/gcnano-binaries: create symlinks for libGLESv2 and libGLESv1_CM.so Yann E. MORIN
  0 siblings, 2 replies; 5+ messages in thread
From: Thomas Petazzoni via buildroot @ 2022-08-04 20:41 UTC (permalink / raw)
  To: buildroot; +Cc: kory.maincent, Jens Kleintje, Thomas Petazzoni

At least libepoxy, a user of OpenGL ES, expects libraries to be
available as libGLESv2.so.2 and libGLESv1_CM.so.1. While other OpenGL
implementations comply with this, gcnano-binaries does not, and
installs its libraries directly as .so, without any ABI version,
causing runtime failures with libepoxy or SDL2, as it tries to
dlopen() the OpenGL ES libraries with their ABI suffix.

See for example the libepoxy code:

  https://github.com/anholt/libepoxy/blob/master/src/dispatch_common.c#L191

Fix this issue by adding the relevant symlinks.

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/gcnano-binaries/gcnano-binaries.mk | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/gcnano-binaries/gcnano-binaries.mk b/package/gcnano-binaries/gcnano-binaries.mk
index dc309ec3c2..ce9b24cc3a 100644
--- a/package/gcnano-binaries/gcnano-binaries.mk
+++ b/package/gcnano-binaries/gcnano-binaries.mk
@@ -44,10 +44,17 @@ GCNANO_BINARIES_MODULE_MAKE_OPTS = \
 
 GCNANO_BINARIES_USERLAND_SUBDIR = gcnano-userland-multi-$(GCNANO_BINARIES_USERLAND_VERSION)
 
+# This creates:
+#   libGLESv2.so.2    -> libGLESv2.so
+#   libGLESv1_CM.so.1 -> libGLESv1_CM.so
+# symlinks, as most OpenGL implementations have them, and they are
+# expected by some users such as libepoxy.
 define GCNANO_BINARIES_INSTALL
 	cd $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/release/drivers/ ; \
 	find . -type f -exec $(INSTALL) -D -m 0755 {} $(1)/usr/lib/{} \; ; \
 	find . -type l -exec cp -a {} $(1)/usr/lib \;
+	ln -sf libGLESv2.so $(1)/usr/lib/libGLESv2.so.2
+	ln -sf libGLESv1_CM.so $(1)/usr/lib/libGLESv1_CM.so.1
 	mkdir -p $(1)/usr/include
 	cp -a $(@D)/$(GCNANO_BINARIES_USERLAND_SUBDIR)/release/include/* $(1)/usr/include/
 	ln -sf gbm/gbm.h $(1)/usr/include/gbm.h
-- 
2.37.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2022-08-06 13:40 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-08-04 20:41 [Buildroot] [PATCH 1/2] package/gcnano-binaries: create symlinks for libGLESv2 and libGLESv1_CM.so Thomas Petazzoni via buildroot
2022-08-04 20:41 ` [Buildroot] [PATCH 2/2] package/gcnano-binaries: set Version: field in .pc files Thomas Petazzoni via buildroot
2022-08-05 16:35   ` Yann E. MORIN
2022-08-06 13:40     ` Thomas Petazzoni via buildroot
2022-08-05 16:33 ` [Buildroot] [PATCH 1/2] package/gcnano-binaries: create symlinks for libGLESv2 and libGLESv1_CM.so Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox