PG Bug reporting form <noreply@postgresql.org> writes:
> When I build pg-combineback from postgress 18.6 (in Yocto, cross-compiled on
> aarch64 to aarch64), it fails to link:
> aarch64-poky-linux-ld: src/common/libpgcommon.a(jsonapi.o): in function
> `json_lex_number':
> src/common/jsonapi.c:2379:(.text+0x168): undefined reference to
> `appendBinaryPQExpBuffer'
You seem to be using a broken linker :-(
pg_combinebackup doesn't use any of the functions in
src/common/jsonapi.c. Therefore, the jsonapi.o member of
libpgcommon.a shouldn't get pulled into the link, and its
unsatisfied dependency on libpq.so shouldn't matter.
Apparently, whatever build toolchain you're using has
forgotten this decades-old principle of .a library usage.
regards, tom lane