agora inbox for pgsql-bugs@postgresql.org
help / color / mirror / Atom feedFrom: Tom Lane <tgl@sss.pgh.pa.us>
To: Ross Burton <ross@burtonini.com>
Cc: pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19727: pg-combinebackup fails to link
Date: Wed, 30 Sep 2026 09:36:07 -0400
Message-ID: <769387.1790775367@sss.pgh.pa.us> (raw)
In-Reply-To: <CAAnfSTv_Vj9oH2vUs56KwDdbmfrOhuTb1o+6TXzBW_uUjOJpkg@mail.gmail.com>
References: <19727-32d67d9dea410f38@postgresql.org>
<599939.1790693300@sss.pgh.pa.us>
<CAAnfSTuR1mwjfLQ1OB+79TwN+B2dP8Zp7Y78d7GNvFsa2dMdew@mail.gmail.com>
<682272.1790695839@sss.pgh.pa.us>
<CAAnfSTthF_ON_NijsqN8ys=Z=CDzQyBoBUy1osgxN6PpTW8V-A@mail.gmail.com>
<CAAnfSTv_Vj9oH2vUs56KwDdbmfrOhuTb1o+6TXzBW_uUjOJpkg@mail.gmail.com>
Ross Burton <ross@burtonini.com> writes:
> I now have a build tree that works and a build tree that breaks, from
> the same machine and environment, simply by re-running the build with
> make --shuffle.
> The working jsonapi.o has functions like appendStringInfoChar,
> resetStringInfo, etc. The one that fails to link has
> appendPQExpBufferChar, resetPQExpBuffer, etc.
> This is a makefile dependency bug exposed in parallel builds, and can
> be reproduced on demand with a minimal reproducer. From a clean but
> configured tree, in src/common:
> $ make jsonapi.o
> $ readelf -sW jsonapi.o | grep reset
> 64: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND resetStringInfo
> This builds a jsonapi.o using the direct target, and
> JSONAPI_USE_PQEXPBUFFER is not defined.
> $ make clean
> $ make jsonapi_shlib.o
> $ readelf -sW jsonapi.o | grep reset
> 65: 0000000000000000 0 NOTYPE GLOBAL DEFAULT UND resetPQExpBuffer
> This builds jsonapi_shlib.o, which adds JSONAPI_USE_PQEXPBUFFER to
> CPPFLAGS. However jsonapi.o hasn't been built yet so that is also
> built, but with the PQEXPBUFFER define set this time.
Very interesting! So the problem is that the scope of the effects of
this:
jsonapi_shlib.o: override CPPFLAGS += -DJSONAPI_USE_PQEXPBUFFER
isn't terribly well-defined. Looking at the rest of that Makefile,
I'm also suspicious about
$(OBJS_FRONTEND): CPPFLAGS += -DUSE_PRIVATE_ENCODING_FUNCS
Can you break that part? If not, maybe the problem is the
gratuitous-looking "override"?
regards, tom lane
view thread (8+ messages) latest in thread
Message-ID: <769387.1790775367@sss.pgh.pa.us>
Permalink: ../769387.1790775367@sss.pgh.pa.us/
Also on: postgresql.org/message-id/769387.1790775367@sss.pgh.pa.us
reply
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-bugs@postgresql.org
Cc: tgl@sss.pgh.pa.us, ross@burtonini.com, pgsql-bugs@lists.postgresql.org
Subject: Re: BUG #19727: pg-combinebackup fails to link
In-Reply-To: <769387.1790775367@sss.pgh.pa.us>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox