[postgis-tickets] [PostGIS] #5177: Can't build commandline tools only and =-without-pgconfig seems broken

PostGIS trac at osgeo.org
Thu Jun 30 06:58:23 PDT 2022


#5177: Can't build commandline tools only and =-without-pgconfig seems broken
---------------------+---------------------------
 Reporter:  robe     |      Owner:  pramsey
     Type:  defect   |     Status:  new
 Priority:  medium   |  Milestone:  PostGIS 3.3.0
Component:  postgis  |    Version:  master
 Keywords:           |
---------------------+---------------------------
 I thought we had solved this problem already, but it seems not.

 I tried building the command-line tools on a CentOS, thinking I could do
 it with.


 {{{

 export PKG_CONFIG_PATH="/projects/rel/lib/pkgconfig"
 export
 PATH="/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/projects/rel/lib:/projects/rel/bin:/projects/rel/include"

 ./configure --prefix=/projects/rel --without-protobuf \
   --with-geosconfig=/projects/rel/bin/geos-config \
   --without-pgconfig --without-protobuf \
   --with-libiconv=/projects/rel
 }}}


 What happens with the above, even though I have GDAL installed in
 /projects/rel

 I still get error:


 {{{
 configure: WARNING: gdal.h: present but cannot be compiled
 configure: WARNING: gdal.h:     check for missing prerequisite headers?
 configure: WARNING: gdal.h: see the Autoconf documentation
 configure: WARNING: gdal.h:     section "Present But Cannot Be Compiled"
 configure: WARNING: gdal.h: proceeding with the compiler's result
 checking for gdal.h... no
 configure: error: could not find GDAL headers
 }}}


 If I do


 {{{
 configure: WARNING: gdal.h: present but cannot be compiled
 configure: WARNING: gdal.h:     check for missing prerequisite headers?
 configure: WARNING: gdal.h: see the Autoconf documentation
 configure: WARNING: gdal.h:     section "Present But Cannot Be Compiled"
 configure: WARNING: gdal.h: proceeding with the compiler's result
 checking for gdal.h... no
 configure: error: could not find GDAL headers
 }}}


 If I do,

 {{{

 export PKG_CONFIG_PATH="/projects/rel/lib/pkgconfig"
 export
 PATH="/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/projects/rel/lib:/projects/rel/bin:/projects/rel/include"

 ./configure --prefix=/projects/rel --without-protobuf \
   --with-geosconfig=/projects/rel/bin/geos-config \
   --without-pgconfig --without-protobuf \
   --with-libiconv=/projects/rel \
   --without-raster
 }}}

 Then configure succeeds, and even make completes with:

 {{{

 /usr/bin/ar: creating .libs/liblwgeom.a
 libtool: link: gcc-ranlib .libs/liblwgeom.a
 libtool: link: rm -fr .libs/liblwgeom.lax
 libtool: link: ( cd ".libs" && rm -f "liblwgeom.la" && ln -s
 "../liblwgeom.la" "liblwgeom.la" )

 }}}


 but make install just outputs


 {{{
  make install
 for s in liblwgeom; do \
         echo "---- Making install in ${s}"; \
         make -C ${s} install || exit 1; \
 done;
 }}}




 I would have assumed the shp2pgsql, pgsql2shp would get installed in the
 --prefix folder, but no nothing.  Even building with below the --prefix is
 ignored and all by commandline tools end up in /projects/rel/pg14/bin


 {{{
 export PKG_CONFIG_PATH="/projects/rel/lib/pkgconfig"
 export
 PATH="/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/projects/rel/lib:/projects/rel/bin:/projects/rel/include"
 export PGPATH=/projects/rel/pg14

 ./configure --prefix=/projects/rel --without-protobuf --with-
 pgconfig=${PGPATH}/bin/pg_config \
   --with-geosconfig=/projects/rel/bin/geos-config \
   --with-libiconv=/projects/rel

 make && make install
 }}}


 What I am expecting, is that since shp2pgsql and raster2pgsql do not have
 ANY dependency on PostgreSQL or libpq for that matter, I should be able to
 get those built with below and they should be installed in
 --prefix=/projects/rel/bin


 {{{
 ./configure --prefix=/projects/rel --without-protobuf \
   --with-geosconfig=/projects/rel/bin/geos-config \
   --without-pgconfig --without-protobuf \
   --with-libiconv=/projects/rel \
   --without-raster

 make && make install
 }}}

 I thought this used to work, but perhaps was broken after our numerous
 changes to liblwgeom config

 I'm going to try older versions to see
-- 
Ticket URL: <https://trac.osgeo.org/postgis/ticket/5177>
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