[gdal-dev] GDAL compilation with driver OGR_PG
Johannes Paul
johannespaul92 at gmail.com
Mon Nov 28 06:55:03 PST 2022
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20221128/a2193c62/attachment.htm>
More information about the gdal-dev
mailing list