[PROJ] conda + qgis + PROJ

Javier Jimenez Shaw j1 at jimenezshaw.com
Fri Jun 14 00:36:55 PDT 2024


Thanks Even.

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

readelf -d
/home/jshaw/anaconda3/envs/qgis_stable/lib/libqgis_core.so.3.36.3 | grep
"RPATH\|proj"
 0x0000000000000001 (NEEDED)             Shared library: [libproj.so.25]
 0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/.]

I tried changing the symlink and it worked. I just have to remember to undo
it.

Cheers,
Javier

On Fri, 14 Jun 2024 at 00:15, Even Rouault <even.rouault at spatialys.com>
wrote:

> Javier,
>
> this is because Conda builds have the RPATH set to "$ORIGIN/../lib"
>
> $ readelf -d ~/miniconda3/envs/gdal_master_env/bin/gdalinfo | grep RPATH
>  0x000000000000000f (RPATH)              Library rpath: [$ORIGIN/../lib]
>
> And apparently this has priority over LD_LIBRARY_PATH
>
> You can try something like the following
>
> install the "chrpath" utility ("chrpath" package on Debian/Ubuntu)
>
> cp /home/jshaw/anaconda3/envs/qgis_stable/bin/qgis
> /home/jshaw/anaconda3/envs/qgis_stable/bin/qgis_no_rpath
>
> chrpath -d /home/jshaw/anaconda3/envs/qgis_stable/bin/qgis_no_rpath
>
> 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
>
> Or mess with with the content of
> /home/jshaw/anaconda3/envs/qgis_stable/lib, to symlink its libproj.so.25 to
> yours
>
> Even
> Le 13/06/2024 à 23:52, Javier Jimenez Shaw via PROJ a écrit :
>
> Hi
>
> I am trying to run QGIS (from conda) using the PROJ version I just
> compiled (master)
> I thought that LD_LIBRARY_PATH should be enough, but this is not taking
> the compiled libproj.so, but the one from conda:
>
> LD_LIBRARY_PATH=/home/jshaw/work/PROJ/build/lib
> /home/jshaw/anaconda3/envs/qgis_stable/bin/qgis
>
> How should I do it? I do not want to compile QGIS, only to link with my
> version of PROJ.
>
> Thanks
> .___ ._ ..._ .. . ._.  .___ .. __ . _. . __..  ... .... ._ .__
>
> _______________________________________________
> PROJ mailing listPROJ at lists.osgeo.orghttps://lists.osgeo.org/mailman/listinfo/proj
>
> -- http://www.spatialys.com
> My software is free, but my time generally not.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/proj/attachments/20240614/1e282d8b/attachment.htm>


More information about the PROJ mailing list