Page 1 of 1

Meson build project congiruation requires SDL2?

Posted: Sat Jan 14, 2023 4:17 pm
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.

Re: Meson build project congiruation requires SDL2?

Posted: Sat Jan 14, 2023 10:23 pm
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.

Re: Meson build project congiruation requires SDL2?

Posted: Sat Jan 14, 2023 11:39 pm
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.

Re: Meson build project congiruation requires SDL2?

Posted: Sun Jan 15, 2023 1:54 pm
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.

Re: Meson build project congiruation requires SDL2?

Posted: Sun Jan 15, 2023 5:09 pm
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>')

Re: Meson build project congiruation requires SDL2?

Posted: Mon Jan 16, 2023 10:52 am
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.

Re: Meson build project congiruation requires SDL2?

Posted: Mon Jan 16, 2023 3:19 pm
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.

Re: Meson build project congiruation requires SDL2?

Posted: Sun Feb 05, 2023 3:57 pm
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.