| Piece | Why |
|---|---|
| PostgreSQL headers | pg_config must resolve; extension is PGXS-built C |
| Go 1.26.1+ | Builds bridge/ as -buildmode=c-shared (see bridge/go.mod) |
| MuPDF shared libs at runtime | Bridge loads MuPDF from the backend process; missing .so → load failure |
Important
make only checks compile-time deps. If Postgres starts the extension and MuPDF is not on the loader path, you get a hard failure when the bridge initializes—not a friendly SQL error.
Typical Linux: ensure libmupdf.so is installed and visible (LD_LIBRARY_PATH, or system ld.so paths).
From the repo root:
makeOverride PostgreSQL:
make PG_CONFIG=/usr/local/pgsql/bin/pg_configsudo make installsudo often nukes PATH. If the wrong pg_config runs, you install into the wrong prefix:
sudo env "PATH=$PATH" make install PG_CONFIG=/exact/path/to/pg_configmake install also places libpageindex_bridge.so next to pg_pageindex.so (install-lib) so $ORIGIN rpath resolution works.
CREATE EXTENSION pg_pageindex;
-- schema: pageindexCheck:
SELECT pageindex.version();