raylib-python-cffi icon indicating copy to clipboard operation
raylib-python-cffi copied to clipboard

raspberry pi

Open alliraine opened this issue 2 years ago • 7 comments

When running raylib 4.5.0.0 I get this error:

Traceback (most recent call last): File "/home/alliana/bebbleberry/src/main.py", line 5, in <module> from pyray import * File "/home/alliana/.local/lib/python3.9/site-packages/pyray/__init__.py", line 15, in <module> from raylib import rl, ffi File "/home/alliana/.local/lib/python3.9/site-packages/raylib/__init__.py", line 15, in <module> from ._raylib_cffi import ffi, lib as rl ImportError: /home/alliana/.local/lib/python3.9/site-packages/raylib/_raylib_cffi.abi3.so: undefined symbol: eglGetProcAddress

I have tried to build manually along with installing via the wheel with no luck.

alliraine avatar Jul 05 '23 17:07 alliraine

OS Info

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"

alliraine avatar Jul 05 '23 17:07 alliraine

Do the example C programs that come with Raylib run correctly?

This apparently works on a Pi4: https://github.com/electronstudio/raylib-python-cffi/issues/102#issuecomment-1564132198

electronstudio avatar Jul 05 '23 18:07 electronstudio

Oh that worked! Amazing!

Now it still won't run because WARNING: GLFW: Error: 65550 Description: X11: Failed to open display but that's a different problem lol

alliraine avatar Jul 05 '23 19:07 alliraine

I now have a Pi Zero 2 so I could in theory do binary builds for Pi on it again. But I’m not sure how compatible they would be with other models of Pi, and even with different versions of the OS?

Anyone want this?

electronstudio avatar Dec 19 '23 00:12 electronstudio

Hi, I'm facing this issue too. I have tried building raylib myself, installing all the lib packages, adding linking arguments to make, but still getting this above issue. @electronstudio I'd definitely be open to trying your binaries?

JoeRourke123 avatar Dec 21 '23 21:12 JoeRourke123

I have rewritten the instructions for compiling on RPi:

https://electronstudio.github.io/raylib-python-cffi/RPI.html

Can you try that?

(there is one binary listed on that page you can try, but it's probably not compatible and I can't setup full CI to generate enough binaries for all systems).

electronstudio avatar Dec 22 '23 03:12 electronstudio

The actual original issue here seems to happen when you compile in DRM mode, you then need to add extra linker flags or else any Raylib program, including raylib-python-cffi, won't link/run. -lgbm -ldrm -lEGL

However DRM mode still doesn't work on my Pi. Maybe it will work on yours, but I remember people reported this to Raylib years ago and they just said they weren't going to fix it.

electronstudio avatar Dec 22 '23 04:12 electronstudio

I have published binary wheels for 5.0.0.2 (Raspberry Bullseye 64bit X11). I'd be interested to hear if they work.

electronstudio avatar Jun 10 '24 16:06 electronstudio