[GRASS-dev] erorrs compiling i.pr modules

Hi,

Just updates to today's GRASS65-SVN, and checked out the grass-addons SVN
tree. I was able to compile several of the modules, but the i.pr modules seem
to be failing with the following error:

i.pr_sites_aggregate
make[1]: Entering directory
`/home/dylan/src/grass_6/grass-addons/imagery/i.pr/i.pr_sites_aggregate'
test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
gcc -I/home/dylan/src/grass_6/dist.i686-pc-linux-gnu/include -g -O2 -I../include/ -DPACKAGE=\""grassmods"\" -I/home/dylan/src/grass_6/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.c
main.c: In function ‘main’:
main.c:233: error: too many arguments to function ‘Vect_build’
main.c:235: error: too many arguments to function ‘Vect_build’
make[1]: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1
make[1]: Leaving directory
`/home/dylan/src/grass_6/grass-addons/imagery/i.pr/i.pr_sites_aggregate'

Any ideas, or suggestions on further information I can provide that would
help?

Cheers,
Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

I ran into this problem before. I believe the api has changes for a 2 argument Vect_build to a one. See what happens when you remove the second one.

Bob Moskovitz
Research Analyst I
Seismic Hazard Evaluation Project
California Geological Survey
http://gmw.consrv.ca.gov/shmp

CONFIDENTIALITY NOTICE: This communication is intended only for the use of the individual or entity to which it is addressed. This message contains information from the State of California, California Geological Survey, which may be privileged, confidential and exempt from disclosure under applicable law, including the Electronic Communications Privacy Act. If the reader of this communication is not the intended recipient, you are hereby notified that any dissemination, distribution, or copying of this communication is strictly prohibited.

-----Original Message-----
From: grass-dev-bounces@lists.osgeo.org
[mailto:grass-dev-bounces@lists.osgeo.org]On Behalf Of Dylan Beaudette
Sent: Tuesday, July 28, 2009 10:08 AM
To: grass-dev@lists.osgeo.org
Subject: [GRASS-dev] erorrs compiling i.pr modules

Hi,

Just updates to today's GRASS65-SVN, and checked out the
grass-addons SVN
tree. I was able to compile several of the modules, but the
i.pr modules seem
to be failing with the following error:

i.pr_sites_aggregate
make[1]: Entering directory
`/home/dylan/src/grass_6/grass-addons/imagery/i.pr/i.pr_sites_
aggregate'
test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
gcc -I/home/dylan/src/grass_6/dist.i686-pc-linux-gnu/include
-g -O2 -I../include/ -DPACKAGE=\""grassmods"\"
-I/home/dylan/src/grass_6/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.c
main.c: In function ‘main’:
main.c:233: error: too many arguments to function ‘Vect_build’
main.c:235: error: too many arguments to function ‘Vect_build’
make[1]: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1
make[1]: Leaving directory
`/home/dylan/src/grass_6/grass-addons/imagery/i.pr/i.pr_sites_
aggregate'

Any ideas, or suggestions on further information I can
provide that would
help?

Cheers,
Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-dev

On Tuesday 28 July 2009, Moskovitz, Bob wrote:

I ran into this problem before. I believe the api has changes for a 2
argument Vect_build to a one. See what happens when you remove the second
one.

That did the trick. Patch is attached. It seems like there is no 'install'
target for these files:

$> sudo make MODULE_TOPDIR=/home/dylan/src/grass_6/ install
make: *** No rule to make target `install'. Stop.

Cheers,
Dylan

Bob Moskovitz
Research Analyst I
Seismic Hazard Evaluation Project
California Geological Survey
http://gmw.consrv.ca.gov/shmp

CONFIDENTIALITY NOTICE: This communication is intended only for the use of
the individual or entity to which it is addressed. This message contains
information from the State of California, California Geological Survey,
which may be privileged, confidential and exempt from disclosure under
applicable law, including the Electronic Communications Privacy Act. If the
reader of this communication is not the intended recipient, you are hereby
notified that any dissemination, distribution, or copying of this
communication is strictly prohibited.

> -----Original Message-----
> From: grass-dev-bounces@lists.osgeo.org
> [mailto:grass-dev-bounces@lists.osgeo.org]On Behalf Of Dylan Beaudette
> Sent: Tuesday, July 28, 2009 10:08 AM
> To: grass-dev@lists.osgeo.org
> Subject: [GRASS-dev] erorrs compiling i.pr modules
>
>
> Hi,
>
> Just updates to today's GRASS65-SVN, and checked out the
> grass-addons SVN
> tree. I was able to compile several of the modules, but the
> i.pr modules seem
> to be failing with the following error:
>
> i.pr_sites_aggregate
> make[1]: Entering directory
> `/home/dylan/src/grass_6/grass-addons/imagery/i.pr/i.pr_sites_
> aggregate'
> test -d OBJ.i686-pc-linux-gnu || mkdir -p OBJ.i686-pc-linux-gnu
> gcc -I/home/dylan/src/grass_6/dist.i686-pc-linux-gnu/include
> -g -O2 -I../include/ -DPACKAGE=\""grassmods"\"
> -I/home/dylan/src/grass_6/dist.i686-pc-linux-gnu/include -o
> OBJ.i686-pc-linux-gnu/main.o -c main.c
> main.c: In function ‘main’:
> main.c:233: error: too many arguments to function ‘Vect_build’
> main.c:235: error: too many arguments to function ‘Vect_build’
> make[1]: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1
> make[1]: Leaving directory
> `/home/dylan/src/grass_6/grass-addons/imagery/i.pr/i.pr_sites_
> aggregate'
>
> Any ideas, or suggestions on further information I can
> provide that would
> help?
>
> Cheers,
> Dylan
>
> --
> Dylan Beaudette
> Soil Resource Laboratory
> http://casoilresource.lawr.ucdavis.edu/
> University of California at Davis
> 530.754.7341
> _______________________________________________
> grass-dev mailing list
> grass-dev@lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-dev

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

(attachments)

vect_build-single_argument.patch (425 Bytes)

On Tue, Jul 28, 2009 at 9:46 PM, Dylan Beaudette<debeaudette@ucdavis.edu> wrote:

On Tuesday 28 July 2009, Moskovitz, Bob wrote:

I ran into this problem before. I believe the api has changes for a 2
argument Vect_build to a one. See what happens when you remove the second
one.

That did the trick. Patch is attached.

Thanks, fixed plus another compilation issue.

It seems like there is no 'install'
target for these files:

$> sudo make MODULE_TOPDIR=/home/dylan/src/grass_6/ install
make: *** No rule to make target `install'. Stop.

