[GRASS-dev] Re: [GRASS-SVN] r37136 - grass/branches/develbranch_6/lib/gis

Glynn Clements glynn at gclements.plus.com
Mon May 11 10:55:06 EDT 2009


Hamish wrote:

> > > - G_fatal_error(_("Incompatible library version for module"));
> > > + G_fatal_error(_("Incompatible library version for module: recompilation needed."));
> > >
> > > isn't necessarily accurate.
> > >
> > > The error could also be caused by a mismatch between PATH and
> > > LD_LIBRARY_PATH (or ld.so.cache, etc) if you have more than one
> > > version of GRASS installed.
> > >
> > > Or it could be caused by a module linking against GDAL, where GDAL was
> > > built against an old version of GRASS. In that case, it's true that
> > > recompilation is needed, but it would be GDAL that needs
> > > recompilation.
> > >
> > > In general, error messages should only report what is known; they
> > > shouldn't attempt to guess as the underlying cause.
> 
> eg in the current case, where recompilation apparently didn't help.
> 
> but if error message are overly cryptic they aren't much help either;
> in this case it wasn't even clear that GRASS was the source of the
> error.

Right:

- G_fatal_error(_("Incompatible library version for module"));
+ G_fatal_error(_("Incompatible GRASS library version for module"));

> > Still I tend to actually have the message improved since the
> > minimalistic notification regularly confuses people.
> 
> and this is like the like the xth time in a row someone has
> misunderstood that message.
> 
> anyway I changed it again in SVN to add:
>   "You need to rebuild GRASS or untangle multiple installations."
> 
> which isn't perfect, but hopefully that is vague enough to make everyone
> happy, yet still give a pretty good hint about the probable cause (without
> stating it for sure).

That's worse than before, as it implies that the error is limited to
those two possibilities.

Personally, I would suspect that those two possibilities would account
for a minority of cases. Probably more common is the case where the
user has updated GRASS needs to rebuild the specific program(s) which
were built against the old libraries.

There's an ancient Persian proverb:

 He who knows not and knows that he knows not is simple; teach him.
 He who knows not and knows not that he knows not is a fool; shun him.

We shouldn't be trying to fool people with misinformation. The only
thing we know is that the library version doesn't match the program. 
We *don't* know why it doesn't match, and we shouldn't pretend that we
do.

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


More information about the grass-dev mailing list