glib2: fix builds by explicitly disabling libelf
authorLu Dai <redacted>
Sat, 7 Feb 2026 01:06:11 +0000 (02:06 +0100)
committerChristian Marangi <redacted>
Thu, 16 Apr 2026 10:42:24 +0000 (12:42 +0200)
commit1c973fff92a6c00bc500db2be0ff67bb4f0ae125
tree5547a1b25d0adf89aba42d754a70764c45a8e4dc
parentbd02a7b2ee29842a5e16d2ef573cea30cfa7cbc8
glib2: fix builds by explicitly disabling libelf

The libelf Meson option defaults to auto. Since commit 71b7b4478906 ("glib2: do not set default meson options"),
glib2 can enable libelf support nondeterministically depending on whether libelf.pc is visible during configure.

On failing builders Meson reports:

    Run-time dependency libelf found: YES 0.192

 and gresource later fails with:

    ../gio/gresource-tool.c:34:10: fatal error: libelf.h: No such file or directory

On passing builders we see:

    Run-time dependency libelf found: NO (tried pkgconfig and cmake)

So explicitly disable libelf again to restore deterministic builds.

Fixes: #23459
Fixes: 71b7b4478906 ("glib2: do not set default meson options")
Signed-off-by: Lu Dai <redacted>
Signed-off-by: Christian Marangi <redacted>
libs/glib2/Makefile
git clone https://git.99rst.org/PROJECT