[GRASS-dev] check on GRASS revision number

Glynn Clements glynn at gclements.plus.com
Mon Dec 1 09:03:29 PST 2014


Markus Metz wrote:
> > Markus explained that this is for libgis only. That seems OK to
> > me. My concern (based on the error message generated) is that this
> > would block any module built against any version older than the
> > current one being run. That seemed an unnecessarily strong check,
> > but apparently not what is happening.
> 
> Actually this should happen for modules. If libgis or any other lib
> changes in trunk, all modules using libgis and/or the respective lib
> need to be recompiled. There is no reason to assume that different
> revisions of trunk are binary compatible, it's trunk.

Indeed. The only reason it hasn't been done for other libraries is
that there haven't been sufficient issues to warrant the effort.

Ideally, each library would contain the actual revision number as part
of the name (so libgrass_gis.7.1.svn.so would actually be e.g. 
libgrass_gis.63308.svn.so).

Unfortunately, getting the correct version number isn't
straightforward.

We can't just use "svn info" on the source directory because

1. Many of the ABI-breaking changes are in header files rather than
the library.

2. Not everyone gets their source tree from SVN; tarballs don't have
the .svn directory and "svn info" won't work there.

OTOH, using a revision from a single header isn't particularly robust
either. It just happens to work for the most common single source of
ABI incompatibilities.

-- 
Glynn Clements <glynn at gclements.plus.com>


More information about the grass-dev mailing list