The Problem might be with the code itself here is what I am getting /usr/local/llvm19/bin/clang -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Werror=unguarded-availability-new -Wendif-labels -Wmissing-format-attribute -Wcast-function-type -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -Wno-unused-command-line-argument -Wno-compound-token-split-by-macro -Wno-format-truncation -Wno-cast-function-type-strict -g -O2 -pipe -O3 -funroll-loops -DLDAP_DEPRECATED -fstack-protector-strong -fno-strict-aliasing findtimezone.o initdb.o localtime.o -L../../../src/port -L../../../src/common -L../../../src/fe_utils -lpgfeutils -L../../../src/interfaces/libpq -lpq -L/usr/local/lib -licui18n -licuuc -L/usr/local/lib -lpthread -lelf -L/usr/local/lib -Wl,-rpath,/usr/local/lib -fstack-protector-strong -L/usr/local/llvm19/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -L/usr/local/lib -Wl,--as-needed -Wl,-R'/usr/local/lib' -lpgcommon -lpgport -lintl -lzstd -llz4 -lxml2 -lssl -lcrypto -lz -lreadline -lexecinfo -lm -o initdb ld: error: undefined symbol: pg_valid_server_encoding_private >>> referenced by initdb.c:849 >>> initdb.o:(setup_locale_encoding) ld: error: undefined symbol: pg_valid_server_encoding_id_private >>> referenced by initdb.c:2717 >>> initdb.o:(setup_locale_encoding) ld: error: undefined symbol: pg_encoding_to_char_private >>> referenced by initdb.c:2743 >>> initdb.o:(setup_locale_encoding) >>> referenced by initdb.c:2731 >>> initdb.o:(setup_locale_encoding) >>> referenced by initdb.c:2733 >>> initdb.o:(setup_locale_encoding) >>> referenced 3 more times clang: error: linker command failed with exit code 1 (use -v to see invocation) gmake: *** [Makefile:42: initdb] Error 1 *** Error code 2 Stop. make[1]: stopped in /usr/ports/databases/postgresql17-server *** Error code 1 Stop. make: stopped in /usr/ports/databases/postgresql17-server
I assume this for FreeBSD-CURRENT. Exactly which version of FreeBSD? Output of `uname -a`? I cannot reproduce this, and just built postgresql successfully on a 15.0-CURRENT system, albeit a bit dated. Trying again now with a freshly created poudriere jail.