Project

General

Profile

Actions

Bug #2121

closed

SDL3 audio not supported in qt, gtk3.22, gtk4 clients.

Added by Matt Jolly 23 days ago. Updated 14 days ago.

Status:
Closed
Priority:
Normal
Category:
client-common
Target version:
Start date:
08/05/2026
Due date:
% Done:

0%

Estimated time:

Description

It appears that this was overlooked when the SDL3 audio support was added, encountered downstream on a system without SDL2/SDL.h -

FAILED: [code=1] freeciv-qt.p/client_gui-qt_gui_main.cpp.o 
x86_64-pc-linux-gnu-g++ -Ifreeciv-qt.p -I. -I../freeciv-R3_2_3 -I../freeciv-R3_2_3/dependencies/luasql/src -I../freeciv-R3_2_3/dependencies/tinycthread -I../freeciv-R3_2_3/dependencies/tolua-5.2/include -I../freeciv-R3_2_3/dependencies/cvercmp -I../freeciv-R3_2_3/utility -I../freeciv-R3_2_3/common -
../freeciv-R3_2_3/client/gui-qt/gui_main.cpp:26:10: fatal error: SDL2/SDL.h: No such file or directory
   26 | #include <SDL2/SDL.h>
      |          ^~~~~~~~~~~~

https://github.com/freeciv/freeciv/blob/4917574e5cfd993f107134e6540ff4b58d401b0a/client/gui-qt/gui_main.cpp#L18

#ifdef AUDIO_SDL
/* Though it would happily compile without this include,
 * it is needed for sound to work.
 * It defines "main" macro to rename our main() so that
 * it can install SDL's own. */
#ifdef SDL2_PLAIN_INCLUDE
#include <SDL.h>
#else  // PLAIN_INCLUDE
#include <SDL2/SDL.h>
#endif // PLAIN_INCLUDE
#endif // AUDIO_SDL

and similar. Have a patch for 3.2.5 that looks good, will attach - builds without SDL2/SDL.h and has audio, calling that a win. :)


Files


Related issues 1 (1 open0 closed)

Blocks Tasks #2116: S3_3-alpha3NewMarko Lindqvist08/04/2026

Actions
Actions

Also available in: Atom PDF