meson 0.62.0: build fails: GETTEXT_PACKAGE and LOCALEDIR undeclared
When building sysprof
with the latest version of Meson (0.62.0), the build fails with the following error:
[178/276] Compiling C object src/sysprof/sysprof.p/sysprof.c.o
FAILED: src/sysprof/sysprof.p/sysprof.c.o
gcc -Isrc/sysprof/sysprof.p -Isrc/sysprof -I../src/sysprof -Isrc/libsysprof-capture -I../src/libsysprof-capture -Isrc/libsysprof -I../src/libsysprof -Isrc/libsysprof-ui -I../src/libsysprof-ui -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/libmount -I/usr/include/blkid -I/usr/include/gio-unix-2.0 -I/usr/include/json-glib-1.0 -I/usr/include/polkit-1 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/lzo -I/usr/include/pixman-1 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libdrm -I/usr/include/valgrind -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/dbus-1.0 -I/usr/lib/dbus-1.0/include -I/usr/include/at-spi-2.0 -I/usr/include/libdazzle-1.0 -I/home/mae/.cache/kiss/proc/250525/build/sysprof/build -fdiagnostics-color=always -D_FILE_OFFSET_BITS=64 -Wall -Winvalid-pch -Wextra -std=gnu11 -O0 -g -D_GNU_SOURCE -D_POSIX_C_SOURCE=200809L -Wcast-align -Wdeclaration-after-statement -Wformat-nonliteral -Wformat-security -Wmissing-include-dirs -Wnested-externs -Wno-missing-field-initializers -Wno-sign-compare -Wno-unused-parameter -Wno-cast-function-type -Wpointer-arith -Wredundant-decls -Wswitch-default -Wswitch-enum -Wuninitialized -Werror=format-security -Werror=format=2 -Werror=empty-body -Werror=implicit-function-declaration -Werror=pointer-arith -Werror=init-self -Werror=int-conversion -Werror=misleading-indentation -Werror=missing-include-dirs -Werror=overflow -Werror=return-type -Werror=shadow -Werror=strict-prototypes -Werror=undef -Werror=incompatible-pointer-types -march=native -mtune=native -O3 -pipe -fno-plt -fexceptions -Wp,-D_FORTIFY_SOURCE=2 -Wformat -Werror=format-security -fstack-clash-protection -fcf-protection -ffat-lto-objects -fPIE -pthread -MD -MQ src/sysprof/sysprof.p/sysprof.c.o -MF src/sysprof/sysprof.p/sysprof.c.o.d -o src/sysprof/sysprof.p/sysprof.c.o -c ../src/sysprof/sysprof.c
../src/sysprof/sysprof.c: In function ‘main’:
../src/sysprof/sysprof.c:39:19: error: ‘GETTEXT_PACKAGE’ undeclared (first use in this function)
39 | bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
| ^~~~~~~~~~~~~~~
../src/sysprof/sysprof.c:39:19: note: each undeclared identifier is reported only once for each function it appears in
../src/sysprof/sysprof.c:39:36: error: ‘LOCALEDIR’ undeclared (first use in this function)
39 | bindtextdomain (GETTEXT_PACKAGE, LOCALEDIR);
| ^~~~~~~~~
This also happens with older versions of sysprof
that worked under meson 0.61.2 for whatever reason.
Meson output:
+ meson build --prefix /usr --libexecdir lib --sbindir bin --auto-features enabled --wrap-mode nodownload -D b_pie=true
The Meson build system
Version: 0.62.0
Source dir: /home/mae/.cache/kiss/proc/252150/build/sysprof
Build dir: /home/mae/.cache/kiss/proc/252150/build/sysprof/build
Build type: native build
Project name: sysprof
Project version: 3.44.0
C compiler for the host machine: gcc (gcc 11.2.0 "gcc (GCC) 11.2.0")
C linker for the host machine: gcc ld.bfd 2.37
Host machine cpu family: x86_64
Host machine cpu: x86_64
C++ compiler for the host machine: g++ (gcc 11.2.0 "g++ (GCC) 11.2.0")
C++ linker for the host machine: g++ ld.bfd 2.37
Compiler for C supports arguments -fvisibility=hidden: YES
Has header "execinfo.h" : YES
Checking for function "strlcpy" : NO
Checking for function "reallocarray" : YES
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Run-time dependency polkit-agent-1 found: YES 0.120
Run-time dependency polkit-gobject-1 found: YES 0.120
Run-time dependency libunwind-generic found: YES 1.6.2
Header <libunwind.h> has symbol "unw_set_cache_size" with dependency libunwind-generic: YES
Checking whether type "struct perf_event_attr" has member "use_clockid" : YES
Checking whether type "struct perf_event_attr" has member "clockid" : YES
Compiler for C supports arguments -Wcast-align: YES
Compiler for C supports arguments -Wdeclaration-after-statement: YES
Compiler for C supports arguments -Wformat-nonliteral: YES
Compiler for C supports arguments -Wformat-security: YES
Compiler for C supports arguments -Wmissing-include-dirs: YES
Compiler for C supports arguments -Wnested-externs: YES
Compiler for C supports arguments -Wno-missing-field-initializers: YES
Compiler for C supports arguments -Wno-sign-compare: YES
Compiler for C supports arguments -Wno-unused-parameter: YES
Compiler for C supports arguments -Wno-cast-function-type: YES
Compiler for C supports arguments -Wpointer-arith: YES
Compiler for C supports arguments -Wredundant-decls: YES
Compiler for C supports arguments -Wswitch-default: YES
Compiler for C supports arguments -Wswitch-enum: YES
Compiler for C supports arguments -Wuninitialized: YES
Compiler for C supports arguments -Werror=format-security -Werror=format=2: YES
Compiler for C supports arguments -Werror=empty-body: YES
Compiler for C supports arguments -Werror=implicit-function-declaration: YES
Compiler for C supports arguments -Werror=pointer-arith: YES
Compiler for C supports arguments -Werror=init-self: YES
Compiler for C supports arguments -Werror=int-conversion: YES
Compiler for C supports arguments -Werror=misleading-indentation: YES
Compiler for C supports arguments -Werror=missing-include-dirs: YES
Compiler for C supports arguments -Werror=overflow: YES
Compiler for C supports arguments -Werror=parenthesis: NO
Compiler for C supports arguments -Werror=return-type: YES
Compiler for C supports arguments -Werror=shadow: YES
Compiler for C supports arguments -Werror=strict-prototypes: YES
Compiler for C supports arguments -Werror=undef: YES
Compiler for C supports arguments -Werror=incompatible-pointer-types: YES
Compiler for C supports link arguments -Wl,-z,relro: YES
Compiler for C supports link arguments -Wl,-z,now: YES
Compiler for C supports link arguments -fstack-protector-strong: YES
meson.build:194: DEPRECATION: configuration_data.set10 with number. the `set10` method should only be used with booleans
Program gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Found pkg-config: /usr/bin/pkg-config (1.8.0)
Program gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Program gdbus-codegen found: YES (/usr/bin/gdbus-codegen)
Configuring sysprof-version.h using configuration
Run-time dependency threads found: YES
Run-time dependency glib-2.0 found: YES 2.72.0
Run-time dependency gio-2.0 found: YES 2.72.0
Run-time dependency gio-unix-2.0 found: YES 2.72.0
Dependency polkit-gobject-1 found: YES 0.120 (cached)
Run-time dependency systemd found: YES 250
Configuring org.gnome.Sysprof3.service using configuration
Configuring org.gnome.Sysprof3.conf using configuration
Configuring sysprof3.service using configuration
Program msgfmt found: YES (/usr/bin/msgfmt)
Configuring org.gnome.Sysprof2.service using configuration
Configuring org.gnome.Sysprof2.conf using configuration
Configuring sysprof2.service using configuration
Dependency polkit-gobject-1 found: YES 0.120 (cached)
Dependency polkit-gobject-1 found: YES 0.120 (cached)
Dependency gio-2.0 found: YES 2.72.0 (cached)
Dependency gio-unix-2.0 found: YES 2.72.0 (cached)
Run-time dependency json-glib-1.0 found: YES 1.6.6
Library stdc++ found: YES
Library dl found: YES
Dependency glib-2.0 found: YES 2.72.0 (cached)
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Dependency gio-2.0 found: YES 2.72.0 (cached)
Run-time dependency gtk+-3.0 found: YES 3.24.33
Run-time dependency libdazzle-1.0 found: YES 3.44.0
Program glib-compile-resources found: YES (/usr/bin/glib-compile-resources)
Library m found: YES
Run-time dependency pangoft2 found: YES 1.50.6
Dependency glib-2.0 found: YES 2.72.0 (cached)
Dependency gio-unix-2.0 found: YES 2.72.0 (cached)
Dependency glib-2.0 found: YES 2.72.0 (cached)
Run-time dependency cairo found: YES 1.17.6
Dependency gtk+-3.0 found: YES 3.24.33 (cached)
Dependency libdazzle-1.0 found: YES 3.44.0 (cached)
Dependency pangoft2 found: YES 1.50.6 (cached)
Dependency glib-2.0 found: YES 2.72.0 (cached)
Program itstool found: YES (/usr/bin/itstool)
Program itstool found: YES (/usr/bin/itstool)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program msgfmt found: YES (/usr/bin/msgfmt)
Program msginit found: YES (/usr/bin/msginit)
Program msgmerge found: YES (/usr/bin/msgmerge)
Program xgettext found: YES (/usr/bin/xgettext)
Configuring config.h using configuration
Build targets in project: 141
NOTICE: Future-deprecated features used:
* 0.56.0: {'dependency.get_pkgconfig_variable', 'gui_app arg in executable', 'meson.source_root'}
sysprof 3.44.0
User defined options
auto_features: enabled
libexecdir : lib
prefix : /usr
sbindir : bin
wrap_mode : nodownload
b_pie : true
Found ninja-1.10.2 at /usr/bin/ninja