#2785 closed enhancement (invalid)
[Cmake] FindGRASS.cmake issue
Reported by: | vesnikos | Owned by: | nobody |
---|---|---|---|
Priority: | minor: annoyance | Milestone: | Version 1.6.0 |
Component: | Build/Install | Version: | Trunk |
Keywords: | Cc: | ||
Must Fix for Release: | No | Platform: | Debian |
Platform Version: | Awaiting user input: | yes |
Description
when point qgis at grass lib
CMake Error at src/plugins/grass/CMakeLists.txt:8 (MESSAGE): Your GRASS version is not supported (/home/nikos/src/qgis-src/src/plugins/grass/modules-7.0 is not found).
which I'm pretty sure i dont have grass7 installed. Maybe grass6rc6 reports itself as 7?
Grass 6RC6 can be downloaded either from grass site or from ubuntugis ppa. t The problem must be in <qgis-source>/src/pluging/grass/CMakeLists.txt
IF (GRASS_NUM_VERSION LESS 60300) SET (GRASS_MODULES_DIR "modules-6.3") ELSE (GRASS_NUM_VERSION LESS 60300) SET (GRASS_MODULES_DIR "modules-${GRASS_MAJOR_VERSION}.${GRASS_MINOR_VERSION}") ENDIF (GRASS_NUM_VERSION LESS 60300)
Im not pretending that i know anything ccmake files before but the if looks a bit off
Change History (16)
comment:1 by , 14 years ago
comment:3 by , 14 years ago
comment:4 by , 14 years ago
I confirm, it builds fine here, on two different architectures. Perhaps a leftover from another previous install? Can you please check on anther similar machine?
comment:5 by , 14 years ago
I think I found the problem: ccmake cache doesn't refresh, even if you change grass_prefix when you run ccmake to parse its variables.
It found a previous installation of grass 7 (which was in userland )
to recap: ccmake grass_prefix was pointing explicitly in /usr/lib/grass64 and ccmake (from a previous install, by locate? - i couldn't confirm this) was pointing in ~/grass7-src
follow-up: 8 comment:6 by , 14 years ago
more info:
findGRASS.cmake tries to find version.h in folder <grass-src>/include
but for grass6rc6 version.h is present as VERSION ( http://trac.osgeo.org/grass/browser/grass/tags/release_20100320_grass_6_4_0RC6/include/VERSION )
there isn't a version.h file (or at least I can't find one )
comment:7 by , 14 years ago
Summary: | GRASS 6.4.0 RC6 is not supported for building grass_plugin → [Cmake] FindGRASS.cmake issue |
---|
more additional info:
from http://www.mail-archive.com/cmake@cmake.org/msg07252.html
# ^ and $ appear to be non-functional in practice. This makes it # impossible to code a non-trivial regex in CMake script. This in turn # forces the user to find or install other tools that can do so, rather # than keeping their scripting logic self-contained in CMake. # # ^ and $ work work with respect to an entire <input> to STRING(). # That is to say, an <input> is treated as one line. The <input> # does not preserve newlines, even if it is read from a multi-line file. # The following code snippet demonstrates that ^ and $ will only # match at the beginning and end of a file, when the file is read in as # an <input> string.
one that was suggested was
STRING(REGEX REPLACE "\r?\n" ";" ENT "${input}") FOREACH(line ${ENT}) # do the match on each line
comment:8 by , 14 years ago
Priority: | major: does not work as expected → minor: annoyance |
---|
Replying to vesnikos:
more info:
findGRASS.cmake tries to find version.h in folder <grass-src>/include
but for grass6rc6 version.h is present as VERSION ( http://trac.osgeo.org/grass/browser/grass/tags/release_20100320_grass_6_4_0RC6/include/VERSION )
there isn't a version.h file (or at least I can't find one )
it's not a source file. it's created on installation from version.h.in
comment:9 by , 14 years ago
Milestone: | Version 1.5.0 → Version 1.6.0 |
---|
comment:10 by , 14 years ago
Awaiting user input: | set |
---|
vesnikos, any news on this? Looks more like a GRASS installation problem on your end (missing version.h).
follow-up: 12 comment:11 by , 14 years ago
Resolution: | → invalid |
---|---|
Status: | new → closed |
Type: | bug → enhancement |
Should have closed that bug ages ago.
Problem lies that in clarification in the documentation: Nowhere states that qgis is NOT compatible with grass70 - just says GRASS, no version
The another issued thats needs confirmation (its been couple of weeks since i've tested it) is that GRASS_PREFIX is not being refreshed if you install another version of grass (maybe grass6RC6, after grass70svn) with the correct path. Not even a conflict error. Maybe if there are more than one grass installations, user should choose manually the path?
and the third and most major: The grass60RC6 package that comes from ubuntus' ubuntugis/unstable ppa is not compatible with qgis to be build with grass support. I had to compile from source to get grass support.
Imho findgrass.cmake is a bit hackish, and needs some love to become more robust. Since qgis comes to be the frontend of grass, its a shame people to stumble in such annoyances
I'll close the bug, and I hope none took offence in the comments above.
comment:12 by , 14 years ago
Replying to vesnikos:
and the third and most major: The grass60RC6 package that comes from ubuntus' ubuntugis/unstable ppa is not compatible with qgis to be build with grass support. I had to compile from source to get grass support.
Incompatible in which way?
follow-up: 14 comment:13 by , 14 years ago
Its been a while, it has something to do with the packages' "include" folder.If i remember correctly the binary package doesn't install the "include" files ( where grass' version.h residences) and there isn't a -devel package provided by the ppa.
hence if you install grass60rc6 from ubunbugis/unstable you're not able to compile qgis with grass support.
After monday, i can do some tests with a virtual machine and test this, and open a new bug if needed
follow-up: 15 comment:14 by , 14 years ago
hence if you install grass60rc6 from ubunbugis/unstable you're not able to compile qgis with grass support.
I can compile every day qgis with GRASS support using GRASS installed with the ubuntugis-unstable repository.
follow-up: 16 comment:15 by , 14 years ago
Replying to lutra:
I can compile every day qgis with GRASS support using GRASS installed with the ubuntugis-unstable repository.
where does your grass_prefix points at, when running ccmake ?
comment:16 by , 14 years ago
Replying to vesnikos:
Replying to lutra:
I can compile every day qgis with GRASS support using GRASS installed with the ubuntugis-unstable repository.
where does your grass_prefix points at, when running ccmake ?
Probably /usr/lib/grass64
. Just like in the configuration debian/rules
produces when building the debian package.
QGIS builds fine with GRASS 6.4.0rc6 here. Which GRASS version is found? Please quote the line from your build: