[GRASS-dev] GRASS 8.0 support in GDAL and QGIS

Vaclav Petras wenzeslaus at gmail.com
Fri Feb 25 06:43:05 PST 2022


On Fri, 25 Feb 2022 at 09:07, Sebastiaan Couwenberg <sebastic at xs4all.nl>
wrote:

>
> If we want to stop using --prefix=/usr/lib and have FHS complianance
> while also having the shared libraries in the default library search
> path several changes in GRASS will be required.
>
> The resulting structure should result in something like:
>
>   /etc/grass                            configuration files
>   /usr/bin                              executables
>   /usr/lib                              shared libraries
>   /usr/lib/python3/dist-packages/grass  python package
>   /usr/libexec/grass                    executable helpers
>   /usr/share/grass                      architecture independent files
>   /usr/share/man                        manual pages
>

Makes sense. Any good examples of how to do this with Autotools, esp. given
that macOS and Windows still need a single directory?


> This assumes that the grass shared libraries should not be considered
> private which does seem to be the case with their use by libgdal-grass
> being the exception.
>

We keep a stable API anyway for custom user executables such as addons, so
not private in that sense. Libraries can also be accessed from Python
through an API which wraps ctypes calls.

I'm not sure what is the current situation in QGIS, but at least
historically, that would be another exception, so perhaps not an exception
at all, but a rule.

The executables like g.region are somewhat internal, so that's perhaps the
/usr/libexec/grass group.

Alternatively the GRASS executables need to have RPATH set, e.g. with:
>
>   -Wl,-rpath,/usr/lib/grass80/lib
>

I'm not sure what are the risks involved here. I have seen -rpath-link used
in the code, so that's not good enough.


> To remove the need for changing the library search path. This is the
> road of least resistance.
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20220225/f3a5ae95/attachment.html>


More information about the grass-dev mailing list