[1.0.x->1.2.0 Beta] Official Linux builds - libsdl2 problems
Posted: Thu May 22, 2014 4:32 pm
The official Linux builds posted by DarkGod on te4.org currently dynamically link with a pre-2.0-release SDL2 Mercurial snapshot. Between when this snapshot was taken and the official SDL2 release, some visible function names have changed which are starting to cause issues with some Linux users.
Since SDL2 has been officially released, many major Linux distributions are now offering libsdl2 / libsdl2_image / libsdl2_ttf packages. These packages have a stable API, and this API is not 100% compatible with the API present in DarkGod's SDL2 2.0.0-beta Mercurial snapshot. If a user already has these SDL2 libraries installed by their package manager, and these libraries are found by the system before the libraries supplied by DarkGod, t-engine will choke.
I see two solutions to this problem. One is for DarkGod to statically link SDL2 with t-engine. The other is for DarkGod to update his SDL2 libraries to a stable release and do a clean rebuild of t-engine linking against the new libraries. This would let users use their system-supplied SDL2 libraries over those supplied in the t-engine distribution without an API clash.
Note that these function name changes do not require any immediate changes to the te4 code base. The old functions now exist as macros calling the new functions. Only a fresh set of SDL2 libraries/headers and a clean t-engine build are needed.
Relevant SDL2 API change for reference
Since SDL2 has been officially released, many major Linux distributions are now offering libsdl2 / libsdl2_image / libsdl2_ttf packages. These packages have a stable API, and this API is not 100% compatible with the API present in DarkGod's SDL2 2.0.0-beta Mercurial snapshot. If a user already has these SDL2 libraries installed by their package manager, and these libraries are found by the system before the libraries supplied by DarkGod, t-engine will choke.
I see two solutions to this problem. One is for DarkGod to statically link SDL2 with t-engine. The other is for DarkGod to update his SDL2 libraries to a stable release and do a clean rebuild of t-engine linking against the new libraries. This would let users use their system-supplied SDL2 libraries over those supplied in the t-engine distribution without an API clash.
Note that these function name changes do not require any immediate changes to the te4 code base. The old functions now exist as macros calling the new functions. Only a fresh set of SDL2 libraries/headers and a clean t-engine build are needed.
Relevant SDL2 API change for reference