dbus lib is required on linux for make

Hi. I’m using make and I faced the issue with dbus.h include file.
In commit eadc8693dd4a8d47fc63985ef70d082084081bab file
\src\core\linux\SDL_fcitx.c was updated and string

#ifdef HAVE_FCITX_FRONTEND_H

was removed. It forces me to install dbus that I didn’t have before (with update of docker etc) or change sdl code (which may lead to some difficulties upon next update). Why this ifdef was removed and check for required includes is left in cmake only?
Thanks.

1 Like

Are you sure you’re using a current version of SDL2?
Because this should’ve been fixed 2 years ago in cmake: Build Linux-specific files like the configure script does. · libsdl-org/SDL@d955d63 · GitHub and been part for SDL2 2.0.14 and newer

SDL_fcitx.c should only be compiled at all if dbus has been found, so there’s no need for checks within that source file

Thank you for your reply.
Yes, I’m upgrading from 2.0.12 to 2.0.20

SDL_fcitx.c should only be compiled at all if dbus has been found, so there’s no need for checks within that source file

could you please provide a place where I can find similar check if I’m not using cmake?

if you’re using autotools (./configure) the same should happen, see SDL/configure.ac at ed3442d7a5a79b3a7357c5bdf54b47ab985ca7f7 · libsdl-org/SDL · GitHub
SDL_fcitx.c is only added to the SOURCES if IME is enabled and DBUS headers have been found

if for some reason that doesn’t work, does passing --disable-fcitx to ./configure help?

We need to integrate SDL into the custom build system. In the past (and in most cases now) we could configure what functionality would be compiled via SDL_config.h.
Now there is no flag in *config.h to disable some functionality and this is very inconvenient.
Moreover, it looks heterogeneous, since we can disable some things through the *config.h, while others cannot.

1 Like

Using a custom build system instead of the ones that come with SDL should’ve been mentioned in the initial post…

I’m sure your custom build system allows only building the files that are actually needed?

Of course, we can specify separate files for compilation. But before this was not required, because earlier it was possible to specify the necessary in the config file. Why then not remove all settings in configs and make everyone tied to what is installed in the system (as it is now done - if there are dbus installed in the system - so we definitely need to use it), and so on.