[GRASS-user] latest i.pca does not compile?

Nikos wrote:

nik@vertical:/geo/osgeo/src/grass6_devel/imagery/i.pca$
make
gcc
-I/geo/osgeo/src/grass6_devel/dist.x86_64-unknown-linux-gnu/include
-g -Wall
-DPACKAGE=\""grassmods"\"
-I/geo/osgeo/src/grass6_devel/dist.x86_64-unknown-linux-gnu/include
-o
OBJ.x86_64-unknown-linux-gnu/support.o -c support.c
support.c: In function ‘write_history’:
support.c:62: error: expected expression before
‘<<’ token
support.c:65: error: expected expression before ‘==’
token
support.c:68: error: expected expression before
‘>>’ token
support.c:71: warning: format not a string literal and no
format
arguments
make: *** [OBJ.x86_64-unknown-linux-gnu/support.o] Error 1

that is most likely a result of a svn merge conflict.
(look for lines starting with "C" during svn up)

if you look in the code you'll see like:

<<<<<<<<<< .mine
abc

abd

.r12345

fix those in the code then do "svn resolved filename.c"

Hamish

m.eigensystem, compiled against latest grass6_dev _AND_ grass-6.4.0RC4
source code, segfaults under Ubuntu-J 64-bit Beta.

Greetings, Nikos

On Mon, 2009-04-13 at 13:52 +0200, Nikos Alexandris wrote:

m.eigensystem, compiled against latest grass6_dev _AND_ grass-6.4.0RC4
source code, segfaults under Ubuntu-J 64-bit Beta.

Example with spearfish landsat data below (tried with other data as
well):

# launch fresh-baked grass6_dev
grass65 /geo/grassdb/nc_spm_08/PERMANENT/

# one-liner using 3 bands
(echo 3; r.covar lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) |
m.eigensystem

r.covar: complete ...
100%
Segmentation fault (core dumped)

# extra-info
# intentionally provide _4_ instead of _3_ in echo
# m.eigensystem aborts because of "incomplete input..."
(echo 4; r.covar lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) |
m.eigensystem

r.covar: complete ...
100%
Incomplete input file

---
Cheers, Nikos

OK, I should start at some point practicing debug-ing. Though, unknown
territory for me the "G_*" messages below.

Nikos:

> m.eigensystem, compiled against latest grass6_dev _AND_ grass-6.4.0RC4
> source code, segfaults under Ubuntu-J 64-bit Beta.

Example with spearfish landsat data below (tried with other data as
well):
# one-liner using 3 bands
(echo 3; r.covar lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) |
m.eigensystem

r.covar: complete ...
100%
Segmentation fault (core dumped)

# setting debug level 5
g.gisenv set="DEBUG=5"

# output of the above one-liner
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj: 99
D3/5: region item: zone: 0
D3/5: region item: north: 221230
D3/5: region item: south: 219580
D3/5: region item: east: 639530
D3/5: region item: west: 637740
D3/5: region item: cols: 179
D3/5: region item: rows: 165
D3/5: region item: e-w resol: 10
D3/5: region item: n-s resol: 10
D3/5: region item: top: 1
D3/5: region item: bottom: 0
D3/5: region item: cols3: 179
D3/5: region item: rows3: 165
D3/5: region item: depths: 1
D3/5: region item: e-w resol3: 10
D3/5: region item: n-s resol3: 10
D3/5: region item: t-b resol: 1
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj: 99
D3/5: region item: zone: 0
D3/5: region item: north: 228513
D3/5: region item: south: 214975.5
D3/5: region item: east: 645012
D3/5: region item: west: 629992.5
D3/5: region item: cols: 527
D3/5: region item: rows: 475
D3/5: region item: e-w resol: 28.5
D3/5: region item: n-s resol: 28.5
D3/5: region item: format: 0
D3/5: region item: compressed: 1
D3/5: create window mapping (179 columns)
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj: 99
D3/5: region item: zone: 0
D3/5: region item: north: 228513
D3/5: region item: south: 214975.5
D3/5: region item: east: 645012
D3/5: region item: west: 629992.5
D3/5: region item: cols: 527
D3/5: region item: rows: 475
D3/5: region item: e-w resol: 28.5
D3/5: region item: n-s resol: 28.5
D3/5: region item: format: 0
D3/5: region item: compressed: 1
D3/5: create window mapping (179 columns)
D2/5: G__read_Cell_head
D2/5: G__read_Cell_head_array
D3/5: region item: proj: 99
D3/5: region item: zone: 0
D3/5: region item: north: 228513
D3/5: region item: south: 214975.5
D3/5: region item: east: 645012
D3/5: region item: west: 629992.5
D3/5: region item: cols: 527
D3/5: region item: rows: 475
D3/5: region item: e-w resol: 28.5
D3/5: region item: n-s resol: 28.5
D3/5: region item: format: 0
D3/5: region item: compressed: 1
D3/5: create window mapping (179 columns)
r.covar: complete ...
100%
Segmentation fault (core dumped)

