#1128913 libpq.pc lists unnecessary/missing libraries for static linking

Package:
libpq-dev
Source:
libpq-dev
Description:
header files for libpq5 (PostgreSQL library)
Submitter:
Boris Kolpackov
Date:
2026-02-25 11:19:02 UTC
Severity:
normal
#1128913#5
Date:
2026-02-24 13:28:53 UTC
From:
To:
The Libs.private field in libpq.pc lists the following libraries:
#1128913#8
Date:
2026-02-25 11:15:52 UTC
From:
To:
Re: Boris Kolpackov

Hi,

the situation with pkgconfig files and static linking is complicated.
See the thread starting at
https://www.postgresql.org/message-id/flat/aCHScGj9_dAo-gOM%40msg.df7cb.de#f9d62d87e51b148072f4125631c75f31

In most cases involving libpq-dev, the extra -dev packages are not
required. Static linking is a special case that Debian tends to avoid
anyway, so I don't think we should deviate from the upstream file
here. The PG18 patch is already bad enough (and moving in the wrong
direction of what you are asking for anyway):
https://salsa.debian.org/postgresql/postgresql/-/blob/18/debian/patches/libpq.pc-no-libcurl?ref_type=heads

Christoph