#364: Compiling QGIS from svn has a compiler error related to GRASS api
---------------------+------------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Keywords: | Platform: Linux
Cpu: x86-64 |
---------------------+------------------------------------------------------
Compiling QGIS 1.0 Preview 2 with Grass 6.4.svn on X86_64 Ubuntu Hardy
Heron system gives me this compiler error:
{{{
[ 64%] Building CXX object
src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrassprovider.o
/usr/local/grass-6.4.svn/include/grass/Vect.h: In static member function
‘static int QgsGrassProvider::openMap(QString, QString, QString,
QString)’:
/usr/local/grass-6.4.svn/include/grass/Vect.h:197: error: too many
arguments to function ‘int Vect_build(Map_info*)’
/home/bobm/src/gis/qgis_svn/src/providers/grass/qgsgrassprovider.cpp:1043:
error: at this point in file
/usr/local/grass-6.4.svn/include/grass/Vect.h: In member function
‘bool QgsGrassProvider::closeEdit(bool)’:
/usr/local/grass-6.4.svn/include/grass/Vect.h:199: error: too many
arguments to function ‘int Vect_build_partial(Map_info*, int)’
/home/bobm/src/gis/qgis_svn/src/providers/grass/qgsgrassprovider.cpp:1522:
error: at this point in file
/usr/local/grass-6.4.svn/include/grass/Vect.h:197: error: too many
arguments to function ‘int Vect_build(Map_info*)’
/home/bobm/src/gis/qgis_svn/src/providers/grass/qgsgrassprovider.cpp:1523:
error: at this point in file
make[2]: ***
[src/providers/grass/CMakeFiles/qgisgrass.dir/qgsgrassprovider.o] Error 1
make[1]: *** [src/providers/grass/CMakeFiles/qgisgrass.dir/all] Error 2
}}}
I've already contacted the QGIS devs and they say it is likely a Grass
problem.
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by glynn):
Replying to [comment:1 cgsbob]:
> After a little digging I found the problem...see http://trac.osgeo.org/grass/changeset/34288#file2. Since this api change
is intentional, it seems like QGIS would have to change?
Unless someone reverts that change. I made the corresponding change
(r34284) in 7.0, but I wasn't expecting it to be backported to 6.4.
Ultimately, I don't know how important API stability is supposed to be in
6.4. I know that we've never made any effort to maintain ABI stability (in
fact, we go out of our way to break it with the GIS_H_VERSION check).
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by glynn):
Replying to [comment:3 neteler]:
> A rather simple solution could be to test the version as already done in
src/plugins/grass/qgsgrassnewmapset.cpp:
>
{{{ #if GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4
}}}
That won't distinguish between 6.4 as of a week ago and 6.4 as of today.
OTOH, it will work fine if external code only ever uses release versions.
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by hamish):
Replying to [comment:4 glynn]:
> Replying to [comment:3 neteler]:
>
> > A rather simple solution could be to test the version as already done
in src/plugins/grass/qgsgrassnewmapset.cpp:
> >
{{{ #if GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4
}}}
>
> That won't distinguish between 6.4 as of a week ago and 6.4 as of today.
>
> OTOH, it will work fine if external code only ever uses release
versions.
We can't be expected to guarantee that development snapshots will
be free of changes, and folks who base stuff on random checkouts from dev
branches should realize that.
where do we have to test/warn? qgis-grass plugin and the
gdal(ogr)-grass plugin? jGRASS?
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by neteler):
Replying to [comment:4 glynn]:
> Replying to [comment:3 neteler]:
>
> > A rather simple solution could be to test the version as already done
in src/plugins/grass/qgsgrassnewmapset.cpp:
> >
> {{{
> #if GRASS_VERSION_MAJOR == 6 && GRASS_VERSION_MINOR >= 4
> }}}
>
> That won't distinguish between 6.4 as of a week ago and 6.4 as of today.
This is not a real problem since we are in the development branch of GRASS
6.
Source snapshots are already updated.
> OTOH, it will work fine if external code only ever uses release
versions.
... which should be the scope for the QGIS release.
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: new
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by glynn):
Replying to [comment:5 hamish]:
> where do we have to test/warn? qgis-grass plugin and the
> gdal(ogr)-grass plugin? jGRASS?
What's the situation with grass-addons? Is there a specific release or
branch which they are supposed to be compatible with, or does it vary from
module to module?
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: closed
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Changes (by jef):
* status: new => closed
* resolution: => fixed
Comment:
Replying to [comment:7 neteler]:
> QGIS patch attached to work around the Vect_build() function call
change. I dunno how to define those variables, though but that will be
easy.
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: closed
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by hamish):
Replying to [comment:8 glynn]:
> What's the situation with grass-addons? Is there a specific
> release or branch which they are supposed to be compatible with,
> or does it vary from module to module?
AFAIK they are all grass 6.x, some of them use newer things like
g.message, others not. Porting between grass 6.x should be trivial,
so IMO there is no need to break it up further than it is.
I have just created grass5/ and grass7/ dirs, and eventually the
current root dirs should be moved into a grass6/. Hopefully the
presence of the new dirs should make it obvious to commiters where they
should be putting stuff.
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: closed
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by cgsbob):
I just updated r9656, but I'm still having problems. I've attached to
this ticket my hard coded fix. I can not find where GRASS_VERSION_MAJOR
and GRASS_VERSION_MINOR are defined in qgis, so I added them to each
problem file.
#364: Compiling QGIS from svn has a compiler error related to GRASS api
----------------------+-----------------------------------------------------
Reporter: cgsbob | Owner: grass-dev@lists.osgeo.org
Type: defect | Status: closed
Priority: major | Milestone: 6.4.0
Component: default | Version: svn-trunk
Resolution: fixed | Keywords:
Platform: Linux | Cpu: x86-64
----------------------+-----------------------------------------------------
Comment (by neteler):
Replying to [comment:12 cgsbob]:
> I just updated r9656, but I'm still having problems. I've attached to
this ticket my hard coded fix. I can not find where GRASS_VERSION_MAJOR
and GRASS_VERSION_MINOR are defined in qgis, so I added them to each
problem file.
Find attached a non-hardcoded patch to fix the outstanding problems.