<div dir="ltr"><div>Thanks Even.</div><div><br></div><div>Using chrpath to change the rpath of the qgis binary is not working to me. I think it is due to the intermediate library libqgis_core.so.3.36.3</div><div><br></div><div><span style="font-family:monospace">readelf -d /home/jshaw/anaconda3/envs/qgis_stable/lib/libqgis_core.so.3.36.3 | grep "RPATH\|proj"<br> 0x0000000000000001 (NEEDED) Shared library: [libproj.so.25]<br> 0x000000000000000f (RPATH) Library rpath: [$ORIGIN/.]<br></span></div><br><div>I tried changing the symlink and it worked. I just have to remember to undo it.</div><div><br></div><div>Cheers,</div><div>Javier<br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Fri, 14 Jun 2024 at 00:15, Even Rouault <<a href="mailto:even.rouault@spatialys.com">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"><u></u>
<div>
<p>Javier,</p>
<p>this is because Conda builds have the RPATH set to "$ORIGIN/../lib"</p>
<p>$ readelf -d ~/miniconda3/envs/gdal_master_env/bin/gdalinfo |
grep RPATH<br>
0x000000000000000f (RPATH) Library rpath:
[$ORIGIN/../lib]<br>
</p>
<p>And apparently this has priority over LD_LIBRARY_PATH</p>
<p>You can try something like the following</p>
<p>install the "chrpath" utility ("chrpath" package on
Debian/Ubuntu)</p>
<p>cp /home/jshaw/anaconda3/envs/qgis_stable/bin/qgis
/home/jshaw/anaconda3/envs/qgis_stable/bin/qgis_no_rpath</p>
<p>chrpath -d
/home/jshaw/anaconda3/envs/qgis_stable/bin/qgis_no_rpath</p>
<p>LD_LIBRARY_PATH=/home/jshaw/work/PROJ/build/lib:/home/jshaw/anaconda3/envs/qgis_stable/lib
/home/jshaw/anaconda3/envs/qgis_stable/bin/qgis_no_rpath</p>
<p>Or mess with with the content of
/home/jshaw/anaconda3/envs/qgis_stable/lib, to symlink its
libproj.so.25 to yours<br>
</p>
<p>Even<br>
</p>
<div>Le 13/06/2024 à 23:52, Javier Jimenez
Shaw via PROJ a écrit :<br>
</div>
<blockquote type="cite">
<div dir="ltr">
<div>Hi</div>
<div><br>
</div>
<div>I am trying to run QGIS (from conda) using the PROJ version
I just compiled (master)<br>
</div>
<div>I thought that LD_LIBRARY_PATH should be enough, but this
is not taking the compiled libproj.so, but the one from conda:<br>
</div>
<div><br>
</div>
<div>LD_LIBRARY_PATH=/home/jshaw/work/PROJ/build/lib
/home/jshaw/anaconda3/envs/qgis_stable/bin/qgis</div>
<div><br>
</div>
<div>How should I do it? I do not want to compile QGIS, only to
link with my version of PROJ.</div>
<div><br>
</div>
<div>Thanks<br>
</div>
<div>
<div>
<div dir="ltr" class="gmail_signature">
<div dir="ltr">
<div>.___ ._ ..._ .. . ._. .___ .. __ . _. . __.. ...
.... ._ .__</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<pre>_______________________________________________
PROJ mailing list
<a href="mailto:PROJ@lists.osgeo.org" target="_blank">PROJ@lists.osgeo.org</a>
<a href="https://lists.osgeo.org/mailman/listinfo/proj" target="_blank">https://lists.osgeo.org/mailman/listinfo/proj</a>
</pre>
</blockquote>
<pre cols="72">--
<a href="http://www.spatialys.com" target="_blank">http://www.spatialys.com</a>
My software is free, but my time generally not.</pre>
</div>
</blockquote></div>