[Gdal-dev] GRASS/GDAL plugin - floating point exception

Markus Neteler neteler at itc.it
Thu Mar 10 17:03:41 EST 2005


Frank,

sorry to bother you again: after recompiling GRASS 6.1-CVS (yes, we
published GRASS 6.0.0 today) from scratch (no library changes!)
and a fresh GDAL from scratch, I again face new problems to use
the gdal_GRASS.so. When I remove the plugin, everything runs well,
when I compile/install the plugin, I get a Floating point exception.

In details:

# cleanup of /usr/local/lib/ from links to GRASS libraries.
# Then:

gdalinfo
ERROR 1: libgrass_I.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_I.so: cannot open shared object file: No such file or directory
Usage: gdalinfo [--help-general] [-mm] [-nogcp] [-nomd] datasetname
# -> GDAL works, but plugin not activated.
# ... which is no surprise, so I re-add some links to the GRASS libs:
cd /usr/local/lib
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_*.so .
# only keep the general libs without version number:
rm -f libgrass_*6*

# test:
ldd libgrass_gproj.so
        linux-gate.so.1 =>  (0xffffe000)
        libgrass_gis.so => /usr/local/lib/libgrass_gis.so (0x40020000)
        libgrass_datetime.so => /usr/local/lib/libgrass_datetime.so (0x400a6000)
        libz.so.1 => /lib/libz.so.1 (0x400ae000)
        libproj.so.0 => /usr/local/lib/libproj.so.0 (0x400bf000)
        libgdal.so.1 => /usr/local/lib/libgdal.so.1 (0x400f4000)
        libc.so.6 => /lib/tls/libc.so.6 (0x4059a000)
        ...

# looks ok, but:

gdalinfo
Floating point exception


# reducing the links to GRASS libraries to a minimum:
rm -f libgrass_*
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_I.so
gdalinfo
ERROR 1: libgrass_vask.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_vask.so: cannot open shared object file: No such file or directory
Usage: gdalinfo [--help-general] [-mm] [-nogcp] [-nomd] datasetname

# no surprise, so I link the minimum requirements:
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_vask.so
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_gmath.so
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_gis.so
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_datetime.so
ln -s /home/neteler/grass60/dist.i686-pc-linux-gnu/lib/libgrass_I.so

# again crash:
gdalinfo
Floating point exception


## now debugging:
gdb gdalinfo
GNU gdb 6.0-2mdk (Mandrake Linux)
(gdb) r
Starting program: /var/local/bin/gdalinfo

Program received signal SIGFPE, Arithmetic exception.
0x40009888 in _dl_allocate_static_tls (map=Variable "map" is not available.
) at dl-reloc.c:72
72      dl-reloc.c: No such file or directory.
        in dl-reloc.c
(gdb) bt
#0  0x40009888 in _dl_allocate_static_tls (map=Variable "map" is not available.
) at dl-reloc.c:72
#1  0x4000b5e4 in _dl_relocate_object (l=0x804d760, scope=0x804d8fc, lazy=1,
    consider_profiling=0) at dl-reloc.c:178
#2  0x408081dd in _dl_open () from /lib/tls/libc.so.6
#3  0x4000cb88 in _dl_catch_error (objname=Variable "objname" is not available.
) at dl-error.c:162
#4  0x40807e0f in _dl_open () from /lib/tls/libc.so.6
#5  0x4055d011 in dlopen () from /lib/libdl.so.2
#6  0x4000cb88 in _dl_catch_error (objname=Variable "objname" is not available.
) at dl-error.c:162
#7  0x4055d425 in dlerror () from /lib/libdl.so.2
#8  0x4055cfc3 in dlopen () from /lib/libdl.so.2
#9  0x4020ac9e in CPLGetSymbol (
    pszLibrary=0x40455080 "/usr/local/lib/gdalplugins/gdal_GRASS.so",
    pszSymbolName=0x804c0e0 "GDALRegister_GRASS") at cplgetsymbol.cpp:133
#10 0x401fe6de in GDALDriverManager::AutoLoadDrivers() ()
   from /usr/local/lib/libgdal.so.1
#11 0x400fe160 in GDALAllRegister () from /usr/local/lib/libgdal.so.1
#12 0x080497f9 in main (argc=1, argv=0xbffff604) at gdalinfo.c:178

ldd /usr/local/lib/gdalplugins/gdal_GRASS.so
        linux-gate.so.1 =>  (0xffffe000)
        libgrass_I.so => /usr/local/lib/libgrass_I.so (0x40020000)
        libgrass_vask.so => /usr/local/lib/libgrass_vask.so (0x40030000)
        libgrass_gmath.so => /usr/local/lib/libgrass_gmath.so (0x40036000)
       ...

This is a bit mysterious for me since it was working recently.
Have there been relevant changes in GDAL-CVS during the last 48h? 

Best regards

 Markus




More information about the Gdal-dev mailing list