[GRASS-user] Installing r.area

Micha Silver micha at arava.co.il
Tue Jul 27 02:10:37 EDT 2010


On 27/07/2010 01:41, LeeDaniel wrote:
> Hi all,
>
> I'm trying to use r.area. For that I need to, of course, install it. As I've
> never compiled and installed anything before, these questions might be kind
> of stupid... So I apologize. Yes, I've read
>    
My dad used to say "The only stupid question is the one not asked".
> http://grass.osgeo.org/wiki/Compile_and_Install#Compiled_C_modules
> but although I tried what it asked me to do I didn't get the results I
> expected. Here is what I tried on OpenSUSE 11.3, 32 bit:
>    
First off, there's a module g.extension that is designed to make this 
whole addon business smoother. I don't know about OpenSuse: You should 
check first if it's available. If you have it, then just run:
g.extension r.area
and it does all the dirty work.
> 1. Went to the GRASS AddOns Wiki-page
> (http://grass.osgeo.org/wiki/GRASS_AddOns) and tried to add the various the
> SVN repository to my repository directories in Yast (the OpenSUSE system
> tool). Didn't work, which I think is one of those things that everybody'll
> say "duh" about, but when I say "duh" in this case, it comes from my heart
> because I'm dumb :P
>    
SVN is not a YAST repository. It's just way to maintain a collection of 
source code. If you run the command that appears in the above wiki page, 
you'll get on your computer the source code for all the addons. Then you 
have to go into each subdir and compile the ones you want.
> 2. Found the source codes of r.area (consisting of description.html, main.c
> and Makefile), copied their content into files with matching names in my
> home directory
> 3. Followed the instructions on
> http://grass.osgeo.org/wiki/Compile_and_Install to compile and install C
> add-ons (under the assumption that that's correct for r.area - sure looks
> like it is). Got the following results:
>
> - Hoping that the add-on was a binary (I know, I know...), I tried compiling
> it with
> make MODULE_TOPDIR=/usr/bin/grass64/
> Result:
> Makefile:11: /usr/bin/grass64//include/Make/Module.make: Not a directory
> make: *** No rule to make target
> `/usr/bin/grass64//include/Make/Module.make'.  Stop.
>
>    
I think you have to be "inside" the directory where put the r.area source.
> Okay. The computer spoke Latin to me. Noticing that it's got a path with two
> slashes right after another after my input, I thought that perhaps it wasn't
> finding the proper directory and tried it without the slash at the end:
> make MODULE_TOPDIR=/usr/bin/grass64
> Result:
> Makefile:11: /usr/bin/grass64/include/Make/Module.make: Not a directory
> make: *** No rule to make target
> `/usr/bin/grass64/include/Make/Module.make'.  Stop.
>
> Alright. No more double slash, but for all intents and purposes the same
> message. So I then tried setting up an alias, not because I understand what
> that means but because it was also suggested on the page:
> alias gmake64='make MODULE_TOPDIR=/usr/bin/grass64/'
> Computer seemed to like this and gave no reply. However, the next line was
> ready, so I guess the alias was set up. Then I tried installing it:
> make MODULE_TOPDIR=/usr/bin/grass64/ install
> Result:
> Makefile:11: /usr/bin/grass64//include/Make/Module.make: Not a directory
> make: *** No rule to make target
> `/usr/bin/grass64//include/Make/Module.make'.  Stop.
>
> Obviously I'm doing something wrong. Thinking that I might be dealing with
> source code that still needed to be prepared, I entered:
>    
Yes, you need to have the whole GRASS source available for this. You go 
into wherever you unpacked the source and there you run ./configure
Try to follow this wiki page:
http://grass.osgeo.org/wiki/Compile_and_Install#Addons

> ./configure
> To which my computer replied:
> bash: ./configure: No such file or directory
>
> No luck. Can anybody help me? I know this is a relatively simple question,
> but I don't seem to be able to make anything of the online help texts.
> Thanks!!
>
> Best,
> Daniel
>    


-- 
Micha Silver
http://www.surfaces.co.il/
Arava Development Co.  +972-52-3665918



More information about the grass-user mailing list