[GRASS-user] Spectral Unmixing

Hi all!
compilation error in ubuntu12.10 x64
GRASS 7.0.svn (nc_spm_08):/usr/local/grass-addons/grass7/imagery/i.spec.unmix > sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn
gcc -g -O2 -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -D_FILE_OFFSET_BITS=64 -DPACKAGE="“grassmods”" -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -o OBJ.x86_64-unknown-linux-gnu/la_extra.o -c la_extra.c
In file included from /usr/local/grass-7.0.svn/include/grass/la.h:34:0,
from la_extra.c:12:
/usr/include/g2c.h:21:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:22:1: error: unknown type name ‘__g77_uinteger’
/usr/include/g2c.h:29:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:33:1: error: unknown type name ‘__g77_longint’
/usr/include/g2c.h:34:1: error: unknown type name ‘__g77_ulongint’
/usr/include/g2c.h:55:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:56:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:57:1: error: unknown type name ‘__g77_integer’
la_extra.c: In function ‘G_matvect_get_column2’:
la_extra.c:22:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:27:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:32:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘mv_mlt’:
la_extra.c:257:9: warning: assignment from incompatible pointer type [enabled by default]
la_extra.c: In function ‘G_vector_product’:
la_extra.c:396:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:401:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:406:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:411:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:417:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:423:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘G_matrix_read2’:
la_extra.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:480:6: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:486:3: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [OBJ.x86_64-unknown-linux-gnu/la_extra.o] Error 1

Thanks!
dehui

what is your gcc version?

post output of gcc -v

gcc 4.x doesnt need g2c.h and HAVEG2C_H remains undefined.

if you are using gcc4.x i can provide you a patch for la.h which will solve the issue for now.

Developers of gmath lib will have more comment on G2C issues

···

On Sat, Dec 8, 2012 at 9:34 AM, 王德辉 <dehuiw@gig.ac.cn> wrote:

Hi all!
compilation error in ubuntu12.10 x64
GRASS 7.0.svn (nc_spm_08):/usr/local/grass-addons/grass7/imagery/i.spec.unmix > sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn
gcc -g -O2 -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -D_FILE_OFFSET_BITS=64 -DPACKAGE="“grassmods”" -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -o OBJ.x86_64-unknown-linux-gnu/la_extra.o -c la_extra.c
In file included from /usr/local/grass-7.0.svn/include/grass/la.h:34:0,
from la_extra.c:12:
/usr/include/g2c.h:21:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:22:1: error: unknown type name ‘__g77_uinteger’
/usr/include/g2c.h:29:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:33:1: error: unknown type name ‘__g77_longint’
/usr/include/g2c.h:34:1: error: unknown type name ‘__g77_ulongint’
/usr/include/g2c.h:55:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:56:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:57:1: error: unknown type name ‘__g77_integer’
la_extra.c: In function ‘G_matvect_get_column2’:
la_extra.c:22:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:27:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:32:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘mv_mlt’:
la_extra.c:257:9: warning: assignment from incompatible pointer type [enabled by default]
la_extra.c: In function ‘G_vector_product’:
la_extra.c:396:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:401:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:406:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:411:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:417:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:423:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘G_matrix_read2’:
la_extra.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:480:6: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:486:3: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [OBJ.x86_64-unknown-linux-gnu/la_extra.o] Error 1

Thanks!
dehui


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Regards,
Rashad

Hi,

there was recently some question about spectral unmixing here in the list.

If you didn't modify the source code of the unmixing model to fit Grass 7 it won't work. Spectral unmixing was written by Markus as part of his diploma thesis, is now some years old and is based on Grass 5.something, if I'm not wrong.

Would be great if you can get it to work in Grass 7.x! Seems to me there is quite some interest in this module.

\T

On 08.12.2012, at 05:04, 王德辉 <dehuiw@gig.ac.cn> wrote:

Hi all!
compilation error in ubuntu12.10 x64
GRASS 7.0.svn (nc_spm_08):/usr/local/grass-addons/grass7/imagery/i.spec.unmix > sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn
gcc -g -O2 -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -D_FILE_OFFSET_BITS=64 -DPACKAGE=\""grassmods"\" -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -o OBJ.x86_64-unknown-linux-gnu/la_extra.o -c la_extra.c
In file included from /usr/local/grass-7.0.svn/include/grass/la.h:34:0,
                 from la_extra.c:12:
