agora inbox for pgsql-committers@postgresql.org  
help / color / mirror / Atom feed
From: Andres Freund <andres@anarazel.de>
To: pgsql-committers@lists.postgresql.org
Subject: pgsql: meson: Fix ccache issues when using precompiled headers with gcc
Date: Fri, 17 Jul 2026 15:27:37 +0000
Message-ID: <E1wkkTQ-000dmb-2P@gemulon.postgresql.org> (raw)

meson: Fix ccache issues when using precompiled headers with gcc

Unfortunately the combination of gcc, precompiled headers, ccache and meson
currently is not safe without further options. The dependencies emitted by gcc
are insufficient to trigger rebuilds when headers "below" the precompiled
headers are changed. Whether that's a ccache, gcc or meson bug is
debatable. Luckily gcc's -fpch-deps option fixes the issue.

This problem occasionally leads to build failures, e.g. if only c.h,
postgres.h or pg_config_manual.h change. That's e.g. the case when creating a
new major version branch.

Reviewed-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Jelte Fennema-Nio <postgres@jeltef.nl>
Discussion: https://postgr.es/m/CAN55FZ0tqR6Xz%3DiVFLc1BBoLOEHU775ARhcGYwggHA3XLA%3DoQg%40mail.gmail.com
Discussion: https://postgr.es/m/CA+hUKG+s7Yvt0PUnSQUEjCjysV-7-51n9B1h468Le3VJi0x4ZQ@mail.gmail.com
Discussion: https://postgr.es/m/phsrssp75npoyalqsolcd7fmnmlbzbmquc2p7w7mqjlw7432jk@bzskz3luyjvb
Discussion: https://github.com/ccache/ccache/issues/1686
Backpatch-through: 16, where meson support was added

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/6a90e70415efe1137d58072331f9101e0a00a4e6

Modified Files
--------------
meson.build | 6 ++++++
1 file changed, 6 insertions(+)



view thread (5+ messages)  latest in thread

Message-ID: <E1wkkTQ-000dmb-2P@gemulon.postgresql.org>
Permalink:  ../E1wkkTQ-000dmb-2P@gemulon.postgresql.org/
Also on:    postgresql.org/message-id/E1wkkTQ-000dmb-2P@gemulon.postgresql.org

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-committers@postgresql.org
  Cc: andres@anarazel.de, pgsql-committers@lists.postgresql.org
  Subject: Re: pgsql: meson: Fix ccache issues when using precompiled headers with gcc
  In-Reply-To: <E1wkkTQ-000dmb-2P@gemulon.postgresql.org>

* 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