[gdal-dev] GDAL compilation with driver OGR_PG

Johannes Paul johannespaul92 at gmail.com
Mon Nov 28 08:47:01 PST 2022


Perfect ! Thank you very much.
Johannes

On Mon, 28 Nov 2022 at 16:16, Even Rouault <even.rouault at spatialys.com>
wrote:

> Johannes,
>
> minimum or near-minimum builds are tricky because of inter-driver
> dependencies.
>
> You also need to add -DOGR_ENABLE_DRIVER_PGDUMP=ON
>
> Cf
> https://github.com/OSGeo/gdal/blob/b2c689436208e72518f4cd60fb5e27d6d985a621/ogr/ogrsf_frmts/CMakeLists.txt#L87
> :
>
> {{{
>
> ogr_dependent_driver(pg PostGIS
> "GDAL_USE_POSTGRESQL;OGR_ENABLE_DRIVER_PGDUMP")
>
> }}}
>
> Even
> Le 28/11/2022 à 15:55, Johannes Paul a écrit :
>
> Hello,
> i'm having trouble getting GDAL compiled on Centos 7 and 8 with OGR
> PostgreSQL driver.
> I used to compile GDAL using configure --with-pg=yes, which was working
> fine, however since v3.6.0 cmake shall be used, and I can't get OGR_PG
> driver enabled using the following cmake options:
>
> cmake3 .. -UGDAL_ENABLE_DRIVER_* -UOGR_ENABLE_DRIVER_*
> -DOGR_BUILD_OPTIONAL_DRIVERS=OFF -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF
> -DCMAKE_INSTALL_PREFIX="${INSTALLDIR}" -DCMAKE_PREFIX_PATH="${INSTALLDIR}"
> -DCMAKE_BUILD_TYPE=Release -DGDAL_USE_INTERNAL_LIBS=WHEN_NO_EXTERNAL
> -DGDAL_USE_CURL=ON -DGDAL_USE_PNG=ON -DGDAL_USE_PNG_INTERNAL=OFF
> -DPostgreSQL_INCLUDE_DIR="${INSTALLDIR}"/include
> -DPostgreSQL_LIBRARY_RELEASE="${INSTALLDIR}"/lib/libpq.so
> -DGDAL_USE_POSTGRESQL=ON -DGDAL_USE_SQLITE3=ON -DGDAL_USE_ZLIB=ON
> -DGDAL_USE_ZLIB_INTERNAL=OFF -DBUILD_TESTING=OFF
> -DBUILD_PYTHON_BINDINGS=OFF -DBUILD_JAVA_BINDINGS=OFF
> -DBUILD_CSHARP_BINDINGS=OFF -DOGR_ENABLE_DRIVER_GPKG=ON
> -DOGR_ENABLE_DRIVER_SQLITE=ON -DOGR_ENABLE_DRIVER_PG=ON
> -DGDAL_ENABLE_DRIVER_PNG=ON
>
> I do get -- Found PostgreSQL: /opt/i4d/lib/libpq.so (found version
> "13.3"), however OGR_PG is still disabled.
> If I remove -UGDAL_ENABLE_DRIVER_* -UOGR_ENABLE_DRIVER_*
> -DOGR_BUILD_OPTIONAL_DRIVERS=OFF -DGDAL_BUILD_OPTIONAL_DRIVERS=OFF, I do
> get the driver enabled however I'm expecting a minimal GDAL configuration,
> only with the drivers I need for the build.
>
> Thanks,
> Johannes
>
> _______________________________________________
> gdal-dev mailing listgdal-dev at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221128/fc306e4c/attachment-0001.htm>


More information about the gdal-dev mailing list