Browse Source

Fix bootstrapping Galera nodes on FreeBSD 15.0

Bootstrapping nodes on FreeBSD 15.0 with mariadb-backup currently broken.
We should not need LD_LIBRARY_PATH trickery on FreeBSD, so skip setting
it same as on Darwin. Alternatively putting /lib before /usr/lib also
fixes it.

WSREP_SST: [INFO] Preparing the backup at /var/db/mysql/.sst (20250608 14:44:04.000)
WSREP_SST: [INFO] Evaluating /usr/local/bin/mariadb-backup --prepare ......
WSREP_SST: [ERROR] Cleanup after exit with status: 1 (20250608 14:44:04.000)

With the following error in /var/db/mysql/mariabackup.prepare.log:
ld-elf.so.1: /usr/local/bin/mariadb-backup: Undefined symbol "_ZNSt3__117bad_function_callD1Ev"

I did not look for the root cause in FreeBSD 15.0 that changed this
behaviour. Calling mariadb-backup directly from the shell works fine on
FreeBSD 14.x and 15.x when LD_LIBRARY_PATH is not set (when using
FreeBSD packages or installing from FreeBSD ports). Setting
LD_LIBRARY_PATH manually like the script does, breaks mariadb-backup
with the "Undefined symbol" error on FreeBSD 15.0 but not on 14.x.

Signed-off-by: Julius Goryavsky <julius.goryavsky@mariadb.com>
pull/4195/head
Florian Smeets 4 months ago
committed by Julius Goryavsky
parent
commit
b5d79b86b2
  1. 2
      scripts/wsrep_sst_common.sh

2
scripts/wsrep_sst_common.sh

@ -25,7 +25,7 @@ OS="$(uname)"
# Setting the paths for some utilities on CentOS
export PATH="${PATH:+$PATH:}/usr/local/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"
if [ "$OS" != 'Darwin' ]; then
if [ "$OS" != 'Darwin' ] && [ "$OS" != 'FreeBSD' ]; then
export LD_LIBRARY_PATH="${LD_LIBRARY_PATH:+$LD_LIBRARY_PATH:}/usr/local/lib:/usr/lib:/lib:/opt/lib"
fi

Loading…
Cancel
Save