<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p><br>
    </p>
    <div class="moz-cite-prefix">Le 26/01/2022 à 20:08, Joaquim Manuel
      Freire Luís a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:AM6PR04MB3959C122F51E1CEF03A2A7EDA6209@AM6PR04MB3959.eurprd04.prod.outlook.com">
      <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
      <meta name="Generator" content="Microsoft Word 15 (filtered
        medium)">
      <!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]-->
      <style>@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;}a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}p.MsoPlainText, li.MsoPlainText, div.MsoPlainText
        {mso-style-priority:99;
        mso-style-link:"Plain Text Char";
        margin:0in;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0in;
        font-size:10.0pt;
        font-family:"Courier New";}span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:Consolas;}span.PlainTextChar
        {mso-style-name:"Plain Text Char";
        mso-style-priority:99;
        mso-style-link:"Plain Text";
        font-family:"Calibri",sans-serif;}span.EmailStyle24
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:windowtext;}.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}div.WordSection1
        {page:WordSection1;}</style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">Updated master (sorry, didn’t stop to think if
            the commit had been merged)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">However, I have cmake 3.22.1 but it doesn’t
            have a FindHDF4.cmake, only a FinfHDF5</span></p>
      </div>
    </blockquote>
    FindHDF4.cmake is in the GDAL repository, in
    cmake/modules/packages/FindHDF4.cmake, so you can try editing it
    locally with my below suggestions<br>
    <blockquote type="cite"
cite="mid:AM6PR04MB3959C122F51E1CEF03A2A7EDA6209@AM6PR04MB3959.eurprd04.prod.outlook.com">
      <div class="WordSection1">
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">I was building with<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">               set(HDF4_INCLUDE_DIR
            C:/programs/compa_libs/hdf-4.2.9/compileds/VC14_34/include)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">               set(HDF4_df_LIBRARY_RELEASE
            C:/programs/compa_libs/hdf-4.2.9/compileds/VC14_64/lib/hdfdll.lib)<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">           set(HDF4_mfhdf_LIBRARY_RELEASE
            C:/programs/compa_libs/hdf-4.2.9/compileds/VC14_64/lib/mfhdfdll.lib)
            <o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US">and when I commented those lines the build
            advance … till it stop at the “Cannot open include file:
            'zlib.h'” but that is normal since I’m not using the commit
            who fixed it.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
            lang="EN-US"><o:p> </o:p></span></p>
        <div>
          <div style="border:none;border-top:solid #E1E1E1
            1.0pt;padding:3.0pt 0in 0in 0in">
            <p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span
                lang="EN-US"> Even Rouault
                <a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a>
                <br>
                <b>Sent:</b> Wednesday, January 26, 2022 6:50 PM<br>
                <b>To:</b> Joaquim Manuel Freire Luís
                <a class="moz-txt-link-rfc2396E" href="mailto:jluis@ualg.pt"><jluis@ualg.pt></a>; <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
                <b>Subject:</b> Re: [gdal-dev] cmake status update - 99%
                good news!<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p> </o:p></p>
        <p>did you update to master or did you try my pull request (not
          merged yet) ?<o:p></o:p></p>
        <p>If only master, can you try to change the reference to
          "ws2_32.lib" to "ws2_32" in
          cmake/modules/packages/FindHDF4.cmake as I suggested ?<o:p></o:p></p>
        <p>Or perhaps change the if (WIN32) at line 91 to if (MSVC)<o:p></o:p></p>
        <div>
          <p class="MsoNormal">Le 26/01/2022 à 19:43, Joaquim Manuel
            Freire Luís a écrit :<o:p></o:p></p>
        </div>
        <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
          <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
              lang="EN-US">Don’t know which commit did it. Updated this
              afternoon and started to erroring right away with missing
              'ws2_32.lib`</span><o:p></o:p></p>
          <p class="MsoNormal"><span style="mso-fareast-language:EN-US"
              lang="EN-US"> </span><o:p></o:p></p>
          <div>
            <div style="border:none;border-top:solid #E1E1E1
              1.0pt;padding:3.0pt 0in 0in 0in">
              <p class="MsoNormal"><b><span lang="EN-US">From:</span></b><span
                  lang="EN-US"> Even Rouault
                  <a href="mailto:even.rouault@spatialys.com"
                    moz-do-not-send="true"><even.rouault@spatialys.com></a>
                  <br>
                  <b>Sent:</b> Wednesday, January 26, 2022 6:36 PM<br>
                  <b>To:</b> Joaquim Manuel Freire Luís <a
                    href="mailto:jluis@ualg.pt" moz-do-not-send="true"><jluis@ualg.pt></a>;
                  <a href="mailto:gdal-dev@lists.osgeo.org"
                    moz-do-not-send="true" class="moz-txt-link-freetext">gdal-dev@lists.osgeo.org</a><br>
                  <b>Subject:</b> Re: [gdal-dev] cmake status update -
                  99% good news!</span><o:p></o:p></p>
            </div>
          </div>
          <p class="MsoNormal"> <o:p></o:p></p>
          <p> <o:p></o:p></p>
          <div>
            <p class="MsoNormal">Le 26/01/2022 à 19:31, Joaquim Manuel
              Freire Luís a écrit :<o:p></o:p></p>
          </div>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoPlainText"><span lang="EN-US">I do have HDF4
                but before I was able to build till the end. I've here a
                gdal_w64.dll smiling to me. That's why I said it got
                worst.</span><o:p></o:p></p>
          </blockquote>
          <p class="MsoNormal">Sorry you lost me. Is <a
              href="https://github.com/OSGeo/gdal/pull/5179"
              moz-do-not-send="true">
              <span style="color:windowtext;text-decoration:none">https://github.com/OSGeo/gdal/pull/5179</span></a>
            helping or not ?  If not helping, which commit in it is
            causing an issue ?<br>
            <br>
            <br>
            <o:p></o:p></p>
          <blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
            <p class="MsoPlainText"><span style="color:black"
                lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoPlainText"><img
                style="width:3.7416in;height:3.4833in"
                id="Picture_x0020_1"
                src="cid:part1.7EMnBP5a.z0bnTCd6@spatialys.com" class=""
                width="359" height="334" border="0"><o:p></o:p></p>
            <p class="MsoPlainText"><span lang="EN-US"> </span><o:p></o:p></p>
            <p class="MsoPlainText">Le 26/01/2022 à 17:26, Joaquim
              Manuel Freire Luís a écrit :<o:p></o:p></p>
            <p class="MsoPlainText">> <o:p></o:p></p>
            <p class="MsoPlainText">> Joaquim,<o:p></o:p></p>
            <p class="MsoPlainText">>> But I found two other new
              issues when adding more dependencies<o:p></o:p></p>
            <p class="MsoPlainText">>> <o:p></o:p></p>
            <p class="MsoPlainText">>> 1.<o:p></o:p></p>
            <p class="MsoPlainText">>>
              C:\programs\compa_libs\gdal_GIT\frmts\mbtiles\mbtilesdataset.cpp(45):
              <o:p></o:p></p>
            <p class="MsoPlainText">>> fatal error C1083: Cannot
              open include file: 'zlib.h': No such file
              <o:p></o:p></p>
            <p class="MsoPlainText">>> or directory<o:p></o:p></p>
            <p class="MsoPlainText">>> <o:p></o:p></p>
            <p class="MsoPlainText">>> To work around this, I
              temporarily added zlib.h and zconf.h to
              <o:p></o:p></p>
            <p class="MsoPlainText">>> frmts\mbtiles<o:p></o:p></p>
            <p class="MsoPlainText">> Should be fixed by the first
              commit of<o:p></o:p></p>
            <p class="MsoPlainText">> <a
                href="https://github.com/OSGeo/gdal/pull/5179"
                moz-do-not-send="true"><span
                  style="color:windowtext;text-decoration:none">https://github.com/OSGeo/gdal/pull/5179</span></a><o:p></o:p></p>
            <p class="MsoPlainText">> <o:p></o:p></p>
            <p class="MsoPlainText">> I'm afraid it got worst<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">-- Configuring done<o:p></o:p></p>
            <p class="MsoPlainText">-- Generating done<o:p></o:p></p>
            <p class="MsoPlainText">-- Build files have been written to:
              C:/programs/compa_libs/gdal_GIT/build<o:p></o:p></p>
            <p class="MsoPlainText">ninja: error: 'ws2_32.lib', needed
              by 'gdal_w64.dll', missing and no known rule to make it<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">I'd say on the contrary that it
              helped the build to go further, didn't it ? My fixes are
              totally unrelated to a ws2_32.lib missing<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">I see in configure.ac that we had
              the following logic<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">dnl<o:p></o:p></p>
            <p class="MsoPlainText">---------------------------------------------------------------------------<o:p></o:p></p>
            <p class="MsoPlainText">dnl Check if we need -lws2_32
              (mingw)<o:p></o:p></p>
            <p class="MsoPlainText">dnl<o:p></o:p></p>
            <p class="MsoPlainText">---------------------------------------------------------------------------<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">echo "#include <winsock2.h>"
              > test_ws2_32.c echo "#include <ws2tcpip.h>"
              >> test_ws2_32.c echo "void foo() {}" >>
              test_ws2_32.c<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">if test -z "`${CC} -c test_ws2_32.c
              2>&1`" ; then<o:p></o:p></p>
            <p class="MsoPlainText">  LIBS="$LIBS -lws2_32"<o:p></o:p></p>
            <p class="MsoPlainText">fi<o:p></o:p></p>
            <p class="MsoPlainText">rm -f test_ws2_32*<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">dnl<o:p></o:p></p>
            <p class="MsoPlainText">---------------------------------------------------------------------------<o:p></o:p></p>
            <p class="MsoPlainText">dnl Check if we need -lpsapi (mingw)<o:p></o:p></p>
            <p class="MsoPlainText">dnl<o:p></o:p></p>
            <p class="MsoPlainText">---------------------------------------------------------------------------<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">echo "#include <windows.h>"
              > test_psapi.c echo "#include <psapi.h>" >>
              test_psapi.c echo "void foo() {}" >> test_psapi.c<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">if test -z "`${CC} -c test_psapi.c
              2>&1`" ; then<o:p></o:p></p>
            <p class="MsoPlainText">  LIBS="$LIBS -lpsapi"<o:p></o:p></p>
            <p class="MsoPlainText">fi<o:p></o:p></p>
            <p class="MsoPlainText">rm -f test_psapi*<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">This hasn't been ported yet to cmake
              builds.<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">I've ticketed that in <a
                href="https://github.com/OSGeo/gdal/issues/5180"
                moz-do-not-send="true">
                <span style="color:windowtext;text-decoration:none">https://github.com/OSGeo/gdal/issues/5180</span></a>.<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">Hum, upon reflection, the error
              message would seem to indicate that we try to link to
              ws2_32.lib but it is not found in your environemnt<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">Looking for ws2_32 in cmake build
              scripts, I see it is referenced in<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">cmake/modules/packages/FindODBC.cmake:
              set(_odbc_required_libs_names<o:p></o:p></p>
            <p class="MsoPlainText">odbccp32;ws2_32)<o:p></o:p></p>
            <p class="MsoPlainText">cmake/modules/packages/FindHDF4.cmake:       
              list(APPEND HDF4_LIBRARIES<o:p></o:p></p>
            <p class="MsoPlainText">ws2_32.lib)<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">Do you use any of ODBC or HDF4 in
              your build ? Could you try to disable them and see if it
              makes a difference ?<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">Or maybe if you've HDF4, try to
              change the ws2_32.lib to ws2_32 in
              cmake/modules/packages/FindHDF4.cmake ?<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">Even<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
            <p class="MsoPlainText">--<o:p></o:p></p>
            <p class="MsoPlainText"><a href="http://www.spatialys.com"
                moz-do-not-send="true"><span
                  style="color:windowtext;text-decoration:none">http://www.spatialys.com</span></a><o:p></o:p></p>
            <p class="MsoPlainText">My software is free, but my time
              generally not.<o:p></o:p></p>
            <p class="MsoPlainText"> <o:p></o:p></p>
          </blockquote>
          <pre>-- <o:p></o:p></pre>
          <pre><a href="http://www.spatialys.com" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a><o:p></o:p></pre>
          <pre>My software is free, but my time generally not.<o:p></o:p></pre>
        </blockquote>
        <pre>-- <o:p></o:p></pre>
        <pre><a href="http://www.spatialys.com" moz-do-not-send="true" class="moz-txt-link-freetext">http://www.spatialys.com</a><o:p></o:p></pre>
        <pre>My software is free, but my time generally not.<o:p></o:p></pre>
      </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>