<!DOCTYPE html>
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>"ldd /path/to/bin/qgis | grep gdal" will show you where the qgis
      binary links GDAL from</p>
    <p>To convince an existing QGIS build to run against another
      libgdal, you may (ab)use LD_LIBRARY_PATH, and you probably need to
      create symlinks so that QGIS finds the right libgdal.X.Y that it
      expects</p>
    <p>Safer way is to build your own QGIS using cmake
      -DGDAL_CONFIG:FILEPATH=/path/to/your/bin/gdal-config<br>
    </p>
    <div class="moz-cite-prefix">Le 23/09/2024 à 13:48, chris hermansen
      via QGIS-User a écrit :<br>
    </div>
    <blockquote type="cite"
cite="mid:CACc2_69KVEqboWbf6S1RsOGt61N_isS1=5P9jyr299=6+RiWCw@mail.gmail.com">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div dir="auto">
        <div>Andrew and list,<br>
          <br>
          <div class="gmail_quote">
            <div dir="ltr" class="gmail_attr">On Mon, Sep 23, 2024,
              00:28 Andrew Plowright via QGIS-User <<a
                href="mailto:qgis-user@lists.osgeo.org"
                moz-do-not-send="true" class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</a>>
              wrote:<br>
            </div>
            <blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div>I do indeed:</div>
                <div><br>
                </div>
                <div>/usr/bin/gdalinfo<br>
                  /bin/gdalinfo</div>
                <div><br>
                </div>
                <div>I suppose that with the
                  -DCMAKE_INSTALL_PREFIX:PATH=/usr parameter, this means
                  that the version of GDAL that I built was in
                  /usr/bin/gdalinfo?</div>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">You can confirm positively by running each
          version using the full path and check which one includes the
          MrSID driver.</div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div><br>
                </div>
                <div>Is there any way to determine where QGIS is looking
                  for GDAL? If that is indeed the problem, is there a
                  way to redirect QGIS towards a different installation
                  of GDAL?<br>
                </div>
              </div>
            </blockquote>
          </div>
        </div>
        <div dir="auto"><br>
        </div>
        <div dir="auto">Maybe this link can help as it offers solutions
          to a similar-sounding problem</div>
        <div dir="auto"><br>
        </div>
        <div dir="auto"><a
href="https://gis.stackexchange.com/questions/258314/handle-two-versions-of-gdal"
            moz-do-not-send="true" class="moz-txt-link-freetext">https://gis.stackexchange.com/questions/258314/handle-two-versions-of-gdal</a></div>
        <div dir="auto">
          <div class="gmail_quote">
            <blockquote class="gmail_quote"
style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
              <div dir="ltr">
                <div><br>
                </div>
                <div>Thanks!<br>
                </div>
              </div>
              <br>
              <div class="gmail_quote">
                <div dir="ltr" class="gmail_attr">On Wed, Sep 18, 2024
                  at 5:04 PM Richard Greenwood <<a
                    href="mailto:richard.greenwood@gmail.com"
                    target="_blank" rel="noreferrer"
                    moz-do-not-send="true" class="moz-txt-link-freetext">richard.greenwood@gmail.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">
                  <p dir="ltr">What do you get from<br>
                        which -a gdalinfo<br>
                    You might have two versions installed. </p>
                  <br>
                  <div class="gmail_quote">
                    <div dir="ltr" class="gmail_attr">On Wed, Sep 18,
                      2024, 4:03 PM Andrew Plowright via QGIS-User <<a
                        href="mailto:qgis-user@lists.osgeo.org"
                        target="_blank" rel="noreferrer"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">qgis-user@lists.osgeo.org</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 dir="ltr">
                        <div class="gmail_quote">
                          <div dir="ltr">
                            <div class="gmail_quote">
                              <div dir="ltr">
                                <div>Operating system: Linux Mint 22
                                  Cinnamon</div>
                                <div>QGIS version: 3.34.4-Prizen</div>
                                <div>GDAL version:
                                  3.10.0dev-1250e96221-dirt</div>
                                <div>MrSid DSDK version: 9.5.5.5244
                                </div>
                                <div><br>
                                </div>
                                <div>I have followed the instructions
                                  provided by the <a
