[GRASS-user] Re: Installing r.area
Okay, I changed my Platform.make file from the original file # GRASS dirs GRASS_HOME = /usr/src/packages/BUILD/grass-6.4.0RC6 RUN_GISBASE = /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu to # GRASS dirs # GRASS_HOME = /usr/src/packages/BUILD/grass-6.4.0RC6 RUN_GISBASE = /opt/grass Then I navigated into the folder with r.area and did the following: l...@pc19384:~/r.area export LC_ALL=C l...@pc19384:~/r.area sudo make MODULE_TOPDIR=/opt/grass/ root's password: gcc -I/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 Still no better. I think it might be smarter just to uninstall GRASS completely and compile it from source, but I run into trouble when I do that too... Best, Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5375851.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
This will never work unless the OpenSuse packager fixes the wrong path (.../BUILD/... is wrong and needs to be /opt/...). Or you do it yourself... AFAIK, it is in your case in /opt/grass/include/Make/Platform.make Alright, I think I understood what to do. I edited /opt/grass/include/Make/Platform.make (made a backup) and changed these two lines from: # GRASS dirs GRASS_HOME = /usr/src/packages/BUILD/grass-6.4.0RC6 RUN_GISBASE = /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu to: # GRASS dirs GRASS_HOME = /opt/grass RUN_GISBASE = /opt/grass/dist.i686-pc-linux-gnu But this still happens: l...@pc19384:~/r.area make Makefile:11: ../../include/Make/Module.make: Datei oder Verzeichnis nicht gefunden make: *** Keine Regel, um »../../include/Make/Module.make« zu erstellen. Schluss. l...@pc19384:~/r.area make MODULE_TOPDIR=/opt/grass/ gcc -I/opt/grass/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/opt/grass/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: schwerwiegender Fehler: grass/gis.h: Datei oder Verzeichnis nicht gefunden Kompilierung beendet. make: *** [OBJ.i686-pc-linux-gnu/main.o] Fehler 1 Did I do something wrong? Thanks a bunch! Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5372018.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
LeeDaniel wrote: wrong path (.../BUILD/... is wrong and needs to be /opt/...). Or you do it yourself... AFAIK, it is in your case in /opt/grass/include/Make/Platform.make Alright, I think I understood what to do. I edited /opt/grass/include/Make/Platform.make (made a backup) and changed these two lines from: # GRASS dirs GRASS_HOME = /usr/src/packages/BUILD/grass-6.4.0RC6 RUN_GISBASE = /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu to: # GRASS dirs GRASS_HOME = /opt/grass RUN_GISBASE = /opt/grass/dist.i686-pc-linux-gnu GRASS_HOME is the location of the GRASS source tree. If you don't have the GRASS source tree, it should be unset. Its value is used to initialise a few other variables, which need to be changed when building without the source tree: ARCH_DISTDIR= $(GRASS_HOME)/dist.$(ARCH) ARCH_BINDIR = $(GRASS_HOME)/bin.$(ARCH) ERRORLOG= $(GRASS_HOME)/error.log If you're building against an installed version, ARCH_DISTDIR should be set to the installation directory (e.g. /usr/local/grass-6.4.0RC6), ARCH_BINDIR shouldn't matter, and ERRORLOG can be set to any absolute filename. Also, you need to override MODULE_TOPDIR on the command line, e.g.: make MODULE_TOPDIR=/usr/local/grass-6.4.0RC6 This is used to locate the *.make files, so setting in those files won't work. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Alright, I gave it another shot... GRASS_HOME is the location of the GRASS source tree. If you don't have the GRASS source tree, it should be unset. Okay, I turned it off by putting # in front of it. Now the line looks like this: # GRASS dirs # GRASS_HOME = /usr/src/packages/BUILD/grass-6.4.0RC6 Its value is used to initialise a few other variables, which need to be changed when building without the source tree: ARCH_DISTDIR = $(GRASS_HOME)/dist.$(ARCH) ARCH_BINDIR = $(GRASS_HOME)/bin.$(ARCH) ERRORLOG= $(GRASS_HOME)/error.log If you're building against an installed version, ARCH_DISTDIR should be set to the installation directory (e.g. /usr/local/grass-6.4.0RC6), ARCH_BINDIR shouldn't matter, and ERRORLOG can be set to any absolute filename. Alright. I took out the variable $ARCH_DISTDIR and replaced it with /opt/grass/. So the three lines the GRASS dirs are now: # GRASS dirs # GRASS_HOME = /usr/src/packages/BUILD/grass-6.4.0RC6 RUN_GISBASE = /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu RUN_GISRC = /opt/grass/demolocation/.grassrc${GRASS_VERSION_MAJOR}${GRASS_VERSION_MINOR} Also, you need to override MODULE_TOPDIR on the command line, e.g.: make MODULE_TOPDIR=/usr/local/grass-6.4.0RC6 This is used to locate the *.make files, so setting in those files won't work. Alright. Tried it out by navigating into the folder with r.area. Here are the results: l...@pc19384:~/r.area sudo make MODULE_TOPDIR=/opt/grass/ mkdir -p /bin.i686-pc-linux-gnu mkdir -p /dist.i686-pc-linux-gnu/include/grass mkdir -p /dist.i686-pc-linux-gnu/lib mkdir -p /dist.i686-pc-linux-gnu/bin mkdir -p /dist.i686-pc-linux-gnu/etc mkdir -p /dist.i686-pc-linux-gnu/driver mkdir -p /dist.i686-pc-linux-gnu/driver/db mkdir -p /dist.i686-pc-linux-gnu/fonts gcc -I/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: schwerwiegender Fehler: grass/gis.h: Datei oder Verzeichnis nicht gefunden Kompilierung beendet. make: *** [OBJ.i686-pc-linux-gnu/main.o] Fehler 1 Unfortunately no improvement. Oh man... The depressed Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5372689.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
LeeDaniel wrote: Its value is used to initialise a few other variables, which need to be changed when building without the source tree: ARCH_DISTDIR = $(GRASS_HOME)/dist.$(ARCH) ARCH_BINDIR = $(GRASS_HOME)/bin.$(ARCH) ERRORLOG= $(GRASS_HOME)/error.log If you're building against an installed version, ARCH_DISTDIR should be set to the installation directory (e.g. /usr/local/grass-6.4.0RC6), ARCH_BINDIR shouldn't matter, and ERRORLOG can be set to any absolute filename. Alright. I took out the variable $ARCH_DISTDIR and replaced it with /opt/grass/. So the three lines the GRASS dirs are now: RUN_GISBASE = /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu This should also be /opt/grass (or wherever GRASS is installed). Alright. Tried it out by navigating into the folder with r.area. Here are the results: gcc -I/dist.i686-pc-linux-gnu/include It would appear that any change to ARCH_DISTDIR was incorrect. The above is what you would get if you left ARCH_DISTDIR = $(GRASS_HOME)/dist.$(ARCH) but GRASS_HOME was unset. main.c:19:23: schwerwiegender Fehler: grass/gis.h: Datei oder Verzeichnis nicht gefunden Kompilierung beendet. If you're going to post build output to the mailing list, run: export LC_ALL=C in the shell before running make. -- Glynn Clements gl...@gclements.plus.com ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
Hamish pisze: fyi I get what it does now, and just fixed a small bug in it which was stopping it from reading CELL maps. Thanks, Hamish, I was offline for over the week so I cannot fix it myself... Hamish If someone is interested in result of r.stats and r.area are the same (as I tested). r.area is a simple alternative for mixed r.report/awk/r.recalss command with additional option to remove small (lower than treeshold) areas. Is also very fast... Hope now it works, if no, please all report it to me (I little lost in previous discussion but I notice that main problem was with compiling it in some binary GRASS distributions) thanks for trying it. Jarek ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Alright... I tried the following: l...@pc19384:~ svn checkout https://svn.osgeo.org/grass/grass-addons/raster/r.area/ Ar.area/main.c Ar.area/description.html Ar.area/Makefile Ausgecheckt, Revision 42981. l...@pc19384:~ cd r.area/ l...@pc19384:~/r.area make MODULE_TOPDIR=/opt/grass/ test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: schwerwiegender Fehler: grass/gis.h: Datei oder Verzeichnis nicht gefunden Kompilierung beendet. make: *** [OBJ.i686-pc-linux-gnu/main.o] Fehler 1 Same error message, it doesn't find what it's looking for. I looked at the error report and was a bit confused. Does this mean that there's no way around this other than compiling GRASS from source? Or is it perhaps possible to download the GRASS source and keep my distributed GRASS version and just use the source to compile r.area? Thanks, Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5367915.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
On Tue, Aug 3, 2010 at 1:37 PM, LeeDaniel lee.daniel.1...@gmail.com wrote: Alright... I tried the following: l...@pc19384:~ svn checkout https://svn.osgeo.org/grass/grass-addons/raster/r.area/ A r.area/main.c A r.area/description.html A r.area/Makefile Ausgecheckt, Revision 42981. l...@pc19384:~ cd r.area/ l...@pc19384:~/r.area make MODULE_TOPDIR=/opt/grass/ test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c This will never work unless the OpenSuse packager fixes the wrong path (.../BUILD/... is wrong and needs to be /opt/...). Or you do it yourself... AFAIK, it is in your case in /opt/grass/include/Make/Platform.make (see also the ticket 620 as mentioned previously) Then also g.extension will work for you. Please let us know, Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Alright, sorry, was gone over the weekend. Now I'm back. Here some additional information. Concerning installing the add-on r.area with g.extension: (you mean the installation via g.extension isn't functional on your machine) Right, my mistake. After using g.extension to get r.area I get the following error: GRASS 6.4.0RC6 (DornbirnTest):~ g.extension r.area Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Checked out revision 42954. Compiling r.area... test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. You see that grass/gis.h is missing which should be there in your binary installation in include/. Ah I just realise that it looks in /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include which is unlikely to exist on your machine, right? The path /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/ is on my machine, but the directory is empty. It was made on the Thursday, leading me to believe that g.extension made it. Concerning the include/ directory in my grass install, that apparently should be installed with the grass-devel package that I installed with my package manager: ...does /opt/grass/include/ contain anything? Does it have a subdirectory grass/ with a series of .h files? This are needed and not found above since there is something wrong with your paths. The directory /opt/grass/include/grass/ does indeed exist and it's got 89 *.h files and four folders. Maybe it's just looking at the wrong path? What reports echo $GISBASE in a GRASS session? It returns /opt/grass So it looks like my GISBASE is where my package manager installed it. At least that's where the relevant files are. Is it possible that you have two GRASS version installed? Don't think so. I deinstalled GRASS with the package manager and then tried to compile it (see previous entries), but it didn't work. Then I installed GRASS again with my package manager. Since the compilation failed, I don't think I've got two version. Plus, the error messages have stayed the same, both before and after my attempts. My present course of action: - Copied the contents of /opt/grass/include/grass/ (all the *.h files) temporarily to /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/ to see if g.extension can use them now. Then I tried g.extension r.area in the shell in a GRASS session. Result: Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Ausgecheckt, Revision 42961. Compiling r.area... test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c make: *** Keine Regel vorhanden, um das Target »/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib/libgrass_gis.so«, benötigt von »/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin/r.area«, zu erstellen. Schluss. FEHLER: Compilation failed, sorry. Please check above error messages. So that's a different error than before. Here's the old one: GRASS 6.4.0RC6 (DornbirnTest):~ g.extension r.area Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Checked out revision 42954. Compiling r.area... test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. The new area says it can't find the rule to make the target »/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib/libgrass_gis.so«, which is needed by »/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin/r.area«. - I looked in those directories for a main.o and a libgrass_gis.so, but they weren't there. Now I've deleted the contents of the directory that I'd temporarily copied so that my folders are back to the state they were in before I copied them. Thanks a bunch, by the way, to Marcello for
[GRASS-user] Re: Installing r.area
Hello Daniel, I also wanted to use r.area, so I installed it but had an error, as posted here http://osgeo-org.1803224.n2.nabble.com/New-modules-in-svn-add-on-r-area-and-r-convergence-td5161926.html#a5199839 Then afterwards Milton Ribeiro sent me another way to get the same results in a rather fast way. I don't want to interrupt your struggle to get r.area working, but if you need some fast results, I believe you could try this alternative: r.stats -na input=clumped_map | awk '{print $1,=,int($2/1)+1}' | r.reclass input=clumped_map output=clumped_map_AreaHA - --o The area is calculated in squared meters than converted to hectares by awk (but you can probably change units within r.stats) than sent to r.reclass. Hope this helps in anyway. Cheers, Marcello. -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5360992.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
Marcello wrote: I also wanted to use r.area, so I installed it but had an error, as posted here http://osgeo-org.1803224.n2.nabble.com/New-modules-in-svn-add-on-r-area-and-r-convergence-td5161926.html#a5199839 ... : But then I get the following error: ATENÇÃO: Raster map my_raster_clumped not found in mapset my_raster_clumped ERRO:my_raster_clumped is not of type CELL, probably not crated with r.clump this bug is now fixed in svn. Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Hi ya'll! Alright, r.area still isn't functional, but I think we might be a few steps closer to the goal... I got the new and improved g.extension script from http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/scripts/g.extension/ and popped it as an executable into $GISBASE/scripts/, then changed the rights so that I can use it. I tried it again. Bad news is, it still didn't work. The good news is, my new error message is different from my last one! GRASS 6.4.0RC6 (DornbirnTest):~ g.extension r.area Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Checked out revision 42954. Compiling r.area... test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. It's a lot shorter than the old error message because it didn't make directories, apparently. However, maybe I'm just really missing the point here, because the directories are still there from the last time I tried to build it. So much to that. As far as the other stuff is concerned: Markus Neteler wrote: Again, this needs GRASS to be properly packaged. Perhaps the include/ stuff was separated out into an extra grass-devel package for your distro? Not sure. My distro is OpenSUSE 11.3 and I have the grass-devel package installed. I used the packet manager to get it. I have found a directory /opt/grass/include/ - could that be it? Markus Neteler wrote: Please check if grass-dev (or whatever it is called in Ubuntu) is installed. Then retry. Yep. Thanks so much for the help! Best, Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5358726.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
On Sat, Jul 31, 2010 at 6:09 PM, LeeDaniel lee.daniel.1...@gmail.com wrote: Hi ya'll! Alright, r.area still isn't functional, (you mean the installation via g.extension isn't functional on your machine) but I think we might be a few steps closer to the goal... I got the new and improved g.extension script from http://svn.osgeo.org/grass/grass/branches/releasebranch_6_4/scripts/g.extension/ and popped it as an executable into $GISBASE/scripts/, then changed the rights so that I can use it. I tried it again. Perfect. In any case, it will be in the next release. Bad news is, it still didn't work. The good news is, my new error message is different from my last one! No, it is the same... GRASS 6.4.0RC6 (DornbirnTest):~ g.extension r.area Fetching r.area from GRASS-Addons SVN (be patient)... A r.area/main.c A r.area/description.html A r.area/Makefile Checked out revision 42954. Compiling r.area... test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory You see that grass/gis.h is missing which should be there in your binary installation in include/. Ah I just realise that it looks in /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include which is unlikely to exist on your machine, right? ... Again, this needs GRASS to be properly packaged. Perhaps the include/ stuff was separated out into an extra grass-devel package for your distro? Not sure. My distro is OpenSUSE 11.3 and I have the grass-devel package installed. I used the packet manager to get it. I have found a directory /opt/grass/include/ - could that be it? Yes but does /opt/grass/include/ contain anything? Does it have a subdirectory grass/ with a series of .h files? This are needed and not found above since there is something wrong with your paths. The relevant compile line is make MODULE_TOPDIR=$GISBASE so it should find /opt/grass/ but it doesn't. What reports echo $GISBASE in a GRASS session? Is it possible that you have two GRASS version installed? Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
LeeDaniel wrote: Sorry to pester, but does anybody know where I could look to find a solution to this problem? I can't finish my analysis without either r.area or a complicated vector analysis, and it's something we have to do a lot over here, so I'd be very grateful for any further help. Thanks a bunch! Hi, I've not tried r.area yet, and don't really know it at all, but on the surface I wonder how is it different from the results you already get from r.report or r.stats? Hamish ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
fyi I get what it does now, and just fixed a small bug in it which was stopping it from reading CELL maps. I have the full svn version of grass built from source, and from the addons svn dir I built it with: make MODULE_TOPDIR=/usr/local/src/grass/svn/grass65/ (I just run grass out of the source dir, so never 'make install' it) at minimum I think you have to cd to the main source dir and do ./configure if you installed grass from a package, check if there is an associated -dev package, and then point MODULE_TOPDIR towards where it install its files. Hamish LeeDaniel wrote: Thanks for the replies! I've tried it out and here are my responses to the suggestions: @ Markus - Downloaded the script and put it in my scripts folder, made it executable and made it assigned rights to myself. Just as a test I tried opening it as a GUI and, lo and behold, it worked. However, it couldn't find my add-on path, of course, when I tried to add r.area. So I went to the terminal and entered: export GRASS_ADDON_PATH?$GISBASE g.extension r.area Now things looked good. It did the following: Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Checked out revision 42910. - Great, got the files needed. Then it started compiling: Compiling r.area... mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/bin.i686-pc-linux-gnu mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/etc mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver/db mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/fonts test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. - So it looks like it was able to make a bunch of directories. I checked, they're there, new as of today. The entire directory of /usr/src/packages/ is new. However, GRASS wasn't able to compile. I checked for /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/gis.h since it seemed that it was looking for it and couldn't find it, and discovered that the directory /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/ is completely empty. Could that be the problem? I also tried using sudo g.extension r.area And got the usual error that I have to be in GRASS GIS to run the program. I didn't try starting GRASS as a super user because I don't want to do anything wrong and I also don't want it to install r.area only for super users. But that would be a nice way of loading add-ons, because it looks like I wouldn't have to have the source code all on my hard drive. Any idea why it's not working? @ Micha - Tried running it with g.extension (see above); it didn't work, so I tried to do the thing manually again. Entered svn checkout https://svn.osgeo.org/grass/grass-addons/ grass-addons to get the source codes. It worked and all the source codes were downloaded to my home directory in the folder grass-addons. Then I navigated into the directory ~/grass-addons/raster/r.area/ and entered the command ./configure This is similar to last time; last time, I also had been inside the directory when I tried the commands. But I thought hey, maybe I'd copied the source codes wrong. Sadly, that doesn't seem to be the problem; just like last time, I got the message bash: ./configure: No such file or directory I then tried it as super user. Same problem. Any other ideas? Thanks a lot again for the help, everyone! Daniel ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Hi everyone, Thanks for the responses. I'm really sorry that I'm struggling so much here, but... It just isn't working for me. Hamish: I tried building GRASS from source and failed miserably. I know, it must sound pathetic. I went through all of the packages that are required for GRASS - really all of them - following the instructions on http://grass.osgeo.org/wiki/Compile_and_Install. This was my process: - Downloaded all of the packages listed on the requirements page (http://grass.osgeo.org/grass64/source/REQUIREMENTS.html) with the package manager. Yes, some of them weren't there and I had to compile and install them from source. I managed that. - Made /usr/local/src/grass and gave myself rights to it. - Downloaded GRASS with svn checkout https://svn.osgeo.org/grass/grass/branches/develbranch_6 grass6_devel Had to do it as super user because I didn't have rights to /usr/local/src/. No problem, did it as a super user and then gave myself rights to it. - Navigated into /usr/local/src/grass6_devel/ and tried ./configure Results: The terminal spit out a bunch of things that found and then was unable to find PROJ.4. Here's the message: checking for location of External PROJ.4 includes... checking for proj_api.h... no configure: error: *** Unable to locate External PROJ.4 includes. Now, I know I have PROJ.4 because I installed it with the package manager. And it's still there. So... I'm confused. But this seems like a whole lot of trouble for just one little extension - I think the problem is more that I can't get the extension to compile. I ended up reinstalling GRASS with my packet manager. It works now. But I still don't have the extension. Since I didn't compile GRASS myself, I'm not sure exactly where the module top directory is. I've got opt/grass/etc/python/grass, for example, and a bunch of other grass folders (12 of them) and am not exactly sure where that is. It seems like it might be in /opt/grass/ but I'm not sure. That's definitely where my script directory is. However, when I navigate into ~/grass-addons/raster/r.area/ and type ./configure MODULE_TOPDIR=/opt/grass/ it says it can't find the file or folder ./configure. Also very strange. And all I want to do is compile this stupid add on! If I search my computer for any files/folders with grass* -dev* I don't find a thing. Anyway... Sadly, I haven't managed to come any further. Leonardo: Thanks for the tip. As you'll see above, I can't seem to use ./configure on the GRASS source... It always fails to find PROJ.4, even though PROJ.4 is installed, and the command locate PROJ.4 doesn't help either. Therefore I don't come any further. I've searched for any grass raster directory to move r.area to and it's not anywhere on my computer. *sigh* So it looks like I'm still miles away from getting this addon. I also tried it with g.extension. Here's the error I get: Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Ausgecheckt, Revision 42949. Compiling r.area... mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/bin.i686-pc-linux-gnu mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/etc mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver/db mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/fonts test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: Datei oder Verzeichnis nicht gefunden compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Fehler 1 FEHLER: Compilation failed, sorry. Please check above error messages. Datei oder Verzeichnis nicht gefunden = Didn't find file or folder. It doesn't find grass/gis.h. I definitely DO have gcc, I also installed that with the packet manager. Just to be sure, I installed the newest gcc for every language that I could see in YaST. I'm at my wit's end... -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5347803.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Thanks for the replies! I've tried it out and here are my responses to the suggestions: @ Markus - Downloaded the script and put it in my scripts folder, made it executable and made it assigned rights to myself. Just as a test I tried opening it as a GUI and, lo and behold, it worked. However, it couldn't find my add-on path, of course, when I tried to add r.area. So I went to the terminal and entered: export GRASS_ADDON_PATH?$GISBASE g.extension r.area Now things looked good. It did the following: Fetching r.area from GRASS-Addons SVN (be patient)... Ar.area/main.c Ar.area/description.html Ar.area/Makefile Checked out revision 42910. - Great, got the files needed. Then it started compiling: Compiling r.area... mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/bin.i686-pc-linux-gnu mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/etc mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver/db mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/fonts test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. - So it looks like it was able to make a bunch of directories. I checked, they're there, new as of today. The entire directory of /usr/src/packages/ is new. However, GRASS wasn't able to compile. I checked for /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/gis.h since it seemed that it was looking for it and couldn't find it, and discovered that the directory /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/ is completely empty. Could that be the problem? I also tried using sudo g.extension r.area And got the usual error that I have to be in GRASS GIS to run the program. I didn't try starting GRASS as a super user because I don't want to do anything wrong and I also don't want it to install r.area only for super users. But that would be a nice way of loading add-ons, because it looks like I wouldn't have to have the source code all on my hard drive. Any idea why it's not working? @ Micha - Tried running it with g.extension (see above); it didn't work, so I tried to do the thing manually again. Entered svn checkout https://svn.osgeo.org/grass/grass-addons/ grass-addons to get the source codes. It worked and all the source codes were downloaded to my home directory in the folder grass-addons. Then I navigated into the directory ~/grass-addons/raster/r.area/ and entered the command ./configure This is similar to last time; last time, I also had been inside the directory when I tried the commands. But I thought hey, maybe I'd copied the source codes wrong. Sadly, that doesn't seem to be the problem; just like last time, I got the message bash: ./configure: No such file or directory I then tried it as super user. Same problem. Any other ideas? Thanks a lot again for the help, everyone! Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5341684.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] Re: Installing r.area
On Tue, Jul 27, 2010 at 12:58 PM, LeeDaniel lee.daniel.1...@gmail.com wrote: Thanks for the replies! I've tried it out and here are my responses to the suggestions: @ Markus - Downloaded the script and put it in my scripts folder, made it executable and made it assigned rights to myself. [the next release will include it] Just as a test I tried opening it as a GUI and, lo and behold, it worked. However, it couldn't find my add-on path, Yes, by default it is undefined which is bad IMHO. I'll fix that to $GISBASE with a parameter to change it optionally. of course, when I tried to add r.area. So I went to the terminal and entered: export GRASS_ADDON_PATH?$GISBASE ? - = g.extension r.area Now things looked good. It did the following: Fetching r.area from GRASS-Addons SVN (be patient)... A r.area/main.c A r.area/description.html A r.area/Makefile Checked out revision 42910. - Great, got the files needed. Then it started compiling: Compiling r.area... mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/bin.i686-pc-linux-gnu mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/lib mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/bin mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/etc mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/driver/db mkdir -p /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/fonts test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu gcc -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -O2 -DPACKAGE=\grassmods\ -I/usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include -o OBJ.i686-pc-linux-gnu/main.o -c main.c main.c:19:23: fatal error: grass/gis.h: No such file or directory compilation terminated. The include files have not been packaged which we/the packager should change. Where did you get the binaries from? I have to understand who's omission that is (GRASS itself or the packaging). make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1 ERROR: Compilation failed, sorry. Please check above error messages. - So it looks like it was able to make a bunch of directories. I checked, they're there, new as of today. The entire directory of /usr/src/packages/ is new. However, GRASS wasn't able to compile. I checked for /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/gis.h since it seemed that it was looking for it and couldn't find it, and discovered that the directory /usr/src/packages/BUILD/grass-6.4.0RC6/dist.i686-pc-linux-gnu/include/grass/ is completely empty. Could that be the problem? Yes. I also tried using sudo g.extension r.area And got the usual error that I have to be in GRASS GIS to run the program. I didn't try starting GRASS as a super user because I don't want to do anything wrong and I also don't want it to install r.area only for super users. sure. But that would be a nice way of loading add-ons, because it looks like I wouldn't have to have the source code all on my hard drive. Any idea why it's not working? Because it has been only lightly tested we'll figure out! Please answer to above question (binaries). Markus ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
[GRASS-user] Re: Installing r.area
Phew, I didn't think it'd be so complicated ;) Sorry! And the question mark that should be an equals sign was a typo as I was typing that line over (the other stuff I copy-pasted, but I'm a fast typer that's lazy with the mouse so I didn't do it for those two lines). As far as the binaries are concerned, in that case I got the files by running g.extension r.area in the terminal within a GRASS session. I'd downloaded GRASS from the OpenSUSE Geo-Repository (URL: http://download.opensuse.org/repositories/Application:/Geo/openSUSE_11.3/). The binaries had later on were obtained with the command svn checkout https://svn.osgeo.org/grass/grass-addons/ grass-addons performed in the terminal outside a GRASS session. Best, Daniel -- View this message in context: http://osgeo-org.1803224.n2.nabble.com/Installing-r-area-tp5340139p5342221.html Sent from the Grass - Users mailing list archive at Nabble.com. ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user