[GRASS-user] g.extension not working

Hi
I like to install add-ons to Windows
GRASS 6.4 and get the below message. I also tried with Ubuntu,
but the module does not exist. I appreciate any help with Windows or Ubuntu.

g.extension extension=r.fuzzy
Fetching <r.fuzzy> from
GRASS-Addons SVN (be patient)...
A r.fuzzy\local_proto.h
A r.fuzzy\shape.png
A r.fuzzy\main.c
A r.fuzzy\boundary.png
A r.fuzzy\description.html
A r.fuzzy\fuzzy.c
A r.fuzzy\Makefile
A r.fuzzy\set.png
U r.fuzzy
Checked out revision 48100.
Compiling <r.fuzzy>...
test -d OBJ.i686-pc-mingw32 || mkdir -p
OBJ.i686-pc-mingw32
gcc
-I/c/osgeo4w/usr/src/grass641_release/dist.i686-pc-mingw32/include
-I/c/OSGeo4W/include -g -O2 -I/c/OSGeo4W/include
-I/c/OSGeo4W/include -I/c/OSGeo4W/include
-DPACKAGE=\""grassmods"\"
-I/c/osgeo4w/usr/src/grass641_release/dist.i686-pc-mingw32/include -o
OBJ.i686-pc-mingw32/fuzzy.o -c fuzzy.c
gcc.exe: installation problem, cannot
exec `cc1': No such
file or directory
make: *** [OBJ.i686-pc-mingw32/fuzzy.o]
Error 1
ERROR: Compilation failed, sorry.
Please check above error messages.
rm: cannot remove directory
`E:\\GlobalData/jgd2000/PERMANENT/.tmp/1288.0/r.fuzzy':
Permission denied

Edgar

Hi,

2011/9/4 Edgar Pimiento <e_pimiento@yahoo.com>:

I like to install add-ons to Windows

g.extension simply doesn't work on Windows. We should finally ship
pre-compiled binaries for GRASS add-ons.

Martin

--
Martin Landa <landa.martin gmail.com> * http://geo.fsv.cvut.cz/~landa

On Mon, Sep 5, 2011 at 3:33 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2011/9/4 Edgar Pimiento <e_pimiento@yahoo.com>:

I like to install add-ons to Windows

g.extension simply doesn't work on Windows. We should finally ship
pre-compiled binaries for GRASS add-ons.

Yes - I have already added most makefiles, so a compilation from
the main Addons directory should generate all compilable modules.

Markus

Edgar wrote:

> I like to install add-ons to Windows

Martin:

g.extension simply doesn't work on Windows.

Even if gcc is fundamentally problematic (is it? or just usual lot
of bugs to crush?) downloading and making .bat wrappers for scripts
should be workable enough.

Downloading a script shouldn't complain about missing gcc anyway,
that's not Window's fault.

Hamish

Hamish wrote:

Even if gcc is fundamentally problematic (is it? or just
usual lot of bugs to crush?) downloading and making .bat
wrappers for scripts should be workable enough.

(while Edgar was trying r.fuzzy (C), we get the same exact series
of error messages when trying with a shell script)

H

On Tue, Sep 6, 2011 at 12:47 AM, Hamish <hamish_b@yahoo.com> wrote:

Edgar wrote:

> I like to install add-ons to Windows

Martin:

g.extension simply doesn't work on Windows.

Even if gcc is fundamentally problematic (is it? or just usual lot
of bugs to crush?) downloading and making .bat wrappers for scripts
should be workable enough.

In R, win-R users fetch precompiled executables. I think that we
should follow the same direction for winGRASS which would reduce
g.extension on Windows to a "curl" (or whatever) + unzip call.

Markus

Hi,

Thank you for your comments. Can you please give more details on how to install the addons on Ubuntu? Like what file to download and which command to run.

I don't understand the instruction for compiling at http://grass.osgeo.org/wiki/Compile_and_Install#Addons

Thank you,

Edgar

Edgar Pimiento Chamorro
e_pimiento at yahoo.com

----- Original Message -----
From: Markus Neteler <neteler@osgeo.org>
To: Martin Landa <landa.martin@gmail.com>
Cc: Edgar Pimiento <e_pimiento@yahoo.com>; "grass-user@lists.osgeo.org" <grass-user@lists.osgeo.org>
Sent: Tuesday, September 6, 2011 4:13 AM
Subject: Re: [GRASS-user] g.extension not working

On Mon, Sep 5, 2011 at 3:33 PM, Martin Landa <landa.martin@gmail.com> wrote:

Hi,

2011/9/4 Edgar Pimiento <e_pimiento@yahoo.com>:

I like to install add-ons to Windows

g.extension simply doesn't work on Windows. We should finally ship
pre-compiled binaries for GRASS add-ons.

Yes - I have already added most makefiles, so a compilation from
the main Addons directory should generate all compilable modules.

Markus

Edgar wrote:

I don't understand the instruction for compiling
at http://grass.osgeo.org/wiki/Compile_and_Install#Addons

can you be more specific about what bits are confusing? sometimes
that is hard to see without fresh eyes, and it would be good if
we could improve it for future readers.

Hamish

----- Original Message -----
Subject: Re: [GRASS-user] g.extension not working

Edgar wrote:

I don't understand the instruction for compiling
at http://grass.osgeo.org/wiki/Compile_and_Install#Addons

