I’m statically linking against libSDL and the following post has caught my attention:
http://choccyhobnob.com/raspberry-pi/sdl2-2-0-6-on-raspberry-pi/
The author says that SDL uses hardcoded paths for the Raspi graphics drivers and those paths don’t exist any longer on Stretch. Precisely, the author claims that these lines
#if SDL_VIDEO_DRIVER_RPI
/* Raspbian places the OpenGL ES/EGL binaries in a non standard path */
#define DEFAULT_EGL “/opt/vc/lib/libEGL.so”
#define DEFAULT_OGL_ES2 “/opt/vc/lib/libGLESv2.so”
#define DEFAULT_OGL_ES_PVR “/opt/vc/lib/libGLES_CM.so”
#define DEFAULT_OGL_ES "/opt/vc/lib/libGLESv1_CM.so
have to be changed into these:
#if SDL_VIDEO_DRIVER_RPI
/* Raspbian places the OpenGL ES/EGL binaries in a non standard path */
#define DEFAULT_EGL “/opt/vc/lib/libbrcmEGL.so”
#define DEFAULT_OGL_ES2 “/opt/vc/lib/libbrcmGLESv2.so”
#define DEFAULT_OGL_ES_PVR “/opt/vc/lib/libbrcmGLESv2.so”
#define DEFAULT_OGL_ES “/opt/vc/lib/libbrcmGLESv2.so”
So is it impossible to build a binary which works on both Jessie and Stretch? This would be very disappointing… I mean, SDL 2.0.6 is brand new… why doesn’t it take care of it and automatically uses the right paths in case the user is running Stretch?
Unfortunately, I’m still running Jessie here so I can’t test it on Stretch but according to the author of the blog I quoted above, it won’t work on Stretch because of the hardcoded paths… this is somewhat confusing. Can anybody shed some light onto this?