<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6816">https://github.com/OSGeo/gdal/pull/6816</a> should make it much more
      obvious with an explicit fatal error when explicitly enabling a
      driver whose requirements are not met.<br>
    </p>
    <div class="moz-cite-prefix">Le 28/11/2022 à 17:47, Johannes Paul a
      écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACcmK9a-brZnVFtTPUNzFNgqJZ6-1TRY9eTkfYC_f+52fmCYtQ@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="ltr">Perfect ! Thank you very much.
        <div>Johannes</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Mon, 28 Nov 2022 at 16:16,
          Even Rouault <<a href="mailto:even.rouault@spatialys.com"
            moz-do-not-send="true" class="moz-txt-link-freetext">even.rouault@spatialys.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
          <div>
            <p>Johannes,</p>
            <p>minimum or near-minimum builds are tricky because of
              inter-driver dependencies.<br>
            </p>
            <p>You also need to add -DOGR_ENABLE_DRIVER_PGDUMP=ON</p>
            <p>Cf 
              <a
href="https://github.com/OSGeo/gdal/blob/b2c689436208e72518f4cd60fb5e27d6d985a621/ogr/ogrsf_frmts/CMakeLists.txt#L87"
                target="_blank" moz-do-not-send="true"
                class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/blob/b2c689436208e72518f4cd60fb5e27d6d985a621/ogr/ogrsf_frmts/CMakeLists.txt#L87</a>:</p>
            <p>{{{<br>
            </p>
            <p>ogr_dependent_driver(pg PostGIS <span>"GDAL_USE_POSTGRESQL;OGR_ENABLE_DRIVER_PGDUMP"</span>)</p>
            <p>}}}<br>
            </p>
            <p>Even<br>
            </p>
            <div>Le 28/11/2022 à 15:55, Johannes Paul a écrit :<br>
            </div>
            <blockquote type="cite">
              <div dir="ltr">Hello,
                <div>i'm having trouble getting GDAL compiled on Centos
                  7 and 8 with OGR PostgreSQL driver.</div>
                <div>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:</div>
                <div><br>
                </div>
                <div>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<br>
                </div>
                <div><br>
                </div>
                <div>I do get -- Found PostgreSQL: /opt/i4d/lib/libpq.so
                  (found version "13.3"), however OGR_PG is still
                  disabled.</div>
                <div>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.</div>
                <div><br>
                </div>
                <div>Thanks,</div>
                <div>Johannes</div>
              </div>
              <br>
              <fieldset></fieldset>
              <pre>_______________________________________________
gdal-dev mailing list
<a href="mailto:gdal-dev@lists.osgeo.org" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
            </blockquote>
            <pre cols="72">-- 
<a href="http://www.spatialys.com" target="_blank" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
          </div>
        </blockquote>
      </div>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
<a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
  </body>
</html>