Meson build project congiruation requires SDL2?

You can get help here if Freeciv doesn't start on your computer, or if you keep getting fatal errors while playing etc.
Post Reply
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Meson build project congiruation requires SDL2?

Post by Lachu »

When I type meson .., where .. is relative path to project dir, meson complains about missing SDL2.

when I type
meson setup -Dclients=gtk3.22 nothing changes. I do not known meson a lot, but I cannot find an solution.
Dino the Dinosore
Hardened
Posts: 171
Joined: Sun Dec 31, 2017 3:41 am

Re: Meson build project congiruation requires SDL2?

Post by Dino the Dinosore »

SDL2 and SDL2_mixer packages are required for audio support, independent of the client. You need to install the SDL2 & SDL2_mixer packages.

The SDL client requires 3 more packages - SDL2_image, SDL2_gfx, SDL2_ttf.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Meson build project congiruation requires SDL2?

Post by cazfi »

Dino the Dinosore wrote: Sat Jan 14, 2023 10:23 pm SDL2 and SDL2_mixer packages are required for audio support, independent of the client. You need to install the SDL2 & SDL2_mixer packages.
..or to disable audio. "-Daudio=false"
Dino the Dinosore wrote:The SDL client requires 3 more packages - SDL2_image, SDL2_gfx, SDL2_ttf.
SDL2_gfx isn't absolutely necessary since some days ago. It was still necessary in 3.1.0-alpha5.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Meson build project congiruation requires SDL2?

Post by Lachu »

Code: Select all

> meson -Daudio=false -Druledit=true -Dclients=gtk3.22 -Dqtver=qt5
> ninja
[292/467] Compiling C object libfc_client_common.a.p/client_audio_sdl.c.o
FAILED: libfc_client_common.a.p/client_audio_sdl.c.o 
cc -Ilibfc_client_common.a.p -I. -I.. -I../dependencies/lua-5.4/src -I../dependencies/luasql/src -I../dependencies/tinycthread -I../dependencies/tolua-5.2/include -I../dependencies/cvercmp -I../utility -I../common -I../common/networking -I../common/scriptcore -I../common/aicore -I../client -I../client/include -I../client/luascript -I../client/agents -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -g -Wno-nonnull-compare -Werror -DHAVE_CONFIG_H -fPIC -MD -MQ libfc_client_common.a.p/client_audio_sdl.c.o -MF libfc_client_common.a.p/client_audio_sdl.c.o.d -o libfc_client_common.a.p/client_audio_sdl.c.o -c ../client/audio_sdl.c
../client/audio_sdl.c:24:10: fatal error: SDL2/SDL.h: No such file or directory
 #include <SDL2/SDL.h>
          ^~~~~~~~~~~~
compilation terminated.
[301/467] Compiling C object libfc_client_common.a.p/client_audio.c.o
ninja: build stopped: subcommand failed.
Audio was not disabled, as I see.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Meson build project congiruation requires SDL2?

Post by cazfi »

Lachu wrote: Sun Jan 15, 2023 1:54 pm

Code: Select all

> meson -Daudio=false -Druledit=true -Dclients=gtk3.22 -Dqtver=qt5
Didn't this give any error? You have no (sub)command in it. (You mean either 'meson configure ...' or in case of initial setup 'meson setup ... <path to src>')
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Meson build project congiruation requires SDL2?

Post by Lachu »

This did not give any error. I only do not copy .. at the end of command to this post, but everything else I put into terminal as I wrote.
cazfi
Elite
Posts: 3077
Joined: Tue Jan 29, 2013 6:54 pm

Re: Meson build project congiruation requires SDL2?

Post by cazfi »

Yeah, actually as you get the error that late, when already compiling, means that configure phase has passed (it either found SDL2 development files, or did not require them). The inconsistency between successful configure and compile phases is certainly bug in freeciv -> please open a bug ticket.
Lachu
Elite
Posts: 472
Joined: Sat May 04, 2013 2:19 pm

Re: Meson build project congiruation requires SDL2?

Post by Lachu »

No need to submit bug report. I tested and it worked now. I also check if there is bug report on osdn, but not found.
Post Reply