---
Nikos

On Mon, Apr 13, 2009 at 3:05 PM, Nikos Alexandris
<nikos.alexandris@felis.uni-freiburg.de> wrote:

On Mon, 2009-04-13 at 13:52 +0200, Nikos Alexandris wrote:

m.eigensystem, compiled against latest grass6_dev _AND_ grass-6.4.0RC4
source code, segfaults under Ubuntu-J 64-bit Beta.

Example with spearfish landsat data below (tried with other data as
well):

# launch fresh-baked grass6_dev
grass65 /geo/grassdb/nc_spm_08/PERMANENT/

# one-liner using 3 bands
(echo 3; r.covar lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) |
m.eigensystem

r.covar: complete ...
100%
Segmentation fault (core dumped)

Here's my take:

GRASS 6.5.svn (nc_spm_07):~ > (echo 3; r.covar
lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) | m.eigensystem
r.covar: complete ...
100%
ERROR: No non-null values
Incomplete input file

BUT:

GRASS 6.5.svn (nc_spm_07):~ > g.region rast=lsat7_2002_10
GRASS 6.5.svn (nc_spm_07):~ > (echo 3; r.covar
lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) | m.eigensystem
r.covar: complete ...
100%
E 2134.5009768265 0.0000000000 98.07
V 0.5053399527 0.0000000000
V 0.5791606282 0.0000000000
V 0.8626950892 0.0000000000
...

Does it work for you if you set the region to the lsat7_2002_10 map?
If yes, then m.eigensystem "just" suffers from not trapping bad input.

Markus

Nikos:

> On Mon, 2009-04-13 at 13:52 +0200, Nikos Alexandris wrote:
>> m.eigensystem, compiled against latest grass6_dev _AND_ grass-6.4.0RC4
>> source code, segfaults under Ubuntu-J 64-bit Beta.
>
> Example with spearfish landsat data below (tried with other data as
> well):
>
> # launch fresh-baked grass6_dev
> grass65 /geo/grassdb/nc_spm_08/PERMANENT/
>
>
> # one-liner using 3 bands
> (echo 3; r.covar lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) |
> m.eigensystem
>
> r.covar: complete ...
> 100%
> Segmentation fault (core dumped)

Markus:

Here's my take:

GRASS 6.5.svn (nc_spm_07):~ > (echo 3; r.covar
lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) | m.eigensystem
r.covar: complete ...
100%
ERROR: No non-null values
Incomplete input file

BUT:

GRASS 6.5.svn (nc_spm_07):~ > g.region rast=lsat7_2002_10
GRASS 6.5.svn (nc_spm_07):~ > (echo 3; r.covar
lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) | m.eigensystem
r.covar: complete ...
100%
E 2134.5009768265 0.0000000000 98.07
V 0.5053399527 0.0000000000
V 0.5791606282 0.0000000000
V 0.8626950892 0.0000000000
...

Does it work for you if you set the region to the lsat7_2002_10 map?
If yes, then m.eigensystem "just" suffers from not trapping bad input.

Unfortunately it does not work :-(.

# although the region is already set correctly...
g.region rast=lsat7_2002_10 # or g.region rast=lsat7_2002_10 -a
(echo 3; r.covar lsat7_2002_10,lsat7_2002_20,lsat7_2002_30) |
m.eigensystem

[...]
Segmentation fault (core dumped)

Nikos

P.S. I just remind that I work with Jaunty (devel branch).
Brainstorming:
* Maybe it's Ubuntu's fault?
* Maybe in my new system I forgot to add proper entries in ld.so.conf?
(BTW, could some-Ubuntero post his osgeo-relevant entries in
ld.so.conf?)

Nikos:

> > On Mon, 2009-04-13 at 13:52 +0200, Nikos Alexandris wrote:
> >> m.eigensystem, compiled against latest grass6_dev _AND_ grass-6.4.0RC4
> >> source code, segfaults under Ubuntu-J 64-bit Beta.

It works fine with Ubuntu Intrepid! So, something in Jaunty doesn't like
m.eigensystem (fortran code?)!

Cheers, Nikos