[GRASS-user] Compilation error with i.atcorr

Hi

I am receiving a compilation error with the i.atcorr module:

/usr/local/src/grass6_devel/imagery/i.atcorr$ make
Makefile:15: warning: overriding commands for target
`/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/bin/i.atcorr'
../../include/Make/Module.make:15: warning: ignoring old commands for
target `/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/bin/i.atcorr'
c++ -I/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/include -g
-O2 -mtune=native -march=native -DPACKAGE=\""grassmods"\"
-I/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.cpp
main.cpp:181: error: size of array ‘tic’ is too large
main.cpp: In member function ‘TIMap::Position TIMap::search(float, float)’:
main.cpp:200: error: ‘tic’ was not declared in this scope
main.cpp: In member function ‘TransformInput TIMap::get(TIMap::Position)’:
main.cpp:206: error: ‘tic’ was not declared in this scope
main.cpp: In member function ‘void TIMap::add(TransformInput, float, float)’:
main.cpp:209: error: ‘tic’ was not declared in this scope
main.cpp: In function ‘Options define_options()’:
main.cpp:469: warning: deprecated conversion from string constant to ‘char*’
main.cpp:476: warning: deprecated conversion from string constant to ‘char*’
main.cpp:498: warning: deprecated conversion from string constant to ‘char*’
make: *** [OBJ.i686-pc-linux-gnu/main.o] Error 1

main.cpp in line 176 has: MAX_TICs = 8192. If I change this to:
MAX_TICs = 3072, the code compiles.

The maximum stack size on my machine seems fine:
$ ulimit -s
8192

Any ideas why I'm having trouble compiling i.atcorr?

Regards

Craig

grass 6.5 r37242
ubuntu 9.04
gcc 4.3
CXXFLAGS="-g -O2 -mtune=native -march=native"

Craig,

On Sat, May 16, 2009 at 11:19 AM, Craig Leat <craig.leat@gmail.com> wrote:

Hi

I am receiving a compilation error with the i.atcorr module:

/usr/local/src/grass6_devel/imagery/i.atcorr$ make
Makefile:15: warning: overriding commands for target
`/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/bin/i.atcorr'
../../include/Make/Module.make:15: warning: ignoring old commands for
target `/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/bin/i.atcorr'
c++ -I/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/include -g
-O2 -mtune=native -march=native -DPACKAGE=\""grassmods"\"
-I/usr/local/src/grass6_devel/dist.i686-pc-linux-gnu/include -o
OBJ.i686-pc-linux-gnu/main.o -c main.cpp
main.cpp:181: error: size of array ‘tic’ is too large

the problem is fixed: the recently increased cache did not fit
on 32bit CPUs but only on 64bit. Now it is reduced to
4096 and it compiles again on 32bit, too.

TODO: implement dynamically allocated arrays in the cache.

Best
Markus

Hi Markus

Craig Leat:

I am receiving a compilation error with the i.atcorr module

Markus Neteler:

the problem is fixed: the recently increased cache did not fit
on 32bit CPUs but only on 64bit. Now it is reduced to
4096 and it compiles again on 32bit, too.

Great to hear you tracked this one down quickly.

Thanks

Craig