Bug#1123898: descent3: FTBFS with libsdl2-dev from src:sdl2-compat: uses CHAR_WIDTH as a function name

Simon McVittie smcv at debian.org
Tue Dec 23 17:57:24 GMT 2025


Source: descent3
Version: 1.5.0+ds-1
Severity: normal
Tags: ftbfs forky sid
User: sdl2-compat at packages.debian.org
Usertags: ftbfs

sdl2-compat is a reimplementation of the SDL 2 API using SDL 3. 
It can be tested by installing the libsdl2-compat-shim and 
libsdl2-compat-dev packages from testing/unstable, or by installing the 
libsdl2-2.0-0 and libsdl2-dev packages built by src:sdl2-compat in 
experimental.

After discussion with SDL upstream, I'm looking into what needs to 
happen for Debian (and indirectly Ubuntu) to replace "classic" SDL2 
(src:libsdl2) with sdl2-compat, following in the footsteps of other 
distros like Arch and Fedora that have already done this transition.

descent3 failed to build from source with libsdl2-dev provided by 
src:sdl2-compat, with compiler errors indicating that it is using 
CHAR_WIDTH as a local function or function-like macro. In C23, 
<limits.h> declares CHAR_WIDTH as the width of char in bits, in practice 
always 8 in Debian. I haven't looked into this in detail, but probably 
this is because a sdl2-compat header contains `#include <limits.h>` 
where the equivalent libsdl2 header did not.

This could likely be solved by building with -std=gnu17, or by renaming 
the local definition of CHAR_WIDTH to something else, preferably 
namespaced.

    smcv



More information about the Pkg-games-devel mailing list