Yes, because it is a set of subdirs and my skills aren't sufficient to
modify the Makefile rules to permit for recursive installation...

You need to walk through the subdirs and run it from there.
Since "make clean" runs recursively, it might be "easy" to apply
this also to "make install" but I would leave this to someone else.

Markus

On Thursday 30 July 2009, Markus Neteler wrote:

On Tue, Jul 28, 2009 at 9:46 PM, Dylan Beaudette<debeaudette@ucdavis.edu>

wrote:

> On Tuesday 28 July 2009, Moskovitz, Bob wrote:
>> I ran into this problem before. I believe the api has changes for a 2
>> argument Vect_build to a one. See what happens when you remove the
>> second one.
>
> That did the trick. Patch is attached.

Thanks, fixed plus another compilation issue.

> It seems like there is no 'install'
> target for these files:
>
> $> sudo make MODULE_TOPDIR=/home/dylan/src/grass_6/ install
> make: *** No rule to make target `install'. Stop.

Yes, because it is a set of subdirs and my skills aren't sufficient to
modify the Makefile rules to permit for recursive installation...

You need to walk through the subdirs and run it from there.
Since "make clean" runs recursively, it might be "easy" to apply
this also to "make install" but I would leave this to someone else.

Markus

Thanks Markus. Unfortunately I don't know how to to this either...

How about adding something like the following to the README:

To install all i.pr modules, run this script in the parent directory.
for x in i.pr_*
do
sudo make -f $x/Makefile MODULE_TOPDIR=$HOME/grass_source_code/ install
done

Cheers,
Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341

On Fri, Jul 31, 2009 at 6:40 PM, Dylan Beaudette<debeaudette@ucdavis.edu> wrote:

On Thursday 30 July 2009, Markus Neteler wrote:

On Tue, Jul 28, 2009 at 9:46 PM, Dylan Beaudette<debeaudette@ucdavis.edu>

wrote:

> On Tuesday 28 July 2009, Moskovitz, Bob wrote:
>> I ran into this problem before. I believe the api has changes for a 2
>> argument Vect_build to a one. See what happens when you remove the
>> second one.
>
> That did the trick. Patch is attached.

Thanks, fixed plus another compilation issue.

> It seems like there is no 'install'
> target for these files:
>
> $> sudo make MODULE_TOPDIR=/home/dylan/src/grass_6/ install
> make: *** No rule to make target `install'. Stop.

Yes, because it is a set of subdirs and my skills aren't sufficient to
modify the Makefile rules to permit for recursive installation...

You need to walk through the subdirs and run it from there.
Since "make clean" runs recursively, it might be "easy" to apply
this also to "make install" but I would leave this to someone else.

Markus

Thanks Markus. Unfortunately I don't know how to to this either...

I guess I figured it out: done in r38565 in GRASS 6.5.

To test:
- update i.pr for a small update
- update GRASS 6.5 include/Make
- compile/install GRASS
- try again with i.pr
- report here

Markus

On Sunday 02 August 2009, Markus Neteler wrote:

On Fri, Jul 31, 2009 at 6:40 PM, Dylan Beaudette<debeaudette@ucdavis.edu>

wrote:

> On Thursday 30 July 2009, Markus Neteler wrote:
>> On Tue, Jul 28, 2009 at 9:46 PM, Dylan
>> Beaudette<debeaudette@ucdavis.edu>
>
> wrote:
>> > On Tuesday 28 July 2009, Moskovitz, Bob wrote:
>> >> I ran into this problem before. I believe the api has changes for a
>> >> 2 argument Vect_build to a one. See what happens when you remove the
>> >> second one.
>> >
>> > That did the trick. Patch is attached.
>>
>> Thanks, fixed plus another compilation issue.
>>
>> > It seems like there is no 'install'
>> > target for these files:
>> >
>> > $> sudo make MODULE_TOPDIR=/home/dylan/src/grass_6/ install
>> > make: *** No rule to make target `install'. Stop.
>>
>> Yes, because it is a set of subdirs and my skills aren't sufficient to
>> modify the Makefile rules to permit for recursive installation...
>>
>> You need to walk through the subdirs and run it from there.
>> Since "make clean" runs recursively, it might be "easy" to apply
>> this also to "make install" but I would leave this to someone else.
>>
>> Markus
>
> Thanks Markus. Unfortunately I don't know how to to this either...

I guess I figured it out: done in r38565 in GRASS 6.5.

To test:
- update i.pr for a small update
- update GRASS 6.5 include/Make
- compile/install GRASS
- try again with i.pr
- report here

Markus

Thanks for looking into this Markus.

I updated GRASS and the addons SVN branch, and now I can install i.pr modules
from the top-level directory. Nice!

Cheers,
Dylan

--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341