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

From Ross Burton
Subject Re: BUG #19727: pg-combinebackup fails to link
Date
Msg-id CAAnfSTuR1mwjfLQ1OB+79TwN+B2dP8Zp7Y78d7GNvFsa2dMdew@mail.gmail.com
Whole thread
In response to Re: BUG #19727: pg-combinebackup fails to link  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-bugs
That's a good point.  This is GCC 16.2 and binutils 2.47...

On Tue, 29 Sept 2026 at 15:48, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> 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: Tom Lane
Date:
Subject: Re: BUG #19727: pg-combinebackup fails to link
Next
From: Ayush Tiwari
Date:
Subject: Re: BUG #19597: getQuadrant: impossible case is reachable