can you be more specific about what bits are confusing? sometimes
that is hard to see without fresh eyes, and it would be good if
we could improve it for future readers.

Hamish

Dear Hamish,

I would like to install GRASS addons for Windows, and since g.extension does not work, I would like to know how to compile the addons. But I don't understand the instructions. Or how to do it with Ubuntu.

Edgar

On Wed, Sep 7, 2011 at 1:00 PM, Edgar Pimiento <e_pimiento@yahoo.com> wrote:

I would like to install GRASS addons for Windows, and since g.extension does not work,

Could you please try the graphical Addons installer in the wxGUI:

Settings
  -> Install extensions from Addons
      -> Fetch
          -> Select module to install, etc.

Markus

Edgar wrote:
> I don't understand the instruction for compiling
> at http://grass.osgeo.org/wiki/Compile_and_Install#Addons

Hamish:

can you be more specific about what bits are confusing?
sometimes that is hard to see without fresh eyes, and it
would be good if we could improve it for future readers.

Edgar:

I would like to install GRASS addons for Windows, and since
g.extension does not work, I would like to know how to
compile the addons. But I don't understand the instructions.
Or how to do it with Ubuntu.

on ubuntu, make sure you are up to date by installing the 6.4.1
package from UbuntuGIS's PPA, and be sure you install the
"grass-dev" package too, as it includes bits needed to make
g.extension work.

what version of ubuntu? 32 or 64 bit?

Hamish

Edgar wrote:

> I don't understand the instruction for compiling
> at http://grass.osgeo.org/wiki/Compile_and_Install#Addons

Hamish:

can you be more specific about what bits are confusing?
sometimes that is hard to see without fresh eyes, and it
would be good if we could improve it for future readers.

Edgar:

I would like to install GRASS addons for Windows, and since
g.extension does not work, I would like to know how to
compile the addons. But I don't understand the instructions.
Or how to do it with Ubuntu.

Hamish wrote:
on ubuntu, make sure you are up to date by installing the 6.4.1
package from UbuntuGIS's PPA, and be sure you install the
"grass-dev" package too, as it includes bits needed to make
g.extension work.

what version of ubuntu? 32 or 64 bit?

I installed 6.4.1 and grass-dev for ubuntu 32 bit

Edgar

Hamish:

>what version of ubuntu? 32 or 64 bit?

I installed 6.4.1 and grass-dev for ubuntu 32 bit

did g.extension then work?

which version of ubuntu? 10.04/lucid? 11.04/natty?

Hamish

Hamish:

>what version of ubuntu? 32 or 64 bit?

I installed 6.4.1 and grass-dev for ubuntu 32 bit

did g.extension then work?

which version of ubuntu? 10.04/lucid? 11.04/natty?

ubuntu 10.4
g.extension did not work, it required svn

Edgar

Edgar wrote:

g.extension did not work, it required svn

sudo apt-get install subversion

Hamish

Hamish wrote:

sudo apt-get install subversion

Edgar
After installing subversion the following message.
g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)...

A r.fuzzy/local_proto.h
A r.fuzzy/shape.png
A r.fuzzy/main.c
A r.fuzzy/boundary.png
A r.fuzzy/description.html
A r.fuzzy/fuzzy.c
A r.fuzzy/set.png
A r.fuzzy/Makefile
U r.fuzzy
Checked out revision 48243.
Compiling <r.fuzzy>...

mkdir -p /build/buildd/grass-6.4.1/bin.i486-pc-linux-gnu
mkdir: cannot create directory `/build': Permission denied
make: *** [/build/buildd/grass-6.4.1/bin.i486-pc-linux-gnu] Error 1
Compilation failed, sorry. Please check above error messages.

Edgar

Edgar wrote:

After installing subversion the following message.
g.extension extension=r.fuzzy
Fetching <r.fuzzy> from GRASS-Addons SVN (be patient)...

A r.fuzzy/local_proto.h
A r.fuzzy/shape.png
A r.fuzzy/main.c
A r.fuzzy/boundary.png
A r.fuzzy/description.html
A r.fuzzy/fuzzy.c
A r.fuzzy/set.png
A r.fuzzy/Makefile
U r.fuzzy
Checked out revision 48243.
Compiling <r.fuzzy>...

mkdir -p /build/buildd/grass-6.4.1/bin.i486-pc-linux-gnu
mkdir: cannot create directory `/build': Permission denied
make: *** [/build/buildd/grass-6.4.1/bin.i486-pc-linux-gnu]
Error 1
Compilation failed, sorry. Please check above error messages.

hmmm, it would seem I never committed the DebianGIS patch to fix the build
dir from the build-server's value to the end-user's installed value:

sudo sed -i -e 's+^\(GRASS_HOME*=\) /build/.*+\1 ${INST_DIR}+' \
       -e 's+^\(RUN_GISBASE*=\) /build/.*+\1 ${INST_DIR}+' \
       /usr/lib/grass64/include/Make/Platform.make

But even after fixing that I notice there is still more to do before it
will work properly on a system without a full source install. I've just
committed a couple fixes to devbr6; I'll write more about that on the
grass-dev mailing list.

...
I've got Ubuntu 10.04 LTS 32bit installed in a virtual machine, so for
now I'll just build r.fuzzy for you by hand and send you the executable.

Hamish