From dac8e9b30399ecf15fb0cb07e67e6e6a32fb8dec Mon Sep 17 00:00:00 2001 From: Maxim Kochetkov Date: Fri, 7 Mar 2025 11:37:10 +0300 Subject: [PATCH] package/postgresql: fix build with external gettext Postgresql fails to build with NLS enabled against uclibc/musl after the move to meson: ------------------------------------------------------- /home/autobuild/autobuild/instance-13/output-1/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.4.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld: scram-common.c:(.text+0x65c): undefined reference to `libintl_gettext' /home/autobuild/autobuild/instance-13/output-1/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.4.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld: scram-common.c:(.text+0x6cc): undefined reference to `libintl_gettext' /home/autobuild/autobuild/instance-13/output-1/host/lib/gcc/aarch64-buildroot-linux-uclibc/12.4.0/../../../../aarch64-buildroot-linux-uclibc/bin/ld: scram-common.c:(.text+0x73c): undefined reference to `libintl_gettext' ------------------------------------------------------- uclibc/musl toolchains use GNU gettext for NLS support. So we need to link against external libintl. Fixes: https://autobuild.buildroot.org/results/244f154aece46d02747b875faba4c51e7b5d0dc2/ Signed-off-by: Maxim Kochetkov [Peter: also pass TARGET_LDFLAGS, mention the change to meson] Signed-off-by: Peter Korsgaard --- package/postgresql/postgresql.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk index 2b6e78b941..bffa544a5a 100644 --- a/package/postgresql/postgresql.mk +++ b/package/postgresql/postgresql.mk @@ -13,7 +13,7 @@ POSTGRESQL_CPE_ID_VENDOR = postgresql POSTGRESQL_SELINUX_MODULES = postgresql POSTGRESQL_INSTALL_STAGING = YES POSTGRESQL_CONFIG_SCRIPTS = pg_config -POSTGRESQL_CONF_ENV = LIBS=$(TARGET_NLS_LIBS) +POSTGRESQL_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) # We have to force invalid paths for xmllint and xsltproc, otherwise # if detected they get used, even with -Ddocs=disabled and # -Ddocs_pdf=disabled, and it causes build failures