Bug report #712

GRASS plugin compile error: GRASS_VERSION_MAJOR etc. no longer strings

Added by Markus Neteler about 17 years ago. Updated about 17 years ago.

Status:Closed
Priority:Low
Assignee:nobody -
Category:Build/Install
Affected QGIS version: Regression?:No
Operating System:All Easy fix?:No
Pull Request or Patch supplied: Resolution:fixed
Crashes QGIS or corrupts data: Copied to github as #:10771

Description

Currently QGIS no longer compiles with GRASS 6.3.CVS since the include/version.h was modified to:

bartok:grass63[296.2] cat include/version.h
#define GRASS_VERSION_STRING   "@(#) 6.3.cvs (2007)" 
#define GRASS_VERSION_MAJOR    6
#define GRASS_VERSION_MINOR    3
#define GRASS_VERSION_RELEASE  cvs

Here the change from Glynn:

http://freegis.org/cgi-bin/viewcvs.cgi/grass6/include/version.h.in.diff?r1=1.4&r2=1.5

And a comment from Glynn:

http://grass.itc.it/pipermail/grass-dev/2007-April/030658.html

I'm afraid that this needs to be conditionalized. The QGIS code is in src/providers/grass/qgsgrass.cpp, lines 988 and following.

Compare the related GDAL-GRASS plugin changes at

http://trac.osgeo.org/gdal/ticket/1587

Sorry for the mess,
Markus

grass.diff Magnifier (978 Bytes) Martin Dobias, 2007-05-01 02:08 PM

History

#1 Updated by Markus Neteler about 17 years ago

Forgot the compile error message:

[ 69%] Building CXX object src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.o
/home/neteler/soft/qgis_unstable/src/providers/grass/qgsgrass.cpp: In static member function ?static int [[QgsGrass]]::versionRelease()?:
/home/neteler/soft/qgis_unstable/src/providers/grass/qgsgrass.cpp:998: error: ?cvs? was not declared in this scope
maker2: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrass.o] Error 1
maker1: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/all] Error 2
make: *** [all] Error 2

Markus

#2 Updated by Martin Dobias about 17 years ago

I've already done a patch (attached) for it but haven't tested with CVS. Please could you test whether it's working for you? If it's OK, I'll commit it.

Martin

#3 Updated by Markus Neteler about 17 years ago

Hi Martin,

great, looks better. Now it complains at

[ 90%] Building CXX object src/plugins/grass/CMakeFiles/grassplugin.dir/qgsgrassnewmapset.o
/home/neteler/soft/qgis_unstable/src/plugins/grass/qgsgrassnewmapset.cpp:69: error: ‘cvs’ was not declared in this scope
maker2: *** [src/plugins/grass/CMakeFiles/grassplugin.dir/qgsgrassnewmapset.o] Error 1

The first patch you may already submit...

Markus

#4 Updated by Martin Dobias about 17 years ago

Ok, I've commited this in c17fe795 (SVN r6924), the second error should be fixed with

#5 Updated by Markus Neteler about 17 years ago

  • Resolution set to fixed
  • Status changed from Open to Closed

Excellent. QGIS now compiles again and the GRASS support is functional (of course one needs to use the updated GRASS-GDAL-OGR plugin, too).

Thanks again,
Markus

#6 Updated by Markus Neteler about 17 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Would you mind to back port the fix to QGIS 0.8.1 to-be-relased "stable" branch? There will be many users to use this along with GRASS 6.3.

Thanks in advance,
Markus

#7 Updated by Martin Dobias about 17 years ago

  • Status changed from Feedback to Closed
  • Resolution set to fixed

Okay, I've ported it to 0.8 branch in .

#8 Updated by Stefano Costa - about 17 years ago

  • Status changed from Closed to Feedback
  • Resolution deleted (fixed)

Using 300ab29e (SVN r6931) I'm still getting the error. I'm using GRASS 6.3.cvs

qgsgrass.cpp: In static member function 'static void [[QgsGrass]]::init()':
qgsgrass.cpp:49: error: invalid conversion from 'int (*)(char*, int)' to 'int (*)(const char*, int)'
qgsgrass.cpp:49: error:   initializing argument 1 of 'int G_set_error_routine(int (*)(const char*, int))'
maker4: *** [libqgisgrass_la-qgsgrass.lo] Error 1
maker4: Leaving directory @/home/steko/src/qgis_08/src/providers/grass'
maker3: *** [all-recursive] Error 1
maker3: Leaving directory @/home/steko/src/qgis_08/src/providers'
maker2: *** [all-recursive] Error 1
maker2: Leaving directory @/home/steko/src/qgis_08/src'
maker1: *** [all-recursive] Error 1
maker1: Leaving directory @/home/steko/src/qgis_08'
make: *** [all] Error 2

#9 Updated by Martin Dobias about 17 years ago

  • Resolution set to fixed
  • Status changed from Feedback to Closed

In fact your problem is related to another GRASS API breakage. In should be fine also for 0.8 release branch.

I'm wondering how many incompatible changes in GRASS will come next :-(

Also available in: Atom PDF