[Buildroot] [RFC 2/3] rpi-userland: fix opengl library symlinks

Thomas Petazzoni thomas.petazzoni at free-electrons.com
Sat Mar 25 14:25:07 UTC 2017


Hello,

On Wed, 22 Mar 2017 18:51:04 -0400, Gaël PORTAY wrote:

> > Ah, it uses dlopen() on specifically libEGL.so.1 and libOpenGLES.so.2,
> > OK. Then it makes sense. Maybe your patch should be submitted upstream
> > to rpi-userland?  
> 
> I am on it.
> 
> I made a PR on github.

As was said in https://github.com/raspberrypi/userland/pull/379, the PR
you have submitted changes the SONAME of the library, so any binary
already built against rpi-userland before your change will no longer
work after your change. Your suggestion to run ldconfig is irrelevant.

When you link against a library, the SONAME of this library gets
encoded into a NEEDED entry of the thing (program or library) that
links against this library. Then at runtime, the dynamic loader goes
through those NEEDED entries to load the shared libraries that the
program needs. So if the NEEDED entry of a program no longer points to
an existing library, you broke binary compatibility.

So maybe we simply need some symbolic links to be created:

 libEGL.so.1 -> libEGL.so
 libGLES.so.2 -> libGLES.so

This way, qt5webengine will be able to find the EGL/OpenGLES
implementation, but the rpi-userland libraries SONAME remains the same.

Best regards,

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com


More information about the buildroot mailing list