User avatar
cpcbegin
Posts: 201
Joined: Sun Mar 08, 2015 3:48 pm
Location: Costa del Sol, Spain
Contact: Website

Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 2:30 pm

I can't run a lot of games in new raspbian stretch, they worked OK in jessie:

Code: Select all

error while loading shared libraries: libGLESv2.so: cannot open shared object file: No such file or directory
I'm using a fresh instalation of latest debian stretch in a raspberry pi 2.
Some of the games than now doen't work are Maldita Castilla, Hurrican, Cubixmania, They need to be feed, etc...
Trucos y recetas para raspberry pi:
http://malagaoriginal.blogspot.com.es/search/label/raspberry%20pi

User avatar
rpiMike
Posts: 355
Joined: Fri Aug 10, 2012 12:38 pm
Location: Cumbria, UK

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 4:45 pm

I had a similar issue with 'The Little Crane That Could' :
Starting game from /home/pi/littlecrane-rpi
./littlecrane: error while loading shared libraries: libEGL.so: cannot open shared object file: No such file or directory
WARNING: the following commands could break your Raspbian install

I tried the following which didn't work for this game :

Code: Select all

sudo ln -s /usr/lib/arm-linux-gnueabihf/libEGL.so.1.0.0 /usr/lib/libEGL.so
sudo ln -s /usr/lib/arm-linux-gnueabihf/libGLESv2.so.2.0.0 /usr/lib/libGLESv2.so
Then copied the old libraries from a Raspbian Jessie install to my game folder and used :

Code: Select all

sudo ln -s ~/littlecrane-rpi/libEGL.so /usr/lib/libEGL.so
sudo ln -s ~/littlecrane-rpi/libGLESv2.so /usr/lib/libGLESv2.so
This worked for this game but subsequently broke my OpenGL setup and had to re-flash Raspbian Stretch.

runboy93
Posts: 306
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 4:56 pm

Maybe you could report this on github?

https://github.com/raspberrypi
Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

runboy93
Posts: 306
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 5:07 pm

Do you use VC4 or other driver (software renderer?), glxinfo? Or did you just do fresh install and tried instantly without update etc stuff?

I've seen lot of these errors in time when there were not experimental OpenGL added yet (2013-2015), searched Google.

http://mattyjwilliams.blogspot.fi/2013/ ... s-via.html

Read everything after this:
"Minecraft fails to start: something about a problem loading shared library libGLESv2.so"

I've tried search what is changed for OpenGL in Stretch, but failed to find anything dramatically changed stuff for it.
Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

User avatar
topguy
Posts: 3717
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 5:59 pm

If these games are made with the VC4 libraries then these has changed names in Stretch.
They now have "brcm" (Broadcom) in their names.

Code: Select all

pi@raspberrypi:/opt/vc/lib $ ls -l /opt/vc/lib/*brcm*
-rw-r--r-- 1 root root 202072 Jul  3 10:07 /opt/vc/lib/libbrcmEGL.so
-rw-r--r-- 1 root root 105768 Jul  3 10:07 /opt/vc/lib/libbrcmGLESv2.so
-rw-r--r-- 1 root root  99208 Sep 22  2016 /opt/vc/lib/libbrcmOpenVG.so
-rw-r--r-- 1 root root  78532 Jul  3 10:07 /opt/vc/lib/libbrcmWFC.so
You can create symbolic links to the old names.

Code: Select all

cd /opt/vc/lib
sudo ln -s libbrcmEGL.so libEGL.so
sudo ln -s libbrcmGLESv2.so libGLESv2.so
sudo ln -s libbrcmOpenVG.so libOpenVG.so
sudo ln -s libbrcmWFC.so libWFC.so
This might solve your problem but I dont know the games you talk about so cant be sure.

runboy93
Posts: 306
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 6:03 pm

This sounds nasty, so we have manually do this for each game?

That is just workaround, but really need to be fixed for next release(s), very strange nobody has done bug report yet to github, maybe still using Jessie?

And there is older topic:
viewtopic.php?f=66&t=191638

"However, doing an rpi-update did bring back the shared libs in /opt/vc.", most likely kernel 4.9.44 or 4.9.45 was used via rpi-update?
Last edited by runboy93 on Sun Aug 27, 2017 6:18 pm, edited 3 times in total.
Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

User avatar
topguy
Posts: 3717
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 6:14 pm

No you do it once, and that should fix a lot of the games that was built for Jessie.

Its not a bug, if the game was built for a previous version of an operating system there is never any guarantee that they will work on next version. Probrammers are not psychics.

runboy93
Posts: 306
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 6:32 pm

Fix could be apply by default, like for many different things was fixed in the past.
Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

User avatar
topguy
Posts: 3717
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 6:41 pm

Its a fix that potentially gives duplicate library names in "/opt/vc/lib" and "/usr/lib/arm-linux-gnueabihf/" (which was the case in Jessie) so the best fix is to compile the programs with correct unique library names.

User avatar
cpcbegin
Posts: 201
Joined: Sun Mar 08, 2015 3:48 pm
Location: Costa del Sol, Spain
Contact: Website

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sun Aug 27, 2017 7:25 pm

I try topguy solution and update the firmware but now I get a blinked white screen instead of the error message.
The games than stop working in new raspbian stretch are Maldita Castilla (Cursed Castille), Super Crate Box, They Need To Be Fed, Hurrican, CubixMania, and Air Hockey Arcade.
I didn't activate the experimental Open-GL acceleration.

It is a fresh install, but I ran:

Code: Select all

sudo apt-get update
sudo apt-get upgrade
sudo rpi-update
sudo apt-get install libgles2-mesa libsdl2-dev
The kernel is:
Linux raspberrypi 4.9.45-v7+ #1031 SMP Fri Aug 25 19:02:16 BST 2017 armv7l GNU/Linux

I also ask the issue to their respective creators in order to recompile their games.
Trucos y recetas para raspberry pi:
http://malagaoriginal.blogspot.com.es/search/label/raspberry%20pi

runboy93
Posts: 306
Joined: Tue Feb 28, 2017 1:17 pm
Location: Finland

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Thu Aug 31, 2017 11:46 am

https://github.com/RPi-Distro/firmware/issues/3 (closed)

So we have just to wait until software developers have fixed their libraries.
Aluminum case for Raspberry Pi 3
https://goo.gl/3QRuVw

RPi 3 tweaks by runboy93
https://goo.gl/o8grny

Chips
Posts: 188
Joined: Sat Aug 18, 2012 8:21 pm

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 04, 2017 11:40 am

Is this problem still there in latest raspbian stretch ?
Am i the only one who find it stupid that it's up to the developer to update the library name in their tool chain ?

The GLES and EGL optimized for broadcom should be the default one available in common place, not hidden somewhere...

User avatar
topguy
Posts: 3717
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 04, 2017 3:00 pm

Chips wrote:
Sat Nov 04, 2017 11:40 am
Is this problem still there in latest raspbian stretch ?
Only if you consider it a problem. I find the current situation better.
Am i the only one who find it stupid that it's up to the developer to update the library name in their tool chain ?
Probably not, but there are people that do not agree either. Its not uncommon for developers to update their software to support newer versions of OS. And its not like its a huge job.
The GLES and EGL optimized for broadcom should be the default one available in common place, not hidden somewhere...
Not really hidden if every guide/tutorial regarding GLES on Raspberry Pi points to "/opt/vc".

Chips
Posts: 188
Joined: Sat Aug 18, 2012 8:21 pm

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 04, 2017 4:27 pm

topguy wrote:
Sat Nov 04, 2017 3:00 pm
Only if you consider it a problem. I find the current situation better.
I should be stupid but... what makes it better ?
Note that i don't even understand why we need to keep MESA GLES implementation too.. who need this when we (should) have accelerated one :)
topguy wrote:
Sat Nov 04, 2017 3:00 pm
Probably not, but there are people that do not agree either. Its not uncommon for developers to update their software to support newer versions of OS. And its not like its a huge job.
It is not a quick job if you consider compatibility with others ARM boards which are more conventional for their GLES library name... even doing it in the "dirty way" (so breaking compatibility) would needs months before all developers do it (if they even care)...
Moreover i would not say theses modifications are needed for newer version of OS but for specific board (raspberry here). I mean debian stretch on others ARM boards doesn't have this issue, this is purely a raspberry choice breaking general GLES consensus ... so we are going another step further with specificity regarding GLES on raspberry which is not going in the good way in my opinions...

User avatar
topguy
Posts: 3717
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 04, 2017 6:59 pm

IMO having libraries with duplicate names are a worse solution, which was the case in Jessie.
Having unique names should make the transition easier when we get to the next big Raspbian release.

I may agree with your opinion on the Mesa libraries but I don't have the complete picture and the accelerated OpenGL drivers are still in testing. So having software OpenGL rendering should make more software packages work out of the box.

The Raspberry Pi are different from a lot of other ARM boards.

Chips
Posts: 188
Joined: Sat Aug 18, 2012 8:21 pm

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 04, 2017 7:47 pm

topguy wrote:
Sat Nov 04, 2017 6:59 pm
The Raspberry Pi are different from a lot of other ARM boards.
Yes but here we are talking about GLES which is a standardized interface, hence the SOC specificities should not interfere in this case (it's a pity that's even without this point it's already not true :( )...

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4748
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 04, 2017 8:43 pm

They're not compatible/interchangeable libraries. The source code of existing applications needs to be modified in order to use libbrcmGLESv2.so. 99.999% of software that links against libGLESv2.so won't work on the pi. Likewise, software written specifically for raspberry pi won't work with libGLESv2.so.

So we were in the situation that the only thing distinguishing these incompatible libraries was their path. Some software intended to work with the mesa driver would pick up the wrong library and fail and the same goes the other way. Software has no reliable way of knowing which library will be available on the system. With the accelerate open source drivers, the previously mentioned 99.999% of software actually has a chance of running and there's a clear distinction between the libraries. You can install neverball from the apt repo and it will just work without having to modify the source code. That's the direction we would like to move in.

If this still doesn't make sense, you can take a look at some of these issues:
https://jogamp.org/bugzilla/show_bug.cgi?id=1290
https://github.com/anholt/mesa/issues/24
https://github.com/raspberrypi/firmware/issues/625

User avatar
cpcbegin
Posts: 201
Joined: Sun Mar 08, 2015 3:48 pm
Location: Costa del Sol, Spain
Contact: Website

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 18, 2017 4:44 pm

Latest version of Retropie is still running under Debian Jessie because of this problem.
Trucos y recetas para raspberry pi:
http://malagaoriginal.blogspot.com.es/search/label/raspberry%20pi

ShiftPlusOne
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 4748
Joined: Fri Jul 29, 2011 5:36 pm
Location: The unfashionable end of the western spiral arm of the Galaxy

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Nov 18, 2017 5:11 pm

cpcbegin wrote: Latest version of Retropie is still running under Debian Jessie because of this problem.
I am sure the developers of retropie have heard about symlinks.

josephlee
Posts: 2
Joined: Wed Dec 06, 2017 10:10 pm

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Thu Dec 07, 2017 1:13 am

cpcbegin wrote:
Sun Aug 27, 2017 7:25 pm

Code: Select all

sudo apt-get install libgles2-mesa libsdl2-dev
This worked for me.

jdonald
Posts: 14
Joined: Fri Nov 03, 2017 4:36 pm

Re: Games that uses libGLESv2.so doen't work in raspbian stretch

Sat Dec 09, 2017 8:41 am

josephlee: installing the Mesa libs is sufficient for some programs, but that alone won't fix old software built on dispmanx.
cpcbegin wrote:
Sun Aug 27, 2017 7:25 pm
The games than stop working in new raspbian stretch are Maldita Castilla (Cursed Castille), Super Crate Box, They Need To Be Fed, Hurrican, CubixMania, and Air Hockey Arcade.
Here's an approach to run those three GameMaker games (Maldita Castilla, Super Crate Box, They Need to Be Fed).

1. If you've enabled the OpenGL driver on Stretch, disable the overlay by editing /boot/config.txt to comment out dtoverlay=vc4-kms-v3d, then reboot.
2. Then run any of these apps the same way the Minecraft Pi wrapper script does. For example:

Code: Select all

LD_LIBRARY_PATH=/opt/minecraft-pi/lib/brcm ./SuperCrateBox
Although this will put your system into a state lacking full OpenGL (and thus unable to run other games like Minecraft Java Edition), you can just as easily flip it back. I haven't tried littlecrane-rpi, but this might work there as well.

edit: However the two SDL2 Webfoot games (CubixMania and Air Hockey Arcade) with their modified SDL2 seem to attempt to load /opt/vc/lib/libGLESv2.so regardless (as revealed via strace). This is resolved with a subset of topguy's recommendation:

Code: Select all

cd /opt/vc/lib
sudo ln -s libbrcmEGL.so libEGL.so
sudo ln -s libbrcmGLESv2.so libGLESv2.so
At least that's safer than changing libraries under /usr/lib/arm-linux-gnueabihf/

Among the games listed by cpcbegin, Hurrican is the SDL 1.2 one which makes it amenable to mcrpi-wrapper. With full OpenGL+KMS enabled, run it like so:

Code: Select all

LD_PRELOAD=libbcm_host.so.1.0 LD_LIBRARY_PATH=/opt/minecraft-pi/lib/mesa ./hurrican

It would be cool to have Mesa EGL wrappers for the other apps too. Over time the Mesa driver could achieve performance that exceeds that of the old closed-source brcm one and we'd benefit even if the authors never update their software. It's no small task to support a LD_PRELOAD library like mcrpi-wrapper, but I do believe it to be possible in all these cases. I've written more about that elsewhere:

Return to “Gaming”

Who is online

Users browsing this forum: No registered users and 7 guests