href="https://gdal.org/en/latest/drivers/raster/mrsid.html"
                                    rel="noreferrer noreferrer"
                                    target="_blank"
                                    moz-do-not-send="true">GDAL website</a>
                                  to build GDAL from source in
                                  conjunction with the MrSid DSDK.</div>
                                <div><br>
                                </div>
                                <div>My cmake command was as follows:</div>
                                <div><br>
                                </div>
                                <div>cmake
                                  -DCMAKE_INSTALL_PREFIX:PATH=/usr
                                  -DGDAL_ENABLE_DRIVER_JP2MRSID=ON
                                  -DGDAL_USE_MRSID=ON
                                  -DMRSID_ROOT=/opt/MrSID_DSDK-9.5.5.5244-rhel9.x86-64.gcc1131/Raster_DSDK
-DMRSID_LIBRARY=/opt/MrSID_DSDK-9.5.5.5244-rhel9.x86-64.gcc1131/Raster_DSDK/lib/libltidsdk.so
-DMRSID_INCLUDE_DIR=/opt/MrSID_DSDK-9.5.5.5244-rhel9.x86-64.gcc1131/Raster_DSDK/include
                                  ..</div>
                                <div><br>
                                </div>
                                <div>As instructed, I've also set the
                                  LD_LIBRARY_PATH variable to point
                                  towards the DSDK's /lib/ path by
                                  adding the following to me
                                  /etc/profile file:</div>
                                <div><br>
                                </div>
                                <div>export
LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/opt/MrSID_DSDK-9.5.5.5244-rhel9.x86-64.gcc1131/Raster_DSDK/lib:/usr/lib</div>
                                <div><br>
                                </div>
                                <div>Using the command line, I'm able to
                                  use gdalinfo to read a .sid file's
                                  information. I even successfully used
                                  gdalwarp on it.</div>
                                <div><br>
                                </div>
                                <div>However, QGIS will not accept this
                                  file format, returning a "not a valid
                                  or recognized data source" error.</div>
                                <div><br>
                                </div>
                                <div>It was my expectation that if MrSid
                                  was enabled within GDAL through the
                                  command line, then QGIS would be able
                                  to read it too. Is there an additional
                                  configuration that I'm missing?</div>
                                <div><br>
                                </div>
                                <div>Thank you,<br>
                                </div>
                                <div>Andrew Plowright<br>
                                </div>
                              </div>
                            </div>
                          </div>
                        </div>
                      </div>
                      _______________________________________________<br>
                      QGIS-User mailing list<br>
                      <a href="mailto:QGIS-User@lists.osgeo.org"
                        rel="noreferrer noreferrer" target="_blank"
                        moz-do-not-send="true"
                        class="moz-txt-link-freetext">QGIS-User@lists.osgeo.org</a><br>
                      List info: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                        rel="noreferrer noreferrer noreferrer"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
                      Unsubscribe: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                        rel="noreferrer noreferrer noreferrer"
                        target="_blank" moz-do-not-send="true"
                        class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
                    </blockquote>
                  </div>
                </blockquote>
              </div>
              _______________________________________________<br>
              QGIS-User mailing list<br>
              <a href="mailto:QGIS-User@lists.osgeo.org" target="_blank"
                rel="noreferrer" moz-do-not-send="true"
                class="moz-txt-link-freetext">QGIS-User@lists.osgeo.org</a><br>
              List info: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
              Unsubscribe: <a
href="https://lists.osgeo.org/mailman/listinfo/qgis-user"
                rel="noreferrer noreferrer" target="_blank"
                moz-do-not-send="true" class="moz-txt-link-freetext">https://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
            </blockquote>
          </div>
        </div>
      </div>
      <br>
      <fieldset class="moz-mime-attachment-header"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
QGIS-User mailing list
<a class="moz-txt-link-abbreviated" href="mailto:QGIS-User@lists.osgeo.org">QGIS-User@lists.osgeo.org</a>
List info: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</a>
Unsubscribe: <a class="moz-txt-link-freetext" href="https://lists.osgeo.org/mailman/listinfo/qgis-user">https://lists.osgeo.org/mailman/listinfo/qgis-user</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>