PostgreSQL 16.1 dict_snowball.so: undefined symbol: CurrentMemoryContext - Mailing list pgsql-hackers

From Vitalijus Jefišovas
Subject PostgreSQL 16.1 dict_snowball.so: undefined symbol: CurrentMemoryContext
Date
Msg-id E8D94ED0-82DF-4CBC-9A4F-184947CAEE6B@gmail.com
Whole thread Raw
List pgsql-hackers
Hello,
Having issues compiling PostgreSQL 16.1 targeting ARM32 architecture.
Using building, which currently has 15.5 version, and it compiles and runs well.
Currently using GCC 11 with binutils 2.39.

During initdb, it gives error message:
[356] FATAL:  could not load library "/pgsql16/lib/dict_snowball.so": /pgsql16/lib/dict_snowball.so: undefined symbol:
CurrentMemoryContext
STATEMENT:  CREATE FUNCTION dsnowball_init(INTERNAL)
            RETURNS INTERNAL AS '$libdir/dict_snowball', 'dsnowball_init'
            LANGUAGE C STRICT;

I've traced build log, and this is how it builds for version 13:
/home/build/panelpi4/host/bin/arm-buildroot-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement-Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3
-Wformat-security-fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-format-truncation
-Wno-stringop-truncation-D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64  -O1 -g0  -fPIC
-I../../../src/include/snowball-I../../../src/include/snowball/libstemmer -I../../../src/include  -D_LARGEFILE_SOURCE
-D_LARGEFILE64_SOURCE-D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE
-I/home/build/panelpi4/host/arm-buildroot-linux-gnueabihf/sysroot/usr/bin/../../usr/include/libxml2  -c -o
dict_snowball.odict_snowball.c 

And this is version 16.1:
/home/build/panelpi4/host/bin/arm-buildroot-linux-gnueabihf-gcc -Wall -Wmissing-prototypes -Wpointer-arith
-Wdeclaration-after-statement-Werror=vla -Wendif-labels -Wmissing-format-attribute -Wimplicit-fallthrough=3
-Wcast-function-type-Wshadow=compatible-local -Wformat-security -fno-strict-aliasing -fwrapv
-fexcess-precision=standard-Wno-format-truncation -Wno-stringop-truncation -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64 -O1 -g0  -fPIC -fvisibility=hidden -I../../../src/include/snowball
-I../../../src/include/snowball/libstemmer-I../../../src/include  -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE
-D_FILE_OFFSET_BITS=64-D_GNU_SOURCE
-I/home/build/panelpi4/host/arm-buildroot-linux-gnueabihf/sysroot/usr/bin/../../usr/include/libxml2  -c -o
dict_snowball.odict_snowball.c 

So the new thing is: "-fvisibility=hidden", and there is discussion about it a year ago:
https://www.postgresql.org/message-id/20220718220938.5yx7if2mru3rd6jc%40awork3.anarazel.de

Any tips to go around this issue?
Thanks!




pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Track in pg_replication_slots the reason why slots conflict?
Next
From: shveta malik
Date:
Subject: Re: Function to get invalidation cause of a replication slot.