[PostGIS] #5973: pg_config --bindir not being used as documented.
PostGIS
trac at osgeo.org
Fri Aug 22 19:25:52 PDT 2025
#5973: pg_config --bindir not being used as documented.
---------------------------+---------------------------
Reporter: polobo | Owner: robe
Type: defect | Status: new
Priority: low | Milestone: PostGIS 3.5.4
Component: documentation | Version: master
Keywords: |
---------------------------+---------------------------
(Note: PostgreSQL meson build with custom --prefix)\\
The README.postgis sayith:\\
Installation paths will typically be derived by `pg_config`:\\
...\\
Binaries (loader/dumper) in `pg_config --bindir`\\
...\\
Where `[prefix]` above is extracted from `pg_config --configure`.
The following excerpt from `make install` shows this to be incorrect:\\
{{{
make[1]: Entering directory '/home/davidj/postgis/topology'
mkdir -p '/home/davidj/.local/pgsql-17/pgsql/lib/x86_64-linux-gnu'
mkdir -p '/home/davidj/.local/pgsql-17/pgsql/share/contrib/postgis-3.6'
/bin/sh /home/davidj/.local/pgsql-17/pgsql/lib/x86_64-linux-
gnu/pgxs/src/makefiles/../../config/install-sh -c -m 755
postgis_topology-3.so '/home/davidj/.local/pgsql-17/pgsql/lib/x86_64
-linux-gnu/postgis_topology-3.so'
mkdir -p /usr/local/bin
/bin/sh ../libtool --mode=install /bin/sh
/home/davidj/.local/pgsql-17/pgsql/lib/x86_64-linux-
gnu/pgxs/src/makefiles/../../config/install-sh -c loader/pgtopo_import
"/usr/local/bin/pgtopo_import"
libtool: install: /bin/sh /home/davidj/.local/pgsql-17/pgsql/lib/x86_64
-linux-gnu/pgxs/src/makefiles/../../config/install-sh -c
loader/pgtopo_import /usr/local/bin/pgtopo_import
cp: cannot create regular file '/usr/local/bin/_inst.151834_': Permission
denied
make[1]: *** [Makefile:189: install-importer] Error 1
make[1]: Leaving directory '/home/davidj/postgis/topology'
make: *** [GNUmakefile:36: install] Error 1
}}}
If it were looking at `pg_config --bindir` it would be putting
`pgtopo_import` into `/home/davidj/.local/pgsql-17/pgsql/bin` - as the
`lib` and `share` locations preceding it indicate.
Also, I'm pretty sure that `pg_config --configure` is now unreliable since
meson doesn't seem to populate it. I think we need to document that if
one wants to fully use the `--prefix` directory of their PostgreSQL
installation the same directory needs to be passed as `./configure
--prefix=/home/davidj/.local/pgsql-17/pgsql`.
I pondered altering the build to do as the documentation says but that
seemed overly risky compared to a simple directive to be explicit. I
suppose it makes automation a bit more annoying - so I wouldn't mind a
code solution - but at the moment I can't write that patch. I'll probably
give the readme a go if there is agreement as to my observation and
general way forward.
--
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5973>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-tickets
mailing list