Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with Raspberry PI 2 and Raspbian 11 (bullseye) #14

Closed
mbeckerle-xqueue opened this issue Feb 18, 2023 · 2 comments
Closed

Problem with Raspberry PI 2 and Raspbian 11 (bullseye) #14

mbeckerle-xqueue opened this issue Feb 18, 2023 · 2 comments

Comments

@mbeckerle-xqueue
Copy link

Hi,

I have been last using C++ when I was working at university 15 years ago, since that I had no need and I am really out of the topic. However, I found an interesting Project which uses OpenGL without X and I found this project but I used OpenGL last time when I was still a student (and not over C++), so forgive me if I am missing obvious connections.

I just installed Raspbian 11 (bullseye) and found nothing to work for me. After a lot of trial I got the thing compiled and under the desktop it even rendered a file but not over SSH connection. I tested and read and finally as I was finding mesa all the time, I wondered if I installed that. I just reinstalled the OS and made the following observations:

user@host:~ $ cat /etc/os-release
PRETTY_NAME="Raspbian GNU/Linux 11 (bullseye)"
NAME="Raspbian GNU/Linux"
VERSION_ID="11"
VERSION="11 (bullseye)"
VERSION_CODENAME=bullseye
ID=raspbian
ID_LIKE=debian
HOME_URL="http://www.raspbian.org/"
SUPPORT_URL="http://www.raspbian.org/RaspbianForums"
BUG_REPORT_URL="http://www.raspbian.org/RaspbianBugs"

First thing I found ist, that there is no directory "/opt/vc/lib"

user@host:~ $ ls /opt/
pigpio/      WidevineCdm/

Aparently it has been moved to /usr/lib/arm-linux-gnueabihf/ due to some postings I found and it seems correct. In that folder I see:

user@host:~ $ ls /usr/lib/arm-linux-gnueabihf/libEGL*
/usr/lib/arm-linux-gnueabihf/libEGL_mesa.so.0  /usr/lib/arm-linux-gnueabihf/libEGL_mesa.so.0.0.0  /usr/lib/arm-linux-gnueabihf/libEGL.so.1  /usr/lib/arm-linux-gnueabihf/libEGL.so.1.1.0

However, I read again mesa, which seems not to be working with this project, right?

I also found that in recent versions of Raspbian I need to use
-lGLESv2 instead -lbrcmGLESv2
-lEGL instead -lbrcmEGL

Probably I am heavily messing with libraries in "bullseye" but as I don't know how it is meant to be, can you maybe check what to do under fresh installed Raspbian 11 optimally over SSH as I do not have a monitor connected usually)?

@qwert666
Copy link

qwert666 commented Feb 19, 2023

I've just installed a lite "bullseyes" on a raspberry pi Zero 2 W, as I wanted to try out a setup with displaying OpenGL shaders to a led-matrix display.

After a fresh installed system you'll not have all the required drivers in place, but you can easily build them:

> git clone https://github.com/raspberrypi/userland.git
> cd userland
> sudo ./buildme

after this you'll have all the required and proper libs in place:

> ls /opt/vc/lib
libEGL.so        libGLESv2.so        libWFC.so       libbrcmGLESv2.so  libcontainers.so       libdtovl.so         libkhrn_static.a       libmmal_core.so       libopenmaxil.so  libvcilcs.a  pkgconfig
libEGL_static.a  libGLESv2_static.a  libbcm_host.so  libbrcmOpenVG.so  libdebug_sym.so        libelftoolchain.so  libmmal.so             libmmal_util.so       libvchiq_arm.so  libvcos.so   plugins
libGLESv1_CM.so  libOpenVG.so        libbrcmEGL.so  ...

switching between lbrcmGLESv2 and lGLESv2 doesn't make any difference for me, both works completely fine 🤔

@mbeckerle-xqueue
Copy link
Author

Thank you, Michal!
That was the missing link. For anyone reading this: after building userland, the files were available and compiling worked but I got another error:
./triangle: error while loading shared libraries: libbrcmEGL.so: cannot open shared object file: No such file or directory
I missed to set LD_LIBRARY_PATH so to solve it I just had to set:
LD_LIBRARY_PATH=/opt/vc/lib

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants