From 8aec805ac4b5f59a7716dad18461eeeb84872181 Mon Sep 17 00:00:00 2001 From: Changqing Li Date: Thu, 14 Mar 2024 15:22:15 +0800 Subject: postgresql: fix a runtime error initdb on target will fail with below error: 2024-03-13 08:40:23.253 UTC [4410] FATAL: could not load library "/usr/lib64/postgresql/dict_snowball.so": /usr/lib64/postgresql/dict_snowball.so: undefined symbol: CurrentMemoryContext Refer [1][2], for cross compile, --export-dynamic is assumed as not supported, and cause above error. For oe, both gcc and clang support --export-dynamic, fixed by set LDFLAGS_EX_BE directly [1] https://www.postgresql.org/message-id/79e63515-0f5e-30f4-136d-96e23b1a817d%40posteo.de [2] https://github.com/postgres/postgres/commit/9db49fc5bfdc0126be03f4b8986013e59d93b91d#diff-49473dca262eeab3b4a43002adb08b4db31020d190caaad1594b47f1d5daa810 Signed-off-by: Changqing Li Signed-off-by: Khem Raj --- meta-oe/recipes-dbs/postgresql/postgresql.inc | 1 + 1 file changed, 1 insertion(+) (limited to 'meta-oe/recipes-dbs') diff --git a/meta-oe/recipes-dbs/postgresql/postgresql.inc b/meta-oe/recipes-dbs/postgresql/postgresql.inc index 868a2e443c..e29a5bef77 100644 --- a/meta-oe/recipes-dbs/postgresql/postgresql.inc +++ b/meta-oe/recipes-dbs/postgresql/postgresql.inc @@ -35,6 +35,7 @@ LEAD_SONAME = "libpq.so" # LDFLAGS for shared libraries export LDFLAGS_SL = "${LDFLAGS}" +export LDFLAGS_EX_BE = "-Wl,--export-dynamic" inherit autotools pkgconfig perlnative python3native python3targetconfig useradd update-rc.d systemd gettext cpan-base multilib_header -- cgit v1.2.3-54-g00ecf