On Mon, 10 Feb 2025 at 13:31:51 +0100, Helmut Grohne wrote: > caveexpress fails to build from source in unstable on amd64.
This is probably a regression with libsdl2-mixer 2.8.1. > | In file included from > /build/reproducible-path/caveexpress-2.5.2/src/modules/sound/SDLSoundEngine.cpp:11: > | /usr/include/SDL2/SDL_mixer.h:844:55: note: initializing argument 1 of > ‘void Mix_FreeMusic(Mix_Music*)’ > | 844 | extern DECLSPEC void SDLCALL Mix_FreeMusic(Mix_Music *music); > | | ~~~~~~~~~~~^~~~~ > | In file included from > /build/reproducible-path/caveexpress-2.5.2/src/modules/sound/SDLSoundEngine.cpp:1: > | > /build/reproducible-path/caveexpress-2.5.2/src/modules/sound/SDLSoundEngine.h:8:8: > note: class type ‘_Mix_Music’ is incomplete > | 8 | struct _Mix_Music; > | | ^~~~~~~~~~ > | > /build/reproducible-path/caveexpress-2.5.2/src/modules/sound/SDLSoundEngine.cpp: > In member function ‘virtual void SDLSoundEngine::close()’: > | > /build/reproducible-path/caveexpress-2.5.2/src/modules/sound/SDLSoundEngine.cpp:116:23: > error: cannot convert ‘_Mix_Music*’ to ‘Mix_Music*’ > | 116 | Mix_FreeMusic(_music); caveexpress seems to be assuming that <SDL_mixer.h> will declare "typedef struct _Mix_Music Mix_Music", as it historically did, so that caveexpress can forward-declare "struct Mix_Music" as an alternative to #include'ing <SDL_mixer.h>. In libsdl2-mixer 2.8.1, instead it declares "typedef struct Mix_Music Mix_Music", probably because user-defined type names starting with an underscore are technically not allowed in Standard C (formally they're reserved for the implementation, although this is widely ignored, and normally harmless if libraries namespace their types reasonably well). I'm fairly sure that the authors of libsdl2-mixer never intended the name with an underscore to be part of the public API, which is why it had an underscore in the first place. Most likely the way to be compatible with both old and new libsdl2-mixer would be to #include <SDL_mixer.h> in SDLSoundEngine.h, remove the forward-declaration of "struct _Mix_Music", and replace "_Mix_Music*" with "Mix_Music*" as the type name that's used within caveexpress. smcv