[GRASS-dev] GRASS module version strictness (libgrass_gis)

Markus Metz markus.metz.giswork at gmail.com
Fri Mar 12 13:35:10 PST 2021


On Fri, Mar 5, 2021 at 8:30 PM Benjamin Ducke <benducke at fastmail.fm> wrote:
>
> Dear Devs,
>
> I am trying to find a way to inject GRASS modules (C code)
> compiled  in a GRASS 7 source tree into an already installed
> version of GRASS. Even if I compile in a GRASS 7.8.5 tree and
> then copy into a GRASS 7.8.5 (i.e. exact version match)
> installation, I get this:
>
> ERROR: Module built against version 2021-03-04T21:51:47+00:00 but trying
to
>         use version 2021-01-01T10:33:43+00:00. You need to rebuild GRASS
GIS
>         or untangle multiple installations.

GRASS uses the git revision to check if separately compiled modules are
compatible with the current version. If the git revision is not available,
the date of compilation is used instead. This is a safety measure to ensure
binary compatibility. The idea of using the date of compilation as
surrogate is targeted at branches under development and might not be
appropriate for released versions that do not change any more. Apparently
we need to distinguish between released versions and versions under
development and adjust the check for binary compatibility accordingly.

Markus M

>
> This is coming from 'libgrass_gis'.
>
> Apparently, GRASS keeps exact timestamps of the binaries and
> won't allow any mixing.
>
> Is it really necessary to be this strict about build versions?
> Would it be possible to relax this, so that a module compiled with
> GRASS 7.8.a can be run under GRASS 7.8.b?
>
> I worked around this issue with some LD_LIBRARY_PATH "magic",
> and even running 7.8.1 binaries in a 7.8.5 installation seems
> to work flawlessly.
>
> Background: I am trying to find a way to provide sets of
> additional modules, that are not part of the GRASS base
> distribution, for injection into an existing GRASS installation.
> This is exceedingly hard if all dependencies have to be
> exact matches; especially if the modules are to be injected
> into a version of GRASS bundled with QGIS.
>
> Best,
>
> Ben
>
> _______________________________________________
> grass-dev mailing list
> grass-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/grass-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/grass-dev/attachments/20210312/78adba29/attachment.html>


More information about the grass-dev mailing list