MINGW-packages icon indicating copy to clipboard operation
MINGW-packages copied to clipboard

SDL2_mixer: build with default config flags

Open fabiangreffrath opened this issue 1 year ago • 14 comments

fabiangreffrath avatar Jul 15 '22 07:07 fabiangreffrath

This will enable support for playing Ogg files using stb_vorbis, support for playing FLAC files using dr_flac and support for playing MP3 files using dr_mp3.

Dependencies on external libraries are reduced accordingly.

fabiangreffrath avatar Jul 15 '22 07:07 fabiangreffrath

May I ask why this change is required? Or what is missing/disabled in current configuration? Some GNU/Linux distributions do include those dependencies.

  • Arch: https://archlinux.org/packages/extra/x86_64/sdl2_mixer/
  • Ubuntu: https://packages.ubuntu.com/jammy/libsdl2-mixer-2.0-0

Biswa96 avatar Jul 15 '22 13:07 Biswa96

SDL upstream has decided to switch to using embedded micro-libraries for the most populr formats by default instead of relying on third-party libraries. This change was introduced in the most-recent 2.6 release, I guess the Linux distributions have not adjusted their packaging yet. For us this means we can redistribute SDL-related libraries with our game engines without pulling a massive dependency chain behind us.

fabiangreffrath avatar Jul 15 '22 13:07 fabiangreffrath

Also, Linux distributions tend to avoid embedded libraries in favor of shared libraries to prevent mass-rebuilds of affected packages in case of security issues. Furthermore, SDL is mostly targeted at games and thus graphical desktop environments which usually have most audio format support libraries installed by means of e.g. media players, so the costs of pulling in these dependencies by SDL packages are negligible.

fabiangreffrath avatar Jul 15 '22 13:07 fabiangreffrath

Linux distributions tend to avoid embedded libraries in favor of shared libraries to prevent mass-rebuilds of affected packages in case of security issues.

That looks a valid reason to me. But opinions may vary. Let see what others think.

Biswa96 avatar Jul 15 '22 14:07 Biswa96

It would lessen the burden of rebuilds of sdl_mixer I suppose against the other libraries if one or more gets updated and something changes. But I'll refer to the others on this change

ZachBacon avatar Jul 15 '22 14:07 ZachBacon

Rebuilding a tiny < 1 MB package is not a big deal. package-grokker in CI already handles those. SDL2_mixer was rebuilt with other bigger packages also. For example,

  • Rebuilds for fluidsynth https://github.com/msys2/MINGW-packages/commit/12ffb0ad76e6c0487ccb24e895008f13f43b4a2d
  • Rebuilds for flac https://github.com/msys2/MINGW-packages/commit/6d696174d98fdbe65305a8bfd5bd9699d59cb381

Biswa96 avatar Jul 15 '22 14:07 Biswa96

Can we just get rid of the extra library dependencies, please?

fabiangreffrath avatar Jul 15 '22 14:07 fabiangreffrath

and for less package size.

Yeah, right, let's pull in additional library dependencies instead. 🤷

fabiangreffrath avatar Jul 15 '22 20:07 fabiangreffrath

I've asked upstream: https://github.com/libsdl-org/SDL_mixer/issues/427

lazka avatar Jul 17 '22 10:07 lazka

I've asked upstream: libsdl-org/SDL_mixer#427

I would recommend building with all codecs, using the built-in decoders as much as possible to minimize system dependencies.

fabiangreffrath avatar Jul 22 '22 08:07 fabiangreffrath

So, another three weeks have passed. What else is needed?

fabiangreffrath avatar Aug 12 '22 10:08 fabiangreffrath

Okay, so this is two months old now. You wanted to ask upstream, you got your reply from upstream recommending to go with the built-in codecs. What else is missing?

fabiangreffrath avatar Sep 15 '22 10:09 fabiangreffrath

Please do either apply this or close it with an explanation, but don't let people wait for months. Thanks!

fabiangreffrath avatar Oct 17 '22 07:10 fabiangreffrath