[postgis-tickets] [PostGIS] #5264: make install error when compiling from source while processing 'topology' subdirectory for version > 3.1.7

PostGIS trac at osgeo.org
Mon Oct 24 10:05:47 PDT 2022


#5264: make install error when compiling from source while processing 'topology'
subdirectory for version > 3.1.7
----------------------+-----------------------------------------
  Reporter:  louisd   |      Owner:  pramsey
      Type:  defect   |     Status:  new
  Priority:  medium   |  Milestone:  PostGIS 3.3.2
 Component:  postgis  |    Version:  3.3.x
Resolution:           |   Keywords:  make install topology error
----------------------+-----------------------------------------
Description changed by louisd:

Old description:

> Compiling postgis on alpine/musl with postgresql 15 (also tested with
> 14.5) works with version 3.1.7 but other newer versions (tested with
> 3.2.1 and 3.3.1) fail at the make install step. Workaround found,
> explained below.
>  (./configure.sh and make were executed on both versions before the "make
> install" step shown here)
>
> {{{
> bash-5.1# cd /install/postgis-3.1.7/topology
> bash-5.1# make install
> /bin/sh /usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh
> -c -d '/usr/local/pgsql/lib'
> /bin/sh /usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh
> -c -d '/usr/local/pgsql/share/contrib/postgis-3.1'
> /usr/bin/install -c -m 755  postgis_topology-3.so
> '/usr/local/pgsql/lib/postgis_topology-3.so'
> /usr/bin/install -c -m 644  topology.sql topology_upgrade.sql
> uninstall_topology.sql '/usr/local/pgsql/share/contrib/postgis-3.1/'
>

> bash-5.1# cd /install/postgis-3.3.1/topology
> bash-5.1# make install
> /bin/sh ../config/install-sh -c -d '/usr/local/pgsql/lib'
> /bin/sh: can't open '../config/install-sh': No such file or directory
> make: ***
> [/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/Makefile.shlib:471:
> installdirs-lib] Error 2
>
> }}}
>
> The difference between the two seems to be the ../config/install-sh
> (relative path) instead of the full path in the working version
> :/usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh)
>
> Fix applied for now (for me) is:
>
> ln -s /usr/local/pgsql/lib/pgxs/config /install/postgis-3.3.1
>
> Then, execution completes correctly:
>

> {{{
> bash-5.1# ln -s /usr/local/pgsql/lib/pgxs/config /install/postgis-3.3.1
> bash-5.1# make install
> /bin/sh ../config/install-sh -c -d '/usr/local/pgsql/lib'
> /bin/sh ../config/install-sh -c -d
> '/usr/local/pgsql/share/contrib/postgis-3.3'
> /usr/bin/install -c -m 755  postgis_topology-3.so
> '/usr/local/pgsql/lib/postgis_topology-3.so'
> mkdir -p /usr/local/pgsql/bin
> /bin/sh ../libtool --mode=install /usr/bin/install -c
> loader/pgtopo_import "/usr/local/pgsql/bin/pgtopo_import"
> libtool: install: /usr/bin/install -c loader/pgtopo_import
> /usr/local/pgsql/bin/pgtopo_import
> /bin/sh ../libtool --mode=install /usr/bin/install -c
> loader/pgtopo_export "/usr/local/pgsql/bin/pgtopo_export"
> libtool: install: /usr/bin/install -c loader/pgtopo_export
> /usr/local/pgsql/bin/pgtopo_export
> /usr/bin/install -c -m 644  topology.sql topology_upgrade.sql
> uninstall_topology.sql '/usr/local/pgsql/share/contrib/postgis-3.3/'
>
> }}}
>
> Another workaround is to ./configure.sh --without-topology
> it works, but this is not an option for me since topology is needed in
> our database.

New description:

 Compiling postgis on alpine/musl with postgresql 15 (also tested with
 14.5) works with version 3.1.7 but other newer versions (tested with 3.2.1
 and 3.3.1) fail at the make install step. Workaround found, explained
 below.
  (./configure.sh and make were executed on both versions before the "make
 install" step shown here)

 {{{
 bash-5.1# cd /install/postgis-3.1.7/topology
 bash-5.1# make install
 /bin/sh /usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh -c
 -d '/usr/local/pgsql/lib'
 /bin/sh /usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh -c
 -d '/usr/local/pgsql/share/contrib/postgis-3.1'
 /usr/bin/install -c -m 755  postgis_topology-3.so
 '/usr/local/pgsql/lib/postgis_topology-3.so'
 /usr/bin/install -c -m 644  topology.sql topology_upgrade.sql
 uninstall_topology.sql '/usr/local/pgsql/share/contrib/postgis-3.1/'


 bash-5.1# cd /install/postgis-3.3.1/topology
 bash-5.1# make install
 /bin/sh ../config/install-sh -c -d '/usr/local/pgsql/lib'
 /bin/sh: can't open '../config/install-sh': No such file or directory
 make: ***
 [/usr/local/pgsql/lib/pgxs/src/makefiles/../../src/Makefile.shlib:471:
 installdirs-lib] Error 2

 }}}

 The difference between the two seems to be the ../config/install-sh
 (relative path) instead of the full path in the working version
 :/usr/local/pgsql/lib/pgxs/src/makefiles/../../config/install-sh)

 Fix applied for now (for me) is:

 ln -s /usr/local/pgsql/lib/pgxs/config /install/postgis-3.3.1

 Then, execution completes correctly:


 {{{
 bash-5.1# ln -s /usr/local/pgsql/lib/pgxs/config /install/postgis-3.3.1
 bash-5.1# make install
 /bin/sh ../config/install-sh -c -d '/usr/local/pgsql/lib'
 /bin/sh ../config/install-sh -c -d
 '/usr/local/pgsql/share/contrib/postgis-3.3'
 /usr/bin/install -c -m 755  postgis_topology-3.so
 '/usr/local/pgsql/lib/postgis_topology-3.so'
 mkdir -p /usr/local/pgsql/bin
 /bin/sh ../libtool --mode=install /usr/bin/install -c loader/pgtopo_import
 "/usr/local/pgsql/bin/pgtopo_import"
 libtool: install: /usr/bin/install -c loader/pgtopo_import
 /usr/local/pgsql/bin/pgtopo_import
 /bin/sh ../libtool --mode=install /usr/bin/install -c loader/pgtopo_export
 "/usr/local/pgsql/bin/pgtopo_export"
 libtool: install: /usr/bin/install -c loader/pgtopo_export
 /usr/local/pgsql/bin/pgtopo_export
 /usr/bin/install -c -m 644  topology.sql topology_upgrade.sql
 uninstall_topology.sql '/usr/local/pgsql/share/contrib/postgis-3.3/'

 }}}

 Another workaround is to ./configure.sh --without-topology
 it works, but this is not an option for me since topology is needed in our
 database.

 Also tested with the latest git clone done today.

--
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5264#comment:1>
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