<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
Hi Sean,<br>
<blockquote type="cite"
cite="mid:CAOodmJqtUO--uMQo-utQ1vuP6PJr2UK6b7Td-3odaBTtKWekkw@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>Using the CMake files as a source of truth helps. But
they don't describe everything. For example, they don't
explain that GDAL needs libhdf5 to be built with special
features. That one stumped me for a while. I was seeing a
build message like "HDF5 not detected (found version
1.12.1)". I finally found the clue in the vcpkg repo.<br>
</div>
</div>
</div>
</blockquote>
<p>==>
<a class="moz-txt-link-freetext" href="https://gdal.org/development/building_from_source.html#hdf5">https://gdal.org/development/building_from_source.html#hdf5</a>: "The
HDF5 CXX library is needed for the <a class="reference internal"
href="https://gdal.org/drivers/raster/kea.html#raster-kea"><span
class="std std-ref">KEA</span></a> driver."</p>
<p>That said, it isn't obvious to realize that detection of HDF5
fails because of that. That's a bit of a downside with CMake
FindXXXX modules whose output isn't always very helpful.</p>
<p>Actually, I've changed the logic in
<a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/7851">https://github.com/OSGeo/gdal/pull/7851</a> to only check for HDF5 CXX
if we have found libkea before. That reduces the requirements to
what is really needed.<br>
</p>
<blockquote type="cite"
cite="mid:CAOodmJqtUO--uMQo-utQ1vuP6PJr2UK6b7Td-3odaBTtKWekkw@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
<div>Also, the CMake files don't explain that the GDAL MBTiles
driver depends on the OGR MVT driver.</div>
</div>
</div>
</blockquote>
<p>Also fixed per <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/7851">https://github.com/OSGeo/gdal/pull/7851</a>. It is
easy to miss capturing such dependencies to a driver that is
built-in by default</p>
<p>Even<br>
</p>
<blockquote type="cite"
cite="mid:CAOodmJqtUO--uMQo-utQ1vuP6PJr2UK6b7Td-3odaBTtKWekkw@mail.gmail.com">
<div dir="ltr">
<div dir="ltr">
<div><br>
</div>
</div>
<br>
<div class="gmail_quote">
<div dir="ltr" class="gmail_attr">On Mon, May 22, 2023 at
8:53 AM 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>Hi Sean,</p>
<p>I presume you got this because you defined
OGR_BUILD_OPTIONAL_DRIVERS=OFF which then cause <span><span>
OGR_ENABLE_DRIVER_AVC to be set to OFF.</span></span></p>
<p><span><span>We already a quite overwhelming amount of
documentation in <a
href="https://gdal.org/development/building_from_source.html"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://gdal.org/development/building_from_source.html</a>
about all the existing variables, and I'm not sure
adding an exhaustive list of all the inter driver
dependencies will be user-digestable and could rot
easily.<br>
</span></span></p>
<p><span><span>That said in </span></span><a
href="https://github.com/OSGeo/gdal/pull/7806"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://github.com/OSGeo/gdal/pull/7806</a>
I've tried to improve the current error message with a
hint for the reason for the error and the (likely)
reason for it to happen. <br>
</p>
<p>I've also added pointers in the doc page to the
CMakeLists.txt files where the dependencies are
expressed. Hopefully people who are in the business of
making custom GDAL builds can make sense of that.<br>
</p>
<p>Even<br>
</p>
<div>Le 20/05/2023 à 01:26, Sean Gillies a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi all,</div>
<div><br>
</div>
<div>I really appreciate the documentation at <a
href="https://gdal.org/development/building_from_source.html"
target="_blank" moz-do-not-send="true"
class="moz-txt-link-freetext">https://gdal.org/development/building_from_source.html</a>.
But there are gaps. For example, today I ran into <br>
</div>
<div><br>
</div>
<div>
<div>
<div><span> <span>CMake Error at
cmake/helpers/GdalDriverHelper.cmake:331
(message): </span></span> </div>
</div>
<div>
<div> </div>
</div>
<div>
<div> <span> <span> GDAL_ENABLE_DRIVER_AIGRID
cannot be enabled because condition </span></span>
</div>
</div>
<div>
<div> </div>
</div>
<div>
<div> <span> <span> OGR_ENABLE_DRIVER_AVC is not
met. To ignore this error (but the driver </span></span>
</div>
</div>
<div>
<div> </div>
</div>
<span> <span> will not be built), set the
GDAL_IGNORE_FAILED_CONDITIONS variable</span></span></div>
<div><span><span><br>
</span></span></div>
<div><span><span>This dependence isn't documented.
It's a bit frustrating to work through missing
directives one at a time when adding new drivers
to my build.<br>
</span></span></div>
<div><span><span><br>
</span></span></div>
<div><span><span>Is it possible for </span></span>a
driver's dependencies to be enabled when I enable a
driver?</div>
<div><br>
</div>
<div>If not, can we consider using GDAL maintenance
funding and resources on documenting the heck out of
this system?<br>
</div>
</div>
</blockquote>
</div>
</blockquote>
</div>
<br clear="all">
<br>
<span class="gmail_signature_prefix">-- </span><br>
<div dir="ltr" class="gmail_signature">Sean Gillies</div>
</div>
<br>
<fieldset class="moz-mime-attachment-header"></fieldset>
<pre class="moz-quote-pre" wrap="">_______________________________________________
gdal-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a>
</pre>
</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>