[Qgis-user] building qgis 2.8.1 against grass 7

Radim Blazek radim.blazek at gmail.com
Thu Mar 12 01:45:56 PDT 2015


On Wed, Mar 11, 2015 at 6:27 PM, Donovan Cameron <sault.don at gmail.com> wrote:
> Morning,
>
> I'm attempting to compile the QGIS 2.8.1 grass plugin against GRASS 7.0.0 on
> Arch Linux 64bit.
>
> I read somewhere (maybe GIS.se?) that the GRASS plugin in QGIS doesn't have
> full functionality and a kickstarter/crowdfunding process could be underway
> to get it up to par,

Yes, the crowdfunding campaign will be launched soon, here is a
preview of the new editing:
https://www.youtube.com/watch?v=PPno1aLYHFE

> but in the meantime it was also mentioned it's still possible
> to use the toolbar to load grass 7 layers into the qgis canvas.

You can use the QGIS browser, to be precise, you can drag and drop
GRASS layers from the browser to canvas or legend. That is available
since the browser was introduced.

You can load GRASS 7 layers this way because the provider (which is
not the plugin) has been already upgraded to GRASS 7.

> But QGIS fails to build with the following error:
> /tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:383:51: error:
> ‘G__setenv’ was not declared in this scope

Unfortunately the GRASS API changed between 7.0.0-beta1 and 7.0.0.
Fixed here: https://github.com/qgis/QGIS/commit/1810cdd
You can just download the changed files, replace those in your source
and it should compile.

BUT, another nice problem came up! It is recovery from GRASS fatal
error in threads. GRASS now raises fatal error if topology is not
saved in GRASS 7 version. Normally we can handle fatal error but it is
causing crash if it is raised in non GUI thread, which is the case for
loading items in the browser (in threads since QGIS 2.8).  It means
that if you try to open GRASS 6 mapset in the browser, you get crash.

Really very nice problem which I have to inspect closer.

> So I'm not sure what the hiccup is exactly. GRASS 7 is installed and runs
> fine outside of QGIS, but maybe it's missing some environment variables
> (like GISRC or GISDBASE) that QGIS needs to compile against it?

That will be OK, the problem was really bug in QGIS caused by changes in GRASS.

Radim



More information about the Qgis-user mailing list