[GRASS-user] Can't install i.pr

Hello fellow GRASS users,

I’m new with GRASS.
At this point, I need to install the
i.pr add-on, but I’ve met some
dificulties:

I download the package via svn,
and that went just fine. But when
I do

make MODULE_TOPDIR=/usr/lib/grass64

I get this a huge stream of errors and
warnings, e.g.


main.c:294: warning: assignment makes pointer from integer without a cast
main.c:295: error: dereferencing pointer to incomplete type
main.c:296: error: dereferencing pointer to incomplete type
main.c:297: error: dereferencing pointer to incomplete type
main.c:298: error: dereferencing pointer to incomplete type
main.c:299: error: dereferencing pointer to incomplete type
main.c:300: error: dereferencing pointer to incomplete type
main.c:302: warning: assignment makes pointer from integer without a cast
main.c:303: error: dereferencing pointer to incomplete type
main.c:304: error: dereferencing pointer to incomplete type
main.c:305: error: dereferencing pointer to incomplete type
main.c:306: error: dereferencing pointer to incomplete type
main.c:307: error: dereferencing pointer to incomplete type
main.c:310: warning: implicit declaration of function ‘G_define_flag’

Can anyone tell me why this is so, and how can
I solve this?

Thanks.

(PS: I’m working in Ubuntu 9.10 with GRASS 6.4.)

On Thu, Mar 25, 2010 at 4:37 PM, joel dinis <dinis.joel@gmail.com> wrote:

Hello fellow GRASS users,

I'm new with GRASS.
At this point, I need to install the
i.pr add-on, but I've met some
dificulties:

I download the package via svn,
and that went just fine. But when
I do

make MODULE_TOPDIR=/usr/lib/grass64

I get this a huge stream of errors and
warnings, e.g.

...
main.c:294: warning: assignment makes pointer from integer without a cast
main.c:295: error: dereferencing pointer to incomplete type
main.c:296: error: dereferencing pointer to incomplete type
main.c:297: error: dereferencing pointer to incomplete type
main.c:298: error: dereferencing pointer to incomplete type
main.c:299: error: dereferencing pointer to incomplete type
main.c:300: error: dereferencing pointer to incomplete type
main.c:302: warning: assignment makes pointer from integer without a cast
main.c:303: error: dereferencing pointer to incomplete type
main.c:304: error: dereferencing pointer to incomplete type
main.c:305: error: dereferencing pointer to incomplete type
main.c:306: error: dereferencing pointer to incomplete type
main.c:307: error: dereferencing pointer to incomplete type
main.c:310: warning: implicit declaration of function ‘G_define_flag’
...

to which of the i.pr commands is this related? For me it compiles
fine (Mandriva, GRASS 64).

....> (PS: I'm working in Ubuntu 9.10 with GRASS 6.4.)

Markus

joel dinis wrote:

I'm new with GRASS.
At this point, I need to install the
i.pr add-on, but I've met some
dificulties:

I download the package via svn,
and that went just fine. But when
I do

   make MODULE_TOPDIR=/usr/lib/grass64

I get this a huge stream of errors and
warnings, e.g.

...

main.c:310: warning: implicit declaration of function �G_define_flag�

I suspect that the stream of errors starts with something like:

  foo.c:1:23: error: grass/gis.h: No such file or directory

When faced with a large number of errors, always look at the first
ones, as they usually indicate the actual problem, while later ones
are merely symptoms of the problem.

Also, always redirect "make" output to a file, e.g.:

  make &> build.log
or:
  make 2>&1 | tee build.log

Can anyone tell me why this is so, and how can
I solve this?

It's probably because include/Make/Platform.make has GRASS_HOME (etc)
pointing to the directory where GRASS was built.

If you want to compile add-ons against an installed version of GRASS,
you'll need to override more than just MODULE_TOPDIR. AFAICT, you may
also need to override ARCH_DISTDIR and ERRORLOG and possibly
ARCH_BINDIR and/or RUN_GISBASE.

--
Glynn Clements <glynn@gclements.plus.com>