[postgis-devel] build failure in pkgsrc, deep in pgxs

Greg Troxel gdt at lexort.com
Sun Oct 16 17:20:13 PDT 2022


Greg Troxel <gdt at lexort.com> writes:

> Greg Troxel <gdt at lexort.com> writes:
>
>>   ---- 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
>
> This seems to be because pgxs ends up with
>
>   install_sh = $(SHELL) $(top_srcdir)/config/install-sh -c
>
> and
>
>   MKDIR_P = ${SHELL} ${top_srcdir}/config/install-sh -c -d
>
> and when it tries to use it, top_srcdir is not defined, because topology
> does not set it.
>
> So:
>
>   is my postgresql build broken, and if so why and how?
>
>   is topology/Makefile.in broken because it uses pgxs and does not
>   define top_srcdir?
>
>   something else?

autoconf is broken, in that it rejects mkdir unless it has --version
(not specified by POSIX :) and is coreuils, more or less.  That is fixed
in upstream autoconf, so after postgresql's make dist host updates
autoconf and pkgsrc upgrades, pgxs will have "mkdir -p" for MKDIR_P.

There is still something wrong; pgxs is trying to recognize a relative
path and do something to it so pgxs users are ok, but at least in
topology that fails.  In other dirs, it seems ok.

pkgsrc now forces autoconf to use mkdir when building postgresql, and
this is vague and likely hard to fix, so I think I'm done trying, but I
thought I should follow up for the archives.

If anybody wants to debug this:

  Rebuild (and reinstall) postgresql, but munge configure so that system
  mkdir is rejected for MKDIR_P.   verify that MKDIR_P is install-sh
  instead of "mkdir -p".

  Build and install postgis.
  
-------------- 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/20221016/9c38ddf1/attachment.sig>


More information about the postgis-devel mailing list