community icon indicating copy to clipboard operation
community copied to clipboard

Proposal: Stick to a specific `SDL2`, `SDL_ttf`, `SDL_image`, `SDL_mixer` version or add a minimum supported one.

Open misl6 opened this issue 2 years ago • 0 comments

Is your feature request related to a problem? Please describe.

Currently, we don't specify a target or minimum supported version for the following dependencies on Linux and macOS:

  • SDL2
  • SDL_ttf
  • SDL_image
  • SDL_mixer

Or, at least, we specify a version, but only for the CI-generated wheels and Kivy.app builds.

That makes it hard to test changes or add new features exposed by newer versions of the SDL2 libraries ecosystem. (See: https://github.com/kivy/kivy/pull/7982 CI failure on Ubuntu Unittests)

Describe the solution you'd like

Is hard to force the contributors (or someone who wants to build from sources) to use a specific version, but at least we need to consider adding a "minimum supported version", which should be checked at the very beginning of the build process.

If system-provided dependencies are too old (as it's happening on the CI), or the developer wants to stick to the same exact version that we use in the CI, a build script for the non-python-packages dependencies could be exposed and documented.

We already maintain a build script for SDL2 dependencies as the CI-generated wheels and Kivy.app already makes use of a self-built version, so should not be an issue.

Describe alternatives you've considered

  1. (Could be the easiest one to maintain and to avoid some support requests) Force the contributors (or someone who wants to build from sources) to use a specific self-built library set that can be built via the build script. System-provided deps may be forced via KIVY_FORCE_SYSTEM_DEPS=1. That allows us to only target a specific version of the SDL2 library, and even use a patched/unreleased version if it contains a specific bugfix/feature.

  2. Do not specify a minimum supported version, but add guards to avoid using an unsupported feature.

Additional context

  • On macOS that situation may be unlikely, as in the docs we state to use brew or directly download and install the Framework. brew usually supports the latest stable version for all the supported macOS versions, and the Framework links could be easily updated.
  • On Windows, that's not an issue, as we provide our own version of sdl2 via kivy_deps
  • I love Linux distros, but Linux is where the headache starts. Unfortunately, the latest version of sdl2 libraries are only packaged and distributed (via the default package manager and sources) for the latest version of the OS. (Or at least, that happens on Ubuntu, e.g. 18.04 LTS is still on sdl2 2.0.8)

Update ⚠️ : We also release Kivy via Ubuntu PPA. If we choose to stick on sdl2>=2.0.20, only Ubuntu versions >=22.04LTS could be supported (unless we decide to vendor our version of sdl2).

misl6 avatar Aug 27 '22 13:08 misl6