[postgis-tickets] [PostGIS] #5469: make install fails on extensions

PostGIS trac at osgeo.org
Mon Aug 7 05:38:31 PDT 2023


#5469: make install fails on extensions
-----------------------------------+---------------------------
 Reporter:  tbussmann              |      Owner:  strk
     Type:  defect                 |     Status:  new
 Priority:  medium                 |  Milestone:  PostGIS 3.4.0
Component:  build/upgrade/install  |    Version:  master
 Keywords:                         |
-----------------------------------+---------------------------
 When building 3.4.0rc1 on macOS (with `--prefix`, if that matters) I get
 an error during `make install`:

 {{{
 ---- Making install in extensions
 for DIR in postgis postgis_tiger_geocoder postgis_raster postgis_topology
 postgis_sfcgal address_standardizer; do \
                 echo "---- Making install in ${DIR}"; \
                 /Library/Developer/CommandLineTools/usr/bin/make -C
 "${DIR}" install || exit 1; \
         done
 ---- Making install in postgis
 /bin/sh ../../config/install-sh -c -d
 '/Applications/Postgres.app/Contents/Versions/16/share/postgresql/extension'
 /bin/sh: ../../config/install-sh: No such file or directory
 make[3]: *** [installdirs] Error 127
 make[2]: *** [install] Error 1
 make[1]: *** [install] Error 1
 }}}

 This seems to be rooted in [6544f769/git] where `PGXS`s definition of
 `top_builddir` and `top_absbuilddir` were locally overwritten. In my build
 these end up as `../..` (cannot judge whether this makes sense or not).
 The make target `install` as provided by `PGXS` uses the variable
 `MKDIR_P` whose definition from `Makefile.global` refers to `top_builddir`
 resulting in the non-existing path `../../config/install-sh`.

 Not knowing why `top_builddir` was overwritten in the first place, one way
 to circumvent this problem is to persist `PGXS`'s `MKDIR_P` in a simply
 expanded variable just after the `include $(PGXS)` with `MKDIR_P :=
 $(MKDIR_P)` or to overwrite `MKDIR_P` to PostGIS's version by adding
 `MKDIR_P = @MKDIR_P@` in the `Makefile.in`s. Attached a works-for-me patch
 that implements the latter, but I don't know if this is the correct
 approach to this problem.

 If I read `Makefile.global` correctly, the same could happen to `INSTALL`
 as well, if `PGXS`'s version is used instead of `/usr/bin/install`.
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5469>
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