Opened 11 years ago

Closed 11 years ago

#367 closed defect (fixed)

g.region segmentation violation when creating EPSG:4326 location

Reported by: epatton Owned by: grass-dev@…
Priority: major Milestone: 6.4.0
Component: Default Version: svn-develbranch6
Keywords: g.region, segmentation fault Cc:
CPU: x86-64 Platform: Linux

Description

I'm having problems creating a new EPSG:4326 location (latlong, WGS84). This is from a fresh 'make distclean' of Grass 6.4.

When trying to create a Lat-Long WGS84 location, gis.m aborts as the GIS Manager and Map DIsplay windows are being created, with the following error:

Error in startup script: can't read "monitor_zooms(1,1,n)": no such variable
    while executing
"lappend region $monitor_zooms($mon,1,$attr)"
    (procedure "MapCanvas::currentzoom" line 15)
    invoked from within
"MapCanvas::currentzoom $mon"
    (procedure "MapCanvas::coordconv" line 23)
    invoked from within
"MapCanvas::coordconv $mon"
    (procedure "MapCanvas::create" line 68)
    invoked from within
"MapCanvas::create"
    (procedure "Gm::startmon" line 11)
    invoked from within
"Gm::startmon"
    (procedure "Gm::create" line 79)
    invoked from within
"Gm::create"
    (procedure "main" line 30)
    invoked from within
"main $argc $argv"
    (file "/usr/local/grass-6.4.svn/etc/gm/gm.tcl" line 566)

Here's g.proj output:

g.proj -p
-PROJ_INFO-------------------------------------------------
name       : Lat/Lon
proj       : ll
datum      : wgs84
ellps      : wgs84
no_defs    : defined
-PROJ_UNITS------------------------------------------------
unit       : degree
units      : degrees
meters     : 1.0

I am able to enter this newly-created Grass location in text mode. Running "g.region -p" from the command line gives "segmentation fault".

I only have these errors when trying to create or use a Lat-Long, WGS84 location. My UTM locations seem to be fine.

I've checked that my epsg file is in the correct location where Grass expects it to be (/usr/share/proj/epsg).

Any ideas?

~ Eric.

Change History (3)

comment:1 Changed 11 years ago by marisn

Running "g.region -p" from the command line gives "segmentation fault"

is the real root of problem. Let me guess - Ubuntu? Install newer GDAL version and then svn up && make distclean && make Otherwise - gdb g.region; run; bt.

comment:2 Changed 11 years ago by epatton

Thanks. I've removed the Ubuntu versions of geos, proj and gdal, and compiled each of those from source. No errors during configure or make for any of them.

Grass configure proceeds fine, and I can confirm that proj and gdal are installed. I get a ton of make errors, with about 30 modules failing. The first in the error.log is /usr/local/grass6_devel/lib/proj; here's the error I get when I change to this directory and run make clean and then 'make':

/usr/bin/ld: /usr/local/lib/libgdal.a(cpl_conv.o): relocation R_X86_64_32S against `std::basic_string<char, std::char_traits<char>, std::allocator<char> >::_Rep::_S_empty_rep_storage' can not be used when making a shared object; recompile with -fPIC
/usr/local/lib/libgdal.a: could not read symbols: Bad value
collect2: ld returned 1 exit status
make: *** [/usr/local/grass6_devel/dist.x86_64-unknown-linux-gnu/lib/libgrass_gproj.6.4.svn.so] Error 1

Here is the Grass configure statement:

CFLAGS="-g -Wall -fPIC" 
./configure  \
--enable-64bit \
--with-libs=/usr/lib64 \
--with-tcltk-includes=/usr/include/tcl8.5 \
--without-postgres \
--with-sqlite \
--with-sqlite-includes=/usr/include \
--with-freetype \
--with-freetype-includes=/usr/include/freetype2 \
--with-readline \
--with-cxx \
--with-gdal \
--with-gdal-includes=/usr/local/include \
--enable-largefile \
--with-proj \
--with-proj-share=/usr/local/share/proj \
--with-proj-lib=/usr/local/lib \
--with-fftw \
--with-fftw-includes=/usr/include \
--with-fftw-libs=/usr/lib \
--with-python \
--with-opengl \
--with-opengl-includes=/usr/include/GL \
--with-python=yes \
--with-python-includes=/usr/bin/ \
--with-wxwidgets=yes \
--with-cairo \

~ Eric.

comment:3 Changed 11 years ago by epatton

Resolution: fixed
Status: newclosed

Solved. I was using a too-new version of gdal, 1.6.0 beta2. I removed this version, and installed 1.5.3 instead. No more errors!

~ Eric.

Note: See TracTickets for help on using tickets.