gtester in custom_target() run against system rather than built libglib during build
glib V2.77.00 commit 09901065 Linux Mint Cinnamon V21.1
This is probably a stupid mistake on my part, although I have built glib many times before. I have cloned the latest version into folder gimp_prefix/glib. I have then run the following command in folder gimp_prefix/glib:
meson _build \ --prefix=${GIMP_PREFIX} \ --buildtype=release \ -Db_lto=true
Then in folder _build I run ninja (with no arguments) and get the following error:
[382/1502] Generating glib/tests/tmpsample.xml with a custom command FAILED: glib/tests/tmpsample.xml /home/richard/gimp_prefix/glib/_build/glib/gtester -k --quiet --i-know-this-is-deprecated -o glib/tests/tmpsample.xml --test-arg=--gtester-selftest /home/richard/gimp_prefix/glib/_build/glib/gtester /home/richard/gimp_prefix/glib/_build/glib/gtester: symbol lookup error: /home/richard/gimp_prefix/glib/_build/glib/gtester: undefined symbol: g_assertion_message_cmpint [387/1502] Compiling C object glib/tests/utils-c-90.p/utils.c.o ninja: build stopped: subcommand failed.
Looking in glib/glib/gtestutils.h is the following code:
GLIB_AVAILABLE_IN_2_78 void g_assertion_message_cmpint (const char *domain, const char *file, int line, const char *func, const char *expr, guint64 arg1, const char *cmp, guint64 arg2, char numtype) G_ANALYZER_NORETURN;
Does this mean that g_assertion_message_cmpint is only being included for V2.78.00 and later and is therefore the cause of the symbol being undefined for a build of V2.77.0?