8000 pkgdb: discover libpq headers under the postgresql subdirectory by aivazis · Pull Request #50 · aivazis/mm · GitHub
[go: up one dir, main page]

Skip to content

pkgdb: discover libpq headers under the postgresql subdirectory - #50

Merged
aivazis merged 1 commit into
mainfrom
dpkg-libpq
Jul 13, 2026
Merged

aivazis merged 1 commit into
mainfrom
dpkg-libpq

Conversation

@aivazis
@aivazis aivazis commented Jul 13, 2026
Copy link
Copy Markdown
Owner

Third in the series after #49 (hdf5/mpi): another external whose dpkg discovery lands the header
outside the bare $(dir)/include.

Problem

On Debian/Ubuntu libpq-dev installs the client header at /usr/include/postgresql/libpq-fe.h
and the library at /usr/lib/<multiarch>/libpq.so. _buildDpkgPackageDatabase had no libpq
branch, so it fell through to the generic else and emitted only libpq.dir, leaving
libpq.incpath at the default /usr/include. Building against libpq then fails with
fatal error: 'libpq-fe.h' file not found.

Fix

A libpq emitter branch (same shape as hdf5/mpi): read dpkg -L for libpq-fe.h and libpq.so
and emit libpq.incpath / libpq.libpath via _dpkgAnchor.

Verification

In an ubuntu:24.04 container with libpq-dev installed, mm extern.libpq.info now reports
incpath = /usr/include/postgresql, libpath = /usr/lib/aarch64-linux-gnu, and pyre's
pyre-postgres binding sources compile against a live postgresql-16 server (they failed on the
missing header before).

The embedded clone in pyre's packages/merlin/shells/MM.py gets the same fix in a companion pyre PR.

Turned up while standing up a postgres server in the new pyre dev containers — a reminder the dpkg
sniffer wants a systematic per-package audit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant

0