Banana Pi / Arch Linux / libGLES Problems

When installing or removing packages via pacman/yaourt, I mostly got following issue:

ldconfig: libraries and in directory /usr/lib have same soname but different type.
ldconfig: libraries and in directory /usr/lib have same soname but different type.

That is caused by a conflict between the libraries from mesa/mesa-libgl and the resulting libs from the compiled sunxi-mali sources, see accelerated Mali GPU.

When installing new packages, the previous ldconfig issue appeared and I got following problem when using an application, that depends on GLES:

libEGL warning: DRI2: failed to open lima (search paths /usr/lib/xorg/modules/dri)
Error: eglCreateWindowSurface failed: 0x00003005
EGL Version: "1.4 (DRI2)"
EGL Vendor: "Mesa Project"
EGL Extensions: "EGL_MESA_configless_context EGL_KHR_surfaceless_context "

I had to do “sudo make install” in my sunxi-mali directory all the time after installing new packages to get the working libraries installed again. Not a comfortable solution. So let’s try, to fix this.

In the PKGBUILD for sunxi-mali, the libraries from sunxi-mali are installed in a sub-directory /usr/lib/mali. So let’s try to do the same (I assume, you have sunxi-mali cloned into $HOME/sunxi-mali)

cd $HOME/sunxi-mali
sudo mkdir /usr/lib/mali

Optionally we can update the header files now to avoid compiling problems later (see SNES emulation using RetroArch):

wget -O ./include/GLES2/gl2.h
wget -O ./include/GLES2/gl2ext.h

Now we install the header files and libraries to the appropriate directories:

chmod +x lib/mali/r3p0/armhf/framebuffer/
make config ABI=armhf VERSION=r3p0
sudo make -C include install
sudo make -C lib/mali prefix=/usr/ libdir='$(prefix)/lib/mali/' install

Add a mali.conf to /etc/

sudo sh -c 'echo "/usr/lib/mali" > /etc/'

Congratulations, if you now install or uninstall any package, you won’t get the previous mentioned ldconfig error but still be able to run GLES applications.

Leave a Reply

Your email address will not be published. Required fields are marked *