/usr/include/g2c.h:21:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:22:1: error: unknown type name ‘__g77_uinteger’
/usr/include/g2c.h:29:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:33:1: error: unknown type name ‘__g77_longint’
/usr/include/g2c.h:34:1: error: unknown type name ‘__g77_ulongint’
/usr/include/g2c.h:55:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:56:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:57:1: error: unknown type name ‘__g77_integer’
la_extra.c: In function ‘G_matvect_get_column2’:
la_extra.c:22:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:27:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:32:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘mv_mlt’:
la_extra.c:257:9: warning: assignment from incompatible pointer type [enabled by default]
la_extra.c: In function ‘G_vector_product’:
la_extra.c:396:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:401:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:406:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:411:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:417:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:423:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘G_matrix_read2’:
la_extra.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:480:6: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:486:3: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [OBJ.x86_64-unknown-linux-gnu/la_extra.o] Error 1

Thanks!
dehui

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Hi Thomas,
I had ported spectral unmixing to grass7. Myself and Markus had tested it several times on both G6 and G7 and updated it every time.

The problem is because of g2c.h which is not used by gcc4+. and g2c.h headers are included in lapack wrap code of gmath lib.

The error he said about __g77_integer is mentioned here https://bugs.launchpad.net/ubuntu/+source/gcc-3.4/+bug/61623
which says gcc-3.4

···

On Sat, Dec 8, 2012 at 12:33 PM, Thomas Becker <thomasgeo@gmx.de> wrote:

Hi,

there was recently some question about spectral unmixing here in the list.

If you didn’t modify the source code of the unmixing model to fit Grass 7 it won’t work. Spectral unmixing was written by Markus as part of his diploma thesis, is now some years old and is based on Grass 5.something, if I’m not wrong.

Would be great if you can get it to work in Grass 7.x! Seems to me there is quite some interest in this module.

\T

On 08.12.2012, at 05:04, 王德辉 <dehuiw@gig.ac.cn> wrote:

Hi all!
compilation error in ubuntu12.10 x64
GRASS 7.0.svn (nc_spm_08):/usr/local/grass-addons/grass7/imagery/i.spec.unmix > sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn
gcc -g -O2 -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -D_FILE_OFFSET_BITS=64 -DPACKAGE="“grassmods”" -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -o OBJ.x86_64-unknown-linux-gnu/la_extra.o -c la_extra.c
In file included from /usr/local/grass-7.0.svn/include/grass/la.h:34:0,
from la_extra.c:12:
/usr/include/g2c.h:21:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:22:1: error: unknown type name ‘__g77_uinteger’
/usr/include/g2c.h:29:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:33:1: error: unknown type name ‘__g77_longint’
/usr/include/g2c.h:34:1: error: unknown type name ‘__g77_ulongint’
/usr/include/g2c.h:55:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:56:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:57:1: error: unknown type name ‘__g77_integer’
la_extra.c: In function ‘G_matvect_get_column2’:
la_extra.c:22:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:27:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:32:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘mv_mlt’:
la_extra.c:257:9: warning: assignment from incompatible pointer type [enabled by default]
la_extra.c: In function ‘G_vector_product’:
la_extra.c:396:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:401:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:406:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:411:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:417:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:423:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘G_matrix_read2’:
la_extra.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:480:6: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:486:3: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [OBJ.x86_64-unknown-linux-gnu/la_extra.o] Error 1

Thanks!
dehui


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Regards,
Rashad

On Sat, Dec 8, 2012 at 8:16 AM, Mohammed Rashad
<mohammedrashadkm@gmail.com> wrote:

Hi Thomas,
I had ported spectral unmixing to grass7. Myself and Markus had tested it
several times on both G6 and G7 and updated it every time.

See now
http://grasswiki.osgeo.org/wiki/AddOns/GRASS_7/imagery#i.spec.unmix

Testing welcome!

Markus

wdh:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu/Linaro 4.7.2-2ubuntu1’ --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)

在2012-12-08 14:09:41,王德辉dehuiw@gig.ac.cn写道:

···

On Sat, Dec 8, 2012 at 9:34 AM, 王德辉 <dehuiw@gig.ac.cn> wrote:

Hi all!
compilation error in ubuntu12.10 x64
GRASS 7.0.svn (nc_spm_08):/usr/local/grass-addons/grass7/imagery/i.spec.unmix > sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn
gcc -g -O2 -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -D_FILE_OFFSET_BITS=64 -DPACKAGE="“grassmods”" -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -o OBJ.x86_64-unknown-linux-gnu/la_extra.o -c la_extra.c
In file included from /usr/local/grass-7.0.svn/include/grass/la.h:34:0,
from la_extra.c:12:
/usr/include/g2c.h:21:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:22:1: error: unknown type name ‘__g77_uinteger’
/usr/include/g2c.h:29:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:33:1: error: unknown type name ‘__g77_longint’
/usr/include/g2c.h:34:1: error: unknown type name ‘__g77_ulongint’
/usr/include/g2c.h:55:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:56:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:57:1: error: unknown type name ‘__g77_integer’
la_extra.c: In function ‘G_matvect_get_column2’:
la_extra.c:22:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:27:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:32:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘mv_mlt’:
la_extra.c:257:9: warning: assignment from incompatible pointer type [enabled by default]
la_extra.c: In function ‘G_vector_product’:
la_extra.c:396:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:401:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:406:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:411:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:417:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:423:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘G_matrix_read2’:
la_extra.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:480:6: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:486:3: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [OBJ.x86_64-unknown-linux-gnu/la_extra.o] Error 1

Thanks!
dehui


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Regards,
Rashad

Hi,

Could you apply this patch to grass_trunk/include/la.h

I had added it as mentioned here
https://bugs.launchpad.net/ubuntu/+source/gcc-3.4/+bug/61623/comments/3

Markus,
Can you apply this to grass svn?

(attachments)

gmath_la_h.diff (419 Bytes)

···

On Sat, Dec 8, 2012 at 5:20 PM, 王德辉 <dehuiw@gig.ac.cn> wrote:

wdh:~$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/x86_64-linux-gnu/4.7/lto-wrapper
Target: x86_64-linux-gnu
Configured with: …/src/configure -v --with-pkgversion=‘Ubuntu/Linaro 4.7.2-2ubuntu1’ --with-bugurl=file:///usr/share/doc/gcc-4.7/README.Bugs --enable-languages=c,c++,go,fortran,objc,obj-c++ --prefix=/usr --program-suffix=-4.7 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --with-gxx-include-dir=/usr/include/c++/4.7 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-libstdcxx-time=yes --enable-gnu-unique-object --enable-plugin --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_64-linux-gnu
Thread model: posix
gcc version 4.7.2 (Ubuntu/Linaro 4.7.2-2ubuntu1)

在2012-12-08 14:09:41,王德辉dehuiw@gig.ac.cn写道:

what is your gcc version?

post output of gcc -v

gcc 4.x doesnt need g2c.h and HAVEG2C_H remains undefined.

if you are using gcc4.x i can provide you a patch for la.h which will solve the issue for now.

Developers of gmath lib will have more comment on G2C issues

Regards,
Rashad

On Sat, Dec 8, 2012 at 9:34 AM, 王德辉 <dehuiw@gig.ac.cn> wrote:

Hi all!
compilation error in ubuntu12.10 x64
GRASS 7.0.svn (nc_spm_08):/usr/local/grass-addons/grass7/imagery/i.spec.unmix > sudo make MODULE_TOPDIR=/usr/local/grass-7.0.svn
gcc -g -O2 -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -D_FILE_OFFSET_BITS=64 -DPACKAGE="“grassmods”" -I/usr/local/grass-7.0.svn/include -I/usr/local/grass-7.0.svn/include -o OBJ.x86_64-unknown-linux-gnu/la_extra.o -c la_extra.c
In file included from /usr/local/grass-7.0.svn/include/grass/la.h:34:0,
from la_extra.c:12:
/usr/include/g2c.h:21:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:22:1: error: unknown type name ‘__g77_uinteger’
/usr/include/g2c.h:29:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:33:1: error: unknown type name ‘__g77_longint’
/usr/include/g2c.h:34:1: error: unknown type name ‘__g77_ulongint’
/usr/include/g2c.h:55:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:56:1: error: unknown type name ‘__g77_integer’
/usr/include/g2c.h:57:1: error: unknown type name ‘__g77_integer’
la_extra.c: In function ‘G_matvect_get_column2’:
la_extra.c:22:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:27:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:32:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘mv_mlt’:
la_extra.c:257:9: warning: assignment from incompatible pointer type [enabled by default]
la_extra.c: In function ‘G_vector_product’:
la_extra.c:396:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:401:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:406:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:411:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:417:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:423:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c: In function ‘G_matrix_read2’:
la_extra.c:470:2: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:480:6: warning: format not a string literal and no format arguments [-Wformat-security]
la_extra.c:486:3: warning: format not a string literal and no format arguments [-Wformat-security]
make: *** [OBJ.x86_64-unknown-linux-gnu/la_extra.o] Error 1

Thanks!
dehui


grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Regards,
Rashad

On Sat, Dec 8, 2012 at 2:02 PM, Mohammed Rashad
<mohammedrashadkm@gmail.com> wrote:

Hi,

Could you apply this patch to grass_trunk/include/la.h

I had added it as mentioned here
https://bugs.launchpad.net/ubuntu/+source/gcc-3.4/+bug/61623/comments/3

Markus,
Can you apply this to grass svn?

Yes, done in GRASS 7.svn, r54247.

Markus