sdl2: programs using statically linked sdl2 libraries fail when initializing video
Details at https://github.com/utdemir/ghc-musl/issues/14#issuecomment-891353128.
In short, I have a simple SDL2 C++ program, compile it with static linking using
g++ -o testExe test.c `sdl2-config --cflags` -static `sdl2-config --static-libs`
and when run, it tries to load X11 and other libraries dynamically, fails and can't initialize video. Binary tested on several OSes, old and new.
I have no idea where the problem is, e.g., if the libraries can be somehow linked in statically or perhaps X11 should never be so, but if so, what to do to enable dynamic linking (while keeping SDL2 and other libraries statically linked), etc.
cc'ing: @Leo . (I was going to cc the maintainer here too (August Klein amatcoder@gmail.com), however he is probably not on GitLab).