Re: [Qgis-user] building qgis 2.8.1 against grass 7

2015-04-01 Thread Radim Blazek
On Thu, Mar 12, 2015 at 9:45 AM, Radim Blazek radim.bla...@gmail.com wrote:
 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.

Fixed in master (will become 2.10) and release-2_8 (will become 2.8.2).
Vector layers with GRASS 6 topo are not listed when a mapset opened by
GRASS 7. I'll do something better in plugin upgrade (list vectors
marked as different version).

Radim
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] building qgis 2.8.1 against grass 7

2015-03-12 Thread Radim Blazek
On Wed, Mar 11, 2015 at 6:27 PM, Donovan Cameron sault@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
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user

Re: [Qgis-user] building qgis 2.8.1 against grass 7

2015-03-11 Thread José Antonio Barreña Cayuela
In my case, I have the same problem when compiling qgis with grass 7 
preinstalled



El 11/03/15 a las 18:27, Donovan Cameron escribió:

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, 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.


GDAL 1.11.2 is installed and so is gdal-grass plugin using some 
patches to get GDAL working with grass 7.


I'm using the following cmake options in the QGIS build:
-DWITH_GRASS=ON
-DGRASS_PREFIX=/opt/grass
-DGRASS_INCLUDE_DIR=/opt/grass/include



But QGIS fails to build with the following error:

Scanning dependencies of target qgisgrass
[ 50%] Building CXX object 
src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.cpp.o
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp: In static 
member function ‘static void QgsGrass::setMapset(QString, QString, 
QString)’:
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:383:51: 
error: ‘G__setenv’ was not declared in this scope

   G__setenv( GISDBASE, gisdbase.toUtf8().data() );
   ^
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:392:30: 
error: ‘G_available_mapsets’ was not declared in this scope

 ms = G_available_mapsets();
  ^
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp: In static 
member function ‘static QString QgsGrass::openMapset(QString, QString, 
QString)’:
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:611:46: 
error: ‘G__setenv’ was not declared in this scope

   G__setenv( GISRC, mGisrc.toUtf8().data() );
  ^
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp: In static 
member function ‘static QString QgsGrass::closeMapset()’:
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:657:39: 
error: ‘G__setenv’ was not declared in this scope

 G__setenv( GISRC, ( char * )  );
   ^
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp: In static 
member function ‘static bool QgsGrass::region(QString, QString, 
QString, Cell_head*)’:
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:1082:83: 
error: ‘G__get_window’ was not declared in this scope
   G__get_window( window, ( char * ) , ( char * ) WIND, 
mapset.toUtf8().data() );

^
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp: In static 
member function ‘static bool QgsGrass::mapRegion(int, QString, 
QString, QString, QString, Cell_head*)’:
/tmp/makepkg/qgis/src/qgis/src/providers/grass/qgsgrass.cpp:1268:94: 
error: ‘G__get_window’ was not declared in this scope
 G__get_window( window, ( char * ) windows, map.toUtf8().data(), 
mapset.toUtf8().data() );

^
src/providers/grass/CMakeFiles/qgisgrass.dir/build.make:60: recipe for 
target 'src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.cpp.o' 
failed
make[2]: *** 
[src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.cpp.o] Error 1
CMakeFiles/Makefile2:1251: recipe for target 
'src/providers/grass/CMakeFiles/qgisgrass.dir/all' failed

make[1]: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/all] Error 2
Makefile:137: recipe for target 'all' failed
make: *** [all] Error 2





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?






Donovan
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


--
Firmas de correo.com : José Antonio Barreña Cayuela

José Antonio Barreña Cayuela
/Biólogo (botánico). Servicios Ambientales/
*+34 677 811 883* · jabar...@gmail.com mailto:jabar...@gmail.com

skype skype:jabarcay?call linkedIn 
http://es.linkedin.com/pub/jos%C3%A9-antonio-barre%C3%B1a-cayuela/26/936/15a/ 



___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user