[postgis-devel] build failure in pkgsrc, deep in pgxs
Greg Troxel
gdt at lexort.com
Fri Oct 7 03:32:30 PDT 2022
I have been building postgis under pkgsrc, doing updates, and it's
building for me. We also do "bulk builds" on various platforms, and for
those, the only packages that are installed at build time are those that
are declared as dependencies. This shakes out a lot of "X is actually
required but not declared" especially where "X is usually installed on
systems people test on".
I was pointed to a failure, shortly after I updated from 3.3.0 to 3.3.1
(which is not proof that it was ok at 3.3.0):
http://www.ki.nu/pkgsrc/reports/current/NetBSD-9.0/20221004.1420/postgresql11-postgis-3.3.1/install.log
and the relevant lines are:
---- Making install in topology
gmake[2]: Entering directory '/tmp/databases/postgresql-postgis2/work/postgis-3.3.1/topology'
/bin/sh ../config/install-sh -c -d '/tmp/databases/postgresql-postgis2/work/.destdir/usr/pkg/lib/postgresql'
/bin/sh: Can't open ../config/install-sh
In my build I see
---- Making install in topology
gmake[2]: Entering directory '/tmp/work/databases/postgresql-postgis2/work/postgis-3.3.1/topology'
/usr/pkg/bin/gmkdir -p '/tmp/work/databases/postgresql-postgis2/work/.destdir/usr/pkg/lib/postgresql'
which works, but I didn't ask postgis to look for and use gmkdir.
(This is from GNU coreutils, which I installed for reasons I forgot,
mkdir of course being one of those things that was there in Sixth
Edition and that remains in NetBSD's base system.) On my system
configure finds it as:
checking for a thread-safe mkdir -p... /usr/pkg/bin/gmkdir -p
but in the bulk build as:
checking for a thread-safe mkdir -p... build-aux/install-sh -c -d
I don't really understand what it means for a process to be thread-safe.
On reading autoconf sources, it turns out that's not the right word; the
question is not threads, but what happens if two make invocations try to
'mkdir -p foo'. Some impleentations might check for existence and then
mkdir(2) and return an error, when mkdir -p is documented not to do
that.
It strikes me as a bug in makefile serialization for two makes to be
doing mkdir at once, just as it would be a bug for two makes to be
compiling the same file. I therefore guess that autoconf is trying to
accomodate such buggy code.
I do find config/install-sh installed in the postgresql12-client
package, so surely pgxs is trying to use it
/usr/pkg/lib/postgresql/pgxs/config/install-sh
/usr/pkg/lib/postgresql/pgxs/src/Makefile.global
/usr/pkg/lib/postgresql/pgxs/src/Makefile.port
/usr/pkg/lib/postgresql/pgxs/src/Makefile.shlib
/usr/pkg/lib/postgresql/pgxs/src/makefiles/pgxs.mk
/usr/pkg/lib/postgresql/pgxs/src/nls-global.mk
So the mystery is why topology is trying to use pgxs's install-sh,
instead of the one found by configure, and why it is omitting the path.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://lists.osgeo.org/pipermail/postgis-devel/attachments/20221007/712a63dc/attachment.sig>
More information about the postgis-devel
mailing list