[Qgis-psc] GRASS work progress

Radim Blazek radim.blazek at gmail.com
Tue Sep 15 00:16:44 PDT 2015


On Tue, Sep 15, 2015 at 6:48 AM, Tim Sutton <tim at qgis.org> wrote:
> Regarding the GISBASE itself, the search order is:
> 1) GISBASE environment variable
> 2) previously selected in the dialog (which is now disabled)
> 3) the location of GRASS used for compilation (cmake GRASS_BASE or GRASS_BASE7)
> 4) opens select dialog (now disabled)
>
> So it seems that in your case QGIS was compiled with a version of
> GRASS which is no more available. Can you find in debug output where
> it looks for GRASS, something like:
> src/providers/grass/qgsgrass.cpp: 411: (init) [0ms] GRASS gisBase from
> configure is: /home/radim/apps-grass-7-svn/grass-7.1.svn
> src/providers/grass/qgsgrass.cpp: 563: (isValidGrassBaseDir) [0ms]
> isValidGrassBaseDir()
> src/providers/grass/qgsgrass.cpp: 471: (init) [0ms] Valid GRASS
> gisBase is: /home/radim/apps-grass-7-svn/grass-7.1.svn


> I went and checked and it seems like make gets the wrong lib dir so I changed to do:
>
> -DGRASS_PREFIX=/usr/lib/grass64
>
> And now I get:
>
> src/providers/grass/qgsgrass.cpp: 411: (init) [0ms] GRASS gisBase from configure is: /usr/lib/grass64
> src/providers/grass/qgsgrass.cpp: 563: (isValidGrassBaseDir) [0ms] isValidGrassBaseDir()
> src/providers/grass/qgsgrass.cpp: 457: (init) [0ms] GRASS was not found in '/usr/lib/grass64'(GISBASE), provider and plugin will not work.

The function isValidGrassBaseDir() currently check if etc/element_list
 in the dir exists, do you have /usr/lib/grass64/etc/element_list?

> I also tried explictly setting GISBASE as env var to /usr and then I get:

It should point to the directory where GRASS is installed, the same as
used for -DGRASS_PREFIX, i.e. /usr/lib/grass64, if GRASS is there, but
it seems it is not

> If I go to the help -> about -> providers box, I get both grass 6 and 7 listed there

Both providers must not be loaded at the same time. The idea is, that
each is linked to different libs and LD_LIBRARY_PATH will be set on
runtime only to the libs of GRASS version which you want to use, if
you have GRASS libs of both versions in the same directory (?), you
should not compile QGIS with both versions. Or maybe you are using
rpath or running from build dir? That is not possible if both versions
are compiled.

Radim



More information about the Qgis-psc mailing list