Problem building GTK 3.24.30

I am trying to build GTK3.24.30 from scratch with all dependencies as a set of static libraries. But I am facing several build issues, one of which is while linking at-spi2-atk or gtk with glib. it complains for dbind being undeclared identifier. I get several of these below errors, what am I doing wrong? I also tried building shared object but same issue was there as well. I am new to GTK and finding myself clueless here, some tips will be greatly appreciated.

./atk-adaptor/adaptors/action-adaptor.c: In function ‘impl_GetActions’:
<command-line>: error: ‘dbind’ undeclared (first use in this function)
/Palomino/include/glib-2.0/glib/gmessages.h:649:35: note: in expansion of macro ‘G_LOG_DOMAIN’
  649 |         g_return_if_fail_warning (G_LOG_DOMAIN, \
      |                                   ^~~~~~~~~~~~
../atk-adaptor/adaptors/action-adaptor.c:161:3: note: in expansion of macro ‘g_return_val_if_fail’
  161 |   g_return_val_if_fail (ATK_IS_ACTION (user_data),
      |   ^~~~~~~~~~~~~~~~~~~~
../atk-adaptor/adaptors/action-adaptor.c: In function ‘impl_DoAction’:
<command-line>: error: ‘dbind’ undeclared (first use in this function)
/Palomino/include/glib-2.0/glib/gmessages.h:649:35: note: in expansion of macro ‘G_LOG_DOMAIN’
  649 |         g_return_if_fail_warning (G_LOG_DOMAIN, \
      |                                   ^~~~~~~~~~~~
../atk-adaptor/adaptors/action-adaptor.c:211:3: note: in expansion of macro ‘g_return_val_if_fail’

Sounds like G_LOG_DOMAIN doesn’t expand to a string maybe?

Could be, any idea how to cure this? I don’t have much idea on the GTK related libs, really noob here.

I looked into this more and the problem stems from this switch “dbind” passed to the compiler for G_LOG_DOMAIN: why it is undeclared?

[3/36] Compiling C object droute/droute-test.p/droute-test.c.o
FAILED: droute/droute-test.p/droute-test.c.o 
cc -Idroute/droute-test.p -Idroute -I../droute -I. -I.. -I/myDirectory/include/glib-2.0 -I/myDirectory/lib/glib-2.0/include -I/myDirectory/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include -I/myDirectory/include/at-spi-2.0 -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -std=gnu99 -O3 -D_DEFAULT_SOURCE -DATK_DISABLE_DEPRECATION_WARNINGS -fPIC -DG_LOG_DOMAIN=dbind -pthread -DPCRE_STATIC -MD -MQ droute/droute-test.p/droute-test.c.o -MF droute/droute-test.p/droute-test.c.o.d -o droute/droute-test.p/droute-test.c.o -c ../droute/droute-test.c
/myDirectory/include/glib-2.0/gobject/gobject.h: In function ‘g_assert_finalize_object’:
<command-line>: error: ‘dbind’ undeclared (first use in this function)
/myDirectory/include/glib-2.0/glib/gtestutils.h:185:69: note: in expansion of macro ‘G_LOG_DOMAIN’
  185 |                                                g_assertion_message (G_LOG_DOMAIN, __FILE__, __LINE__, G_STRFUNC, \

Because, dbind is a symbol not a "string" :slight_smile:

This isn’t an issue with gtk, rather a typo in your “droute” setup

This is not a supported configuration, and I’d be very surprised if it works at all.

I’ve just built at-spi2-atk from scratch, and cannot reproduce the warning.

You’ll have to be more specific, and provide:

  • which version of at-spi2-atk you’re building
  • which configuration options you specified
  • the nature of your build environment

I am building at-spi2-atk 2.38.0 with dependencies atk 2.36.0 and at-spi2-core 2.40.3, glib version build 2.70.0. here is my meson setup:


===> CFLAGS="-fPIC" CPPFLAGS="-I/myDirectory/include" LDFLAGS="-L/myDirectory/lib" meson setup --prefix=/myDirectory --libdir /myDirectory/lib --buildtype release --default-library static -Datk:introspection=false -Datk:docs=false -Dtests=false -Derrorlogs=false builddir

all dependencies down the line is built as static libs, and all products (headers, bins and libs) dumped into “/myDirectory”. To keep it simple i have also removed introspection and docs from all dependencies.

dbus and other runtime dependencies were provided by installing <>-dev packages using apt tool.

Right, but how did it get wrong? I did not make any alterations to the downloaded source. How do i get the symbol dbind? as I said I am new here and don’t know exactly what each subcomponents and dependencies do?

The symbol dbind most likely doesn’t exist (and if it does it would be in whatever “droute” is). G_LOG_DOMAIN should be definded as a "string" (note the quotes) i.e. -DG_LOG_DOMAIN="dbind"

you are right possibly, I can see in the github stream dbind was a component in at-spi2-atk up untill 2.7.2, so that compiler switch is possibly a stale junk, i need to find how to fix it.

actually dbind dependency comes from at-spi2-core, it builds the dbind obj and the pc file for that contains following line: Cflags: -I${includedir}/at-spi-2.0 -DG_LOG_DOMAIN=“dbind”

but when I look in the meson log of at-spi2-atk, i see this:

env[PKG_CONFIG_PATH]: /myDirectory/lib/pkgconfig:/myDirectory/lib64/pkgconfig
Called /usr/bin/pkg-config --cflags atspi-2 → 0
-DG_LOG_DOMAIN=dbind -pthread -DPCRE_STATIC -I/myDirectory/include/at-spi-2.0 -I/myDirectory/include -I/myDirectory/include/glib-2.0 -I/myDirectory/lib/glib-2.0/include -I/myDirectory/include -I/usr/include/dbus-1.0 -I/usr/lib/x86_64-linux-gnu/dbus-1.0/include

notice the quotes were dropped off. this should be the culprit, but I still don’t know how to fix this.