Opened 16 years ago

Closed 16 years ago

#361 closed defect (duplicate)

v.mkgrid - segmentation fault

Reported by: paoloC Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: svn-develbranch6
Keywords: Cc:
CPU: x86-32 Platform: Linux

Description

If I compile (configure) grass6.4 svn with this: CFLAGS="-O2 -march=pentium-m -Wall" LDFLAGS="-s" ./configure ...

I get a "segmentation fault" message: v.mkgrid map=pp grid=12,12 position=region --o Segmentation fault

No error if I compile (configure) with this: CFLAGS="-ggdb -Wall -Werror-implicit-function-declaration" ./configure ....

Change History (7)

comment:1 by neteler, 16 years ago

What is the gcc version (gcc -v)? There seems to be a problem with the optimization.

Markus

comment:2 by paoloC, 16 years ago

paolo@gis-laptop:~$ gcc -v Using built-in specs. Target: i486-linux-gnu Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.3.2-1ubuntu11' --with-bugurl=file:///usr/share/doc/gcc-4.3/README.Bugs --enable-languages=c,c++,fortran,objc,obj-c++ --prefix=/usr --enable-shared --with-system-zlib --libexecdir=/usr/lib --without-included-gettext --enable-threads=posix --enable-nls --with-gxx-include-dir=/usr/include/c++/4.3 --program-suffix=-4.3 --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --enable-mpfr --enable-targets=all --enable-checking=release --build=i486-linux-gnu --host=i486-linux-gnu --target=i486-linux-gnu Thread model: posix gcc version 4.3.2 (Ubuntu 4.3.2-1ubuntu11)

Paolo

comment:3 by marisn, 16 years ago

Paolo, can You, please, compile v.mkgrid with also "-g" flag and then run it in gdb. Also provide region information.

in reply to:  3 comment:4 by paoloC, 16 years ago

Replying to marisn:

Paolo, can You, please, compile v.mkgrid with also "-g" flag and then run it in gdb. Also provide region information.

If I compile with this: CFLAGS="-O2 -march=pentium-m -Wall -g" ./configure ...

gdb which v.mkgrid

... (gdb) run myvectgrid position=region grid=12,12 box=1,1 --o

Starting program: /usr/local/grass-6.4.svn/bin/v.mkgrid myvectgrid position=region grid=12,12 box=1,1 --o

[Thread debugging using libthread_db enabled]

warning: Lowest section in /usr/lib/libicudata.so.38 is .hash at 000000d4

WARNING: 'box' option ignored with 'position=region'

[New Thread 0xb59c1940 (LWP 8329)]

0%

Program received signal SIGSEGV, Segmentation fault.

[Switching to Thread 0xb59c1940 (LWP 8329)]

0xb799cd4b in sincos () from /usr/lib/libgdal1.5.0.so.1

Location is a simple xy loc: g.region -p

projection: 0 (x,y) zone: 0 north: 12 south: 0 west: 0 east: 12 nsres: 1 ewres: 1 rows: 12 cols: 12 cells: 144

I hope this will be useful.

Paolo

comment:5 by glynn, 16 years ago

This is a known issue with GDAL:

http://trac.osgeo.org/gdal/ticket/2497

comment:6 by msieczka, 16 years ago

Paolo,

What GDAL version do you use? If you use GDAL 1.5.2 + SVN r14997 or greater is the problem gone? I suggest to close the ticket then.

comment:7 by paoloC, 16 years ago

Resolution: duplicate
Status: newclosed

Sorry. Of course, ticket must be close. Many thanks.

Note: See TracTickets for help on using tickets.