[mapserver-users] Cannot compile mapserver 7 with postgis

Jeff McKenna jmckenna at gatewaygeomatics.com
Tue Jun 18 05:26:13 PDT 2019


You are likely missing a switch at the cmake command, such as:

cmake -DPOSTGRESQL_LIBRARY=/usr/local/pgsql/lib/libpq.so -DWITH_POSTGIS=1

Make sure you also install the dev libs for PostgreSQL, such as:

   sudo apt-get install postgresql-server-dev-10


-jeff



-- 
Jeff McKenna
MapServer Consulting and Training Services
https://gatewaygeomatics.com/



On 2019-06-18 9:05 AM, Sebastiano Laini wrote:
> Hi all,
> 
> I’m trying to compile MapServer 7 with:
> 
> Proj 6
> 
> Geos 3.7
> 
> Gdal 3.0
> 
> PostGis 2.5
> 
> Postgres 10
> 
> But for some reason it complaining about pg_config not found, I usually 
> use /usr/pgsql-10/bin/pg_config to compile software that need the same 
> file but with MapServer 7 I can’t
> 
> Here my cmake :
> 
> cmake -DCMAKE_INSTALL_PREFIX=/opt \
> 
>          
> -DCMAKE_PREFIX_PATH=/usr/pgsql-10/bin:/usr/local/src/postgis-2.5.2:/usr/local:/opt:/usr/local/src 
> \
> 
>          -DWITH_CLIENT_WFS=ON \
> 
>          -DWITH_CLIENT_WMS=ON \
> 
>          -DWITH_CURL=ON \
> 
>          -DWITH_SOS=ON \
> 
>          -DWITH_FCGI=0 \
> 
>          -DWITH_PERL=0 \
> 
>          -DWITH_RUBY=0 \
> 
>          -DWITH_JAVA=0 \
> 
>          -DWITH_CSHARP=0 \
> 
>          -DWITH_PYTHON=0 \
> 
>          -DWITH_SVGCAIRO=0 \
> 
>          -DWITH_FRIBIDI=0 \
> 
>          -DWITH_PROTOBUFC=0 \
> 
>          -DWITH_CAIRO=0 \
> 
>          -DWITH_HARFBUZZ=0 \
> 
>          -DWITH_ORACLESPATIAL=0 \
> 
>          -DWITH_MSSQL2008=0 \
> 
>          ../ >../configure.out.txt
> 
> How can I compile it with PostGis support?
> 
> Sebastiano Laini
> 
> Web Developer
> 
> Buchanan Computing
> 
> 
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/mapserver-users
> 



More information about the mapserver-users mailing list