It's a question of which function calls are visible in the shared object. The old pre-release libraries that DG provides in the 1.0.0->1.1.5 official releases have SDL_MutexP and SDL_MutexV exposed as
functions. Newer, officially released SDL2 libraries have SDL_LockMutex and SDL_UnlockMutex
functions exposed in the shared object. So, you can't just drop in a newer shared object since there is an API clash. T-Engine expects to find SDL_mutexP/mutexV functions
dynamically. They are not present in the system libs, so t-engine crashes.
Now if t-engine is rebuilt against new headers, the existing t-engine SDL_mutexP/V calls would be turned into SDL_Lock/UnlockMutex function calls by the macros supplied by SDL. If new headers are not used, even if t-engine's codebase uses SDL_Lock/UnlockMutex directly, the issue is still the same! In the old headers/libs that DG uses, SDL_Lock/UnlockMutex calls were macros converted to mutexP/V function calls. There could be more instances of API conflicts like this, as there were a
lot of commits between DG's libsdl2 revision and the official 2.0.0 release.
Code:
$ nm -D t-engine4-linux64-1.2.0test11/lib64/libSDL2-2.0.so.0 | less
...
0000000000012e30 T SDL_LockAudio
0000000000012df0 T SDL_LockAudioDevice
0000000000096e00 T SDL_LockSurface (no LockMutex)
0000000000042630 T SDL_LockTexture
...
000000000003ac10 t SDL_MouseQuit
00000000000b81b0 T SDL_mutexP *
00000000000b8160 T SDL_mutexV *
0000000000012790 t SDL_NextAudioFormat
...
Code:
$ nm -D /usr/lib/x86_64-linux-gnu/libSDL2-2.0.so | less
...
0000000000044730 T SDL_LockAudio
0000000000044740 T SDL_LockAudioDevice
00000000000451b0 T SDL_LockMutex *
0000000000045d90 T SDL_LockSurface
0000000000045570 T SDL_LockTexture
...
0000000000044720 T SDL_MixAudioFormat
0000000000044bb0 T SDL_MouseIsHaptic
0000000000044b60 T SDL_NumHaptics (no mutexP/V)
0000000000044da0 T SDL_NumJoysticks
...