Re: BUG #19727: pg-combinebackup fails to link - Mailing list pgsql-bugs

From Tom Lane
Subject Re: BUG #19727: pg-combinebackup fails to link
Date
Msg-id 599939.1790693300@sss.pgh.pa.us
Whole thread
In response to BUG #19727: pg-combinebackup fails to link  (PG Bug reporting form <noreply@postgresql.org>)
Responses Re: BUG #19727: pg-combinebackup fails to link
List pgsql-bugs
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



pgsql-bugs by date:

Previous
From: PG Bug reporting form
Date:
Subject: BUG #19727: pg-combinebackup fails to link
Next
From: Ross Burton
Date:
Subject: Re: BUG #19727: pg-combinebackup fails to link