Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH 1/1] package/postgresql: fix service runtime
@ 2024-01-17 21:07 Julien Olivain
  2024-01-18  5:30 ` Maxim Kochetkov via buildroot
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Julien Olivain @ 2024-01-17 21:07 UTC (permalink / raw)
  To: buildroot; +Cc: Maxim Kochetkov, Julien Olivain

Since commit 2a8065e "package/postgresql: bump version to 16.1", the
postgresql service fail to start at runtime with an error:

    FATAL:  could not load library "/usr/lib/postgresql/dict_snowball.so": /usr/lib/postgresql/dict_snowball.so: undefined symbol: CurrentMemoryContext

This is due to the Posgresql autotool configure script trying to
detect whether the toolchain linker needs --export-dynamic or not.
This test is done with a runtime execution of a test program, and
therefore cannot run in cross-compilation. In that case, the
configure script assumes it is not needed. See commit [1], included
in PostgreSQL v16.0.

This commit fixes the issue by forcing the value in _CONF_ENV. The
package has already a Kconfig dependency on !BR2_STATIC_LIBS, so the
value can be unconditionally set.

[1] https://git.postgresql.org/gitweb/?p=postgresql.git;a=commitdiff;h=9db49fc5bfdc0126be03f4b8986013e59d93b91d

Signed-off-by: Julien Olivain <ju.o@free.fr>
---
This patch was tested on branch master at commit b200632, and also
with patch from:
https://patchwork.ozlabs.org/project/buildroot/patch/20240111224003.243443-1-ju.o@free.fr/

with command:

    support/testing/run-tests \
        -d dl -o output_folder \
        tests.package.test_postgresql
    ...
    OK
---
 package/postgresql/postgresql.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/postgresql/postgresql.mk b/package/postgresql/postgresql.mk
index ec5b61b932..644f93d88a 100644
--- a/package/postgresql/postgresql.mk
+++ b/package/postgresql/postgresql.mk
@@ -15,6 +15,7 @@ POSTGRESQL_INSTALL_STAGING = YES
 POSTGRESQL_CONFIG_SCRIPTS = pg_config
 POSTGRESQL_CONF_ENV = \
 	ac_cv_type_struct_sockaddr_in6=yes \
+	pgac_cv_prog_cc_LDFLAGS_EX_BE__Wl___export_dynamic=yes \
 	LIBS=$(TARGET_NLS_LIBS)
 POSTGRESQL_CONF_OPTS = --disable-rpath
 POSTGRESQL_DEPENDENCIES = $(TARGET_NLS_DEPENDENCIES)
-- 
2.43.0

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 10+ messages in thread
[parent not found: <20240117210756.265708-1-ju.o__23021.2395939574$1705525733$gmane$org@free.fr>]

end of thread, other threads:[~2024-02-04 20:59 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-01-17 21:07 [Buildroot] [PATCH 1/1] package/postgresql: fix service runtime Julien Olivain
2024-01-18  5:30 ` Maxim Kochetkov via buildroot
2024-01-18 18:08 ` Julien Olivain
2024-01-21  9:14 ` Yann E. MORIN
2024-02-04  9:06   ` Peter Korsgaard
2024-02-04 15:40     ` Baruch Siach via buildroot
2024-02-04 20:59       ` Peter Korsgaard
2024-02-04 20:51     ` Maxim Kochetkov via buildroot
     [not found] <20240117210756.265708-1-ju.o__23021.2395939574$1705525733$gmane$org@free.fr>
2024-01-20 15:30 ` Bernd Kuhls
2024-01-21  9:17   ` Yann E. MORIN

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox