<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>Nik,</p>
    <p>weird that the patch didn't work for you. It did for me on a
      SQLite3 build with -DSQLITE_OMIT_PROGRESS_CALLBACK=1 . I've just
      reworked it to amend the commit message and comment not to mention
      iOS<br>
    </p>
    <p>But <a class="moz-txt-link-freetext" href="https://www.sqlite.org/compile.html">https://www.sqlite.org/compile.html</a> doesn't say that this is
      recommended, it says it is "recommended for applications that
      are able to use them [...].
      Not all of these compile-time options are usable by every
      application". <br>
    </p>
    <p>And typically you *don't* want to build SQLite3 with
      SQLITE_THREADSAFE=0 as that "means that SQLite can never
      be used by more than a single thread at a time", which would break
      GDAL multithreaded usage.</p>
    <p>Even<br>
    </p>
    <div class="moz-cite-prefix">Le 12/11/2022 à 04:17, Nik Sands a
      écrit :<br>
    </div>
    <blockquote type="cite"
      cite="mid:EB1DA58A-4626-4B6F-B9BC-512B93366B93@nixanz.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      Hi again,
      <div><br>
      </div>
      <div>I have now resolved this issue by rebuilding SQLite with the
        <span style="font-family: "Helvetica Neue"; font-size:
          13px;">SQLITE_OMIT_PROGRESS_CALLBACK=OFF</span></div>
      <div><font size="2" face="Helvetica Neue"><br>
        </font></div>
      <div><font size="2" face="Helvetica Neue">GDAL 3.6.0 will now
          build successfully with my updated buiild of SQLite.</font></div>
      <div><font size="2" face="Helvetica Neue"><br>
        </font></div>
      <div><font size="2" face="Helvetica Neue">Sorry to have troubled
          you with this one.</font></div>
      <div><font size="2" face="Helvetica Neue"><br>
        </font></div>
      <div>NB:  This may still be worth pursuing within GDAL, since
        SQLite explicitly recommend building with this omitted, as per:
         <a href="https://www.sqlite.org/compile.html"
          moz-do-not-send="true" class="moz-txt-link-freetext">https://www.sqlite.org/compile.html</a></div>
      <div><br>
      </div>
      <div><font style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"
          size="2" face="Helvetica Neue">If you still wished to pursue a
          GDAL fix for possibility of missing </font><span
          style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">sqlite3_progress_handler,
          then it’s worth noting that it’s not an iOS issue, as far as I
          know, since I was not using iOS default SQLite.</span></div>
      <div><font size="2" face="Helvetica Neue"><br>
        </font></div>
      <div><font size="2" face="Helvetica Neue">Cheers,</font></div>
      <div><font size="2" face="Helvetica Neue">Nik.</font></div>
      <div><font size="2" face="Helvetica Neue"><br>
        </font>
        <div><br>
          <blockquote type="cite">
            <div>On 12 Nov 2022, at 1:51 pm, Nik Sands
              <a class="moz-txt-link-rfc2396E" href="mailto:nik@nixanz.com"><nik@nixanz.com></a> wrote:</div>
            <br class="Apple-interchange-newline">
            <div>
              <meta http-equiv="content-type" content="text/html;
                charset=UTF-8">
              <div style="overflow-wrap: break-word; -webkit-nbsp-mode:
                space; line-break: after-white-space;">Hi Even,
                <div><br>
                </div>
                <div>Sorry, I should have mentioned that I’m not using
                  the standard iOS/macOS SQLite (because it does not
                  include <span style="font-family: "Helvetica
                    Neue"; font-size: 13px;">RTREE extension which
                    seems to be required for GDAL</span>).<br>
                  <div><br>
                  </div>
                  <div>I’m using a CMAKE compatible SQLite from:  <a
                      href="https://github.com/azadkuh/sqlite-amalgamation"
                      moz-do-not-send="true"
                      class="moz-txt-link-freetext">https://github.com/azadkuh/sqlite-amalgamation</a> (which
                    was working fine with GDAL 3.5.2)</div>
                  <div><br>
                  </div>
                  <div>I tried building SQLite with:</div>
                  <div><span class="Apple-tab-span" style="white-space:pre">    </span><span class="Apple-tab-span" style="font-family: "Helvetica Neue"; font-size: 13px; white-space: pre;">        </span><span
                      style="font-family: "Helvetica Neue";
                      font-size: 13px;">-DSQLITE_OMIT_PROGRESS_CALLBACK=OFF</span></div>
                  <div><font size="2" face="Helvetica Neue">but it
                      logged that it was ignoring this (not sure why,
                      when it works OK when I specify other options
                      similarly, such as </font><span
                      style="font-family: "Helvetica Neue";
                      font-size: 13px;">-DSQLITE_OMIT_DECLTYPE=OFF</span><span
                      style="font-family: "Helvetica Neue";
                      font-size: small;">)</span></div>
                  <div><br>
                  </div>
                  <div>Anyhow…</div>
                  <div><br>
                  </div>
                  <div>The patch build of GDAL did not resolve the
                    problem, although the output is slightly different.
                     I still got this error (re-pasted from current
                    build, below).</div>
                  <div><br>
                  </div>
                  <div>I’m also trying to figure out how to get <span
                      style="caret-color: rgb(0, 0, 0); font-family:
                      "Helvetica Neue"; font-size: 13px;">SQLITE_OMIT_PROGRESS_CALLBACK
                      disabled in my SQLite build, which may be a better
                      way to go?  Got to figure out the right
                      CMakeLists.txt changes (in SQLite) for this.</span></div>
                  <div><br>
                  </div>
                  <div>Cheers,</div>
                  <div>Nik.</div>
                  <div><br>
                  </div>
                  <div><br>
                  </div>
                  <div>
                    <div>Consolidate compiler generated dependencies of
                      target gdal_unit_test</div>
                    <div>[ 94%] Linking CXX executable
                      gdal_unit_test.app/gdal_unit_test</div>
                    <div>Undefined symbols for architecture arm64:</div>
                    <div>  "_sqlite3_progress_handler", referenced from:</div>
                    <div>     
                      OGRGeoPackageTableLayer::GetGeometryTypes(int,
                      int, int&, int (*)(double, char const*,
                      void*), void*) in
                      libgdal.a(ogrgeopackagetablelayer.cpp.o)</div>
                    <div>ld: symbol(s) not found for architecture arm64</div>
                    <div>clang: error: linker command failed with exit
                      code 1 (use -v to see invocation)</div>
                    <div>make[2]: ***
                      [autotest/cpp/gdal_unit_test.app/gdal_unit_test]
                      Error 1</div>
                    <div>make[1]: ***
                      [autotest/cpp/CMakeFiles/gdal_unit_test.dir/all]
                      Error 2</div>
                    <div>make: *** [all] Error 2</div>
                  </div>
                  <div><br>
                    <div><br>
                      <blockquote type="cite">
                        <div>On 12 Nov 2022, at 12:45 pm, Even Rouault
                          <a class="moz-txt-link-rfc2396E" href="mailto:even.rouault@spatialys.com"><even.rouault@spatialys.com></a> wrote:</div>
                        <br class="Apple-interchange-newline">
                        <div>
                          <div>Weird. So it would seem the SQLite3 build
                            on iOS lacks sqlite3_progress_handler()<br>
                            <br>
                            As this is not critical for operations, I've
                            added a CMake configure check for the
                            presence of this function to conditionally
                            enable it.<br>
                            <br>
                            Can you try
                            <a class="moz-txt-link-freetext" href="https://github.com/OSGeo/gdal/pull/6675">https://github.com/OSGeo/gdal/pull/6675</a> ?<br>
                            <br>
                            Even<br>
                            <br>
                            Le 12/11/2022 à 02:32, Nik Sands a écrit :<br>
                            <blockquote type="cite">After patching GDAL
                              3.6.0 for ‘pread64’ issue when building
                              for iOS (see previous email), the build
                              now progresses to the 100% mark, but then
                              fails with the _sqlite3_progress_handler
                              error below.<br>
                              <br>
                              I’m afraid that I don’t even know where to
                              start with this one.  How should I
                              proceed?<br>
                              <br>
                              Cheers,<br>
                              Nik.<br>
                              <br>
                              <br>
                              <br>
                              [100%] Built target check_swq_parser_md5<br>
                              Consolidate compiler generated
                              dependencies of target my_test_sqlite3_ext<br>
                              [100%] Built target my_test_sqlite3_ext<br>
                              [100%] Built target
                              check_ods_formula_parser_md5<br>
                              Consolidate compiler generated
                              dependencies of target test_gdal_fuzzer<br>
                              [100%] Linking CXX executable
                              test_gdal_fuzzer.app/test_gdal_fuzzer<br>
                              Undefined symbols for architecture arm64:<br>
                                "_sqlite3_progress_handler", referenced
                              from:<br>
      OGRGeoPackageTableLayer::GetGeometryTypes(int, int, int&, int
                              (*)(double, char const*, void*), void*) in
                              libgdal.a(ogrgeopackagetablelayer.cpp.o)<br>
                              ld: symbol(s) not found for architecture
                              arm64<br>
                              clang: error: linker command failed with
                              exit code 1 (use -v to see invocation)<br>
                              make[2]: ***
                              [fuzzers/tests/test_gdal_fuzzer.app/test_gdal_fuzzer]
                              Error 1<br>
                              make[1]: ***
                              [fuzzers/tests/CMakeFiles/test_gdal_fuzzer.dir/all]
                              Error 2<br>
                              make: *** [all] Error 2<br>
_______________________________________________<br>
                              gdal-dev mailing list<br>
                              <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
                            </blockquote>
                            <br>
                            -- <br>
                            <a class="moz-txt-link-freetext" href="http://www.spatialys.com">http://www.spatialys.com</a><br>
                            My software is free, but my time generally
                            not.<br>
                            <br>
_______________________________________________<br>
                            gdal-dev mailing list<br>
                            <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
                          </div>
                        </div>
                      </blockquote>
                    </div>
                    <br>
                    <div>
                      <div style="letter-spacing: normal; text-align:
                        start; text-indent: 0px; text-transform: none;
                        white-space: normal; word-spacing: 0px;
                        -webkit-text-stroke-width: 0px; overflow-wrap:
                        break-word; -webkit-nbsp-mode: space;
                        line-break: after-white-space;">
                        <div style="letter-spacing: normal; text-align:
                          start; text-indent: 0px; text-transform: none;
                          white-space: normal; word-spacing: 0px;
                          -webkit-text-stroke-width: 0px; overflow-wrap:
                          break-word; -webkit-nbsp-mode: space;
                          line-break: after-white-space;">
                          <div style="letter-spacing: normal;
                            text-align: start; text-indent: 0px;
                            text-transform: none; white-space: normal;
                            word-spacing: 0px;
                            -webkit-text-stroke-width: 0px;
                            overflow-wrap: break-word;
                            -webkit-nbsp-mode: space; line-break:
                            after-white-space;">
                            <div style="letter-spacing: normal;
                              text-align: start; text-indent: 0px;
                              text-transform: none; white-space: normal;
                              word-spacing: 0px;
                              -webkit-text-stroke-width: 0px;
                              overflow-wrap: break-word;
                              -webkit-nbsp-mode: space; line-break:
                              after-white-space;">
                              <div style="letter-spacing: normal;
                                text-align: start; text-indent: 0px;
                                text-transform: none; white-space:
                                normal; word-spacing: 0px;
                                -webkit-text-stroke-width: 0px;
                                overflow-wrap: break-word;
                                -webkit-nbsp-mode: space; line-break:
                                after-white-space;">
                                <div style="font-family: Helvetica;
                                  font-size: 12px; font-style: normal;
                                  font-variant-ligatures: normal;
                                  font-variant-numeric: normal;
                                  font-variant-caps: normal;
                                  font-variant-alternates: normal;
                                  font-variant-east-asian: normal;
                                  font-variant-position: normal;
                                  font-weight: normal; letter-spacing:
                                  normal; line-height: normal; orphans:
                                  2; text-align: start; text-indent:
                                  0px; text-transform: none;
                                  white-space: normal; widows: 2;
                                  word-spacing: 0px;
                                  -webkit-text-stroke-width: 0px;"><br
                                    class="Apple-interchange-newline">
========================================================</div>
                                <div style="font-family: Helvetica;
                                  font-size: 12px; font-style: normal;
                                  font-variant-ligatures: normal;
                                  font-variant-numeric: normal;
                                  font-variant-caps: normal;
                                  font-variant-alternates: normal;
                                  font-variant-east-asian: normal;
                                  font-variant-position: normal;
                                  font-weight: normal; letter-spacing:
                                  normal; line-height: normal; orphans:
                                  2; text-align: start; text-indent:
                                  0px; text-transform: none;
                                  white-space: normal; widows: 2;
                                  word-spacing: 0px;
                                  -webkit-text-stroke-width: 0px;">NIK
                                  SANDS</div>
                                <div style="font-family: Helvetica;
                                  font-size: 12px; font-style: normal;
                                  font-variant-ligatures: normal;
                                  font-variant-numeric: normal;
                                  font-variant-caps: normal;
                                  font-variant-alternates: normal;
                                  font-variant-east-asian: normal;
                                  font-variant-position: normal;
                                  font-weight: normal; letter-spacing:
                                  normal; line-height: normal; orphans:
                                  2; text-align: start; text-indent:
                                  0px; text-transform: none;
                                  white-space: normal; widows: 2;
                                  word-spacing: 0px;
                                  -webkit-text-stroke-width: 0px;">Line
                                  Tamer | Time Traveller | Space Cadet</div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                    </div>
                    <br>
                  </div>
                </div>
              </div>
              _______________________________________________<br>
              gdal-dev mailing list<br>
              <a class="moz-txt-link-abbreviated" href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
              <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/gdal-dev">https://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
            </div>
          </blockquote>
        </div>
        <br>
        <div>
          <div style="color: rgb(0, 0, 0); letter-spacing: normal;
            orphans: auto; text-align: start; text-indent: 0px;
            text-transform: none; white-space: normal; widows: auto;
            word-spacing: 0px; -webkit-text-stroke-width: 0px;
            word-wrap: break-word; -webkit-nbsp-mode: space;
            -webkit-line-break: after-white-space;">
            <div style="color: rgb(0, 0, 0); letter-spacing: normal;
              orphans: auto; text-align: start; text-indent: 0px;
              text-transform: none; white-space: normal; widows: auto;
              word-spacing: 0px; -webkit-text-stroke-width: 0px;
              word-wrap: break-word; -webkit-nbsp-mode: space;
              -webkit-line-break: after-white-space;">
              <div style="color: rgb(0, 0, 0); letter-spacing: normal;
                orphans: auto; text-align: start; text-indent: 0px;
                text-transform: none; white-space: normal; widows: auto;
                word-spacing: 0px; -webkit-text-stroke-width: 0px;
                word-wrap: break-word; -webkit-nbsp-mode: space;
                -webkit-line-break: after-white-space;">
                <div style="color: rgb(0, 0, 0); letter-spacing: normal;
                  orphans: auto; text-align: start; text-indent: 0px;
                  text-transform: none; white-space: normal; widows:
                  auto; word-spacing: 0px; -webkit-text-stroke-width:
                  0px; word-wrap: break-word; -webkit-nbsp-mode: space;
                  -webkit-line-break: after-white-space;">
                  <div style="color: rgb(0, 0, 0); letter-spacing:
                    normal; orphans: auto; text-align: start;
                    text-indent: 0px; text-transform: none; white-space:
                    normal; widows: auto; word-spacing: 0px;
                    -webkit-text-stroke-width: 0px; word-wrap:
                    break-word; -webkit-nbsp-mode: space;
                    -webkit-line-break: after-white-space;">
                    <div style="color: rgb(0, 0, 0); font-family:
                      Helvetica; font-size: 12px; font-style: normal;
                      font-variant: normal; font-weight: normal;
                      letter-spacing: normal; line-height: normal;
                      orphans: 2; text-align: start; text-indent: 0px;
                      text-transform: none; white-space: normal; widows:
                      2; word-spacing: 0px; -webkit-text-stroke-width:
                      0px;"><br class="Apple-interchange-newline">
========================================================</div>
                    <div style="color: rgb(0, 0, 0); font-family:
                      Helvetica; font-size: 12px; font-style: normal;
                      font-variant: normal; font-weight: normal;
                      letter-spacing: normal; line-height: normal;
                      orphans: 2; text-align: start; text-indent: 0px;
                      text-transform: none; white-space: normal; widows:
                      2; word-spacing: 0px; -webkit-text-stroke-width:
                      0px;">NIK SANDS</div>
                    <div style="color: rgb(0, 0, 0); font-family:
                      Helvetica; font-size: 12px; font-style: normal;
                      font-variant: normal; font-weight: normal;
                      letter-spacing: normal; line-height: normal;
                      orphans: 2; text-align: start; text-indent: 0px;
                      text-transform: none; white-space: normal; widows:
                      2; word-spacing: 0px; -webkit-text-stroke-width:
                      0px;">Line Tamer | Time Traveller | Space Cadet</div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
        <br>
      </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>