Closed rwsfisker closed 2 years ago
"The problem" (or) "a possible fix" is to link against shared object libraylib.so which automatically pulls its dependent libraries via ldd BUT raylib-python-cffi/raylib/build.py is uses:
def get_the_lib_path():
return subprocess.run(['pkg-config', '--variable=libdir', 'raylib'], text=True,
stdout=subprocess.PIPE).stdout.strip()
[...]
extra_link_flags = [get_the_lib_path() + '/libraylib.a', ...]
So will only link against static library installation.
If instead it were:
def get_lib_flags():
return subprocess.run(['pkg-config', '--libs', 'raylib'], text=True,
stdout=subprocess.PIPE).stdout.strip().split()
[...]
extra_link_args = get_lib_flags() + [ ...]
Then it works (and is more in the spirit of pkg-config usage). This changes the behavior such that shared object libraylib.so works but does not fix / change the behavior of the static library usage.
I'm building to support DRM mode (for display on 3.5" TFT). Steps:
Build / install raylib DRM, Release, PIC:
Build / install raylib-python-cffi
Attempt to run example/shapes/shapes_logo_raylib.py
LD_PRELOAD of missing libraries FIXES