News for hackers. Stuff that matters.
Re:Static Linking Considered Harmful (2004) by Joker_vD on Monday September 28, 2020 @12:57PM (#24618726)
> For example, it is fairly reasonable to require LibSDL2 to be installed.

You mean, "the game's package has libsdl2 listed as a requirement"? Or "if you install the game without libsdl2 present, it will install, but will crash on launch"?

> However, if you bundle LibSDL2 with your app, you’re now directly dependent on things like X11 and ALSA.

Well, either those are present and the game will work, or you've tried to install the game on a headless server and surely you don't expect to miraculously just work?

Re:Static Linking Considered Harmful (2004) by klodolph on Monday September 28, 2020 @01:15PM (#24618951)
> You mean, "the game's package has libsdl2 listed as a requirement"? Or "if you install the game without libsdl2 present, it will install, but will crash on launch"?

Are you some kind of malevolent genie? Trying to figure out the worst possible user experience that corresponds to the words I wrote?

> Well, either those are present and the game will work, or you've tried to install the game on a headless server and surely you don't expect to miraculously just work?

The assumption here is that the only two options are either “X11+ALSA” or “headless”, and I don’t agree with that assumption. SDL2 on Linux has two video drivers and five audio drivers. Fact is, I can run horribly old Linux software that uses SDL for audio and it works fine, but old software that uses OSS or /dev/dsp is not going to work. With Wayland, I think it's not unreasonable to prefer a dependency on SDL over a direct dependency on X11.

Re:Static Linking Considered Harmful (2004) by Joker_vD on Monday September 28, 2020 @02:10PM (#24619587)
Oh, I think I understand your point now: there are old versions of SDL2 for old Linuxes, and more recent versions of SDL2 for modern Linuxes, and they use different Linux subsystems, but since they have the same API, any old software that used SDL2 still functions properly to modern Linux even though the low levels of the stack have changed dramatically.

Yes, that's a valid point actually. But ultimately it's a bet on what API will end up more durable: X11 or SDL2, isn't it?

Re:Static Linking Considered Harmful (2004) by klodolph on Monday September 28, 2020 @02:23PM (#24619754)
Yeah, it’s a bet on which API is more durable. Some other minor factors are that you might want a newer SDL anyway, because the library comes with a database of different models of gamepads (https://github.com/gabomdq/SDL_GameControllerDB) and if you link against SDL dynamically, you get support for newer gamepad models for “free”.

One of the other factors here is that the ability to play old games is in some sense about the preservation of culture. If you have an x64 Linux binary that uses SDL + OpenGL, I have a strong feeling that you’ll be able to play it 20 years from now, although it might inconvenient to get working.