Closed mignon-p closed 4 years ago
Have a look in sfml-pi/cmake/Modules/FindGLES.cmake you will see that it references v1 of the library, you have v2 in your videocore libs.
you have v2 in your videocore libs.
How do I get v1? I installed the recommended libraries:
sudo apt-get install cmake libflac-dev libogg-dev libvorbis-dev libopenal-dev libjpeg8-dev libfreetype6-dev libudev-dev libraspberrypi-dev
I believe this may be related to Firmware issue #78 but I'm not sure why CMake outputs:
Found GLES: /opt/vc/lib/libGLESv1_CM.so
when it clearly isn't there. You can try to create a link to fool it as the functionality for v1 exists in v2 according to the comments.
@ppelleti I've just checked the firmware that I cloned from the raspberrypi/firmware repository the other day ... seems to have been updated on 22 Aug, ls -al on my version shows
Aug 26 22:03 libGLESv1_CM.so -> libGLESv2.so
but I also have some others that you don't have:
-rw-rw-r-- 1 <username> <username> 81551 Aug 26 22:03 libbcm_host.so
-rw-rw-r-- 1 <username> <username> 210148 Aug 26 22:03 libbrcmEGL.so
-rw-rw-r-- 1 <username> <username> 105580 Aug 26 22:03 libbrcmGLESv2.so
-rw-rw-r-- 1 <username> <username> 103542 Aug 26 22:03 libbrcmOpenVG.so
-rw-rw-r-- 1 <username> <username> 78367 Aug 26 22:03 libbrcmWFC.so
-rw-rw-r-- 1 <username> <username> 380007 Aug 26 22:03 libcontainers.so
-rw-rw-r-- 1 <username> <username> 15439 Aug 26 22:03 libdebug_sym.so
-rw-rw-r-- 1 <username> <username> 12742 Aug 26 22:03 libdebug_sym_static.a
-rw-rw-r-- 1 <username> <username> 48658 Aug 26 22:03 libdtovl.so
-rw-rw-r-- 1 <username> <username> 210148 Aug 26 22:03 libEGL.so
-rw-rw-r-- 1 <username> <username> 251410 Aug 26 22:03 libEGL_static.a
-rw-rw-r-- 1 <username> <username> 345611 Aug 26 22:03 libelftoolchain.so
lrwxrwxrwx 1 <username> <username> 12 Aug 26 22:03 libGLESv1_CM.so -> libGLESv2.so
-rw-rw-r-- 1 <username> <username> 105572 Aug 26 22:03 libGLESv2.so
-rw-rw-r-- 1 <username> <username> 100576 Aug 26 22:03 libGLESv2_static.a
-rw-rw-r-- 1 <username> <username> 13322 Aug 26 22:03 libkhrn_client.a
-rw-rw-r-- 1 <username> <username> 457824 Aug 26 22:03 libkhrn_static.a
-rw-rw-r-- 1 <username> <username> 75749 Aug 26 22:03 libmmal_components.so
-rw-rw-r-- 1 <username> <username> 86497 Aug 26 22:03 libmmal_core.so
-rw-rw-r-- 1 <username> <username> 15309 Aug 26 22:03 libmmal.so
-rw-rw-r-- 1 <username> <username> 89575 Aug 26 22:03 libmmal_util.so
-rw-rw-r-- 1 <username> <username> 44233 Aug 26 22:03 libmmal_vc_client.so
-rw-rw-r-- 1 <username> <username> 32974 Aug 26 22:03 libopenmaxil.so
-rw-rw-r-- 1 <username> <username> 103534 Aug 26 22:03 libOpenVG.so
-rw-rw-r-- 1 <username> <username> 3236 Aug 26 22:03 libvcfiled_check.a
-rw-rw-r-- 1 <username> <username> 29853 Aug 26 22:03 libvchiq_arm.so
-rw-rw-r-- 1 <username> <username> 107908 Aug 26 22:03 libvchostif.a
-rw-rw-r-- 1 <username> <username> 28342 Aug 26 22:03 libvcilcs.a
-rw-rw-r-- 1 <username> <username> 179839 Aug 26 22:03 libvcos.so
-rw-rw-r-- 1 <username> <username> 21213 Aug 26 22:03 libvcsm.so
-rw-rw-r-- 1 <username> <username> 78367 Aug 26 22:03 libWFC.so
drwxrwxr-x 2 <username> <username> 4096 Aug 26 22:03 pkgconfig
drwxrwxr-x 2 <username> <username> 4096 Aug 26 22:03 plugins
Okay, so I missed it the first time round, the source of the issue is sfml-pi/src/SFML/Graphics/CMakeLists.txt
which is looking for the GLES2 library ... but your issue is the same, you don't have libGLESv2.so or the link ... once you put both of those in /opt/vc/lib
you should be able to build successfully
OK, so I need to do that by manually copying files from the raspberrypi/firmware repository? (i. e. there isn't an apt package for it?)
Thanks! I'll try that when I get a chance.
I've taken the liberty of looking at rpi-update ... it just does the firmware, doesn't inlude the libs. I also had a look at pool/main/r/raspberrypi-firmware/libraspberrypi-dev_1.20170811-1_armhf.deb
which doesn't include much at all certainly not what you need. It looks like the dev package has either been broken or it's use case has been altered.
It took a long time but I tracked down the libraries you want in a package I've not come across before:
sudo apt-get install raspberrypi-firmware-nokernel
Hopefully this resolves the issue. It would be good to get some sort of explanation from the Raspbian team, I don't like the way they've changed this ... the package name seems less intuitive than it did before as -dev.
Pretty sure this issue has been resolved by updates to rpi-update. I just built several times from a new download of Stretch yesterday (after an rpi-update) and it built fine every time.
I've successfully built sfml-pi on Raspbian "jessie" in the past.
Today, I installed Raspbian "stretch" and tried to build sfml-pi on it.
It failed like this:
Any idea what I should do? Thanks!