[GRASS-user] compile grass gdal from svn

Hi to all

I have just build gdal and grass (6.5) from their respective svn sources.

When I start grass, I get this error:

"""
WARNING: Digitization tool is disabled (libgdal1.5.0.so.1: cannot open
shared object file: No such file or directory). Detailed information
in README file.

Traceback (most recent call last):

  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 1642, in <module>

    sys.exit(main())

  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 1635, in main

    app = GMApp(workspaceFile)

  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 1557, in __init__

    wx.App.__init__(self, False)

  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7912, in __init__

    self._BootstrapApp()

  File "/usr/lib/python2.5/site-packages/wx-2.8-gtk2-unicode/wx/_core.py",
line 7487, in _BootstrapApp

    return _core_.PyApp__BootstrapApp(*args, **kwargs)

  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 1573, in OnInit

    workspace = self.workspaceFile)

  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 175, in __init__

    self.NewDisplay(show=False)

  File "/usr/local/grass-6.5.svn/etc/wxpython/wxgui.py", line 1201, in
NewDisplay

    auimgr=self._auimgr, showMapDisplay=show)

  File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/wxgui_utils.py",
line 106, in __init__

    Map=self.Map, auimgr=self.auimgr)

  File "/usr/local/grass-6.5.svn/etc/wxpython/gui_modules/mapdisp.py",
line 259, in __init__

    self.MapWindow.ZoomHistory(self.Map.region['n'],

KeyError: 'n'

"""
I have read README already.

There are not others gdal install in the system: all packages from
official Ubuntu repositories have been completely removed by apt.

It seems wx can't find gdal (libgdal1.5.0.so.1 ): but I compiled gdal
from svn source which version is >=1.6.

I compiled following the script attached (not a true scrip, just a
reminder and same notes about what I'm going to do! If it works it
will be useful). I updated my /etc/ld.so.conf and run ldconfig as
root. I also link grass library into gdal directory and compile
gdal-grass plugin -with-grass=${DIR_INST_GRASS} and
--with-gdal=${DIR_INST_GDAL}/bin/gdal-config.

What's wrong?

--
--
Paolo C.
Lat. 44° 39' 11.08'' N Long. 7° 23' 25.26'' E

(attachments)

compgdalgrass.txt (6.42 KB)

On Thu, 2009-01-29 at 20:11 +0100, Paolo Craveri wrote:

Hi to all

I have just build gdal and grass (6.5) from their respective svn sources.

When I start grass, I get this error:

"""
WARNING: Digitization tool is disabled (libgdal1.5.0.so.1: cannot open
shared object file: No such file or directory). Detailed information
in README file.

[...]

I have read README already.

There are not others gdal install in the system: all packages from
official Ubuntu repositories have been completely removed by apt.

It seems wx can't find gdal (libgdal1.5.0.so.1 ): but I compiled gdal
from svn source which version is >=1.6.

I compiled following the script attached (not a true scrip, just a
reminder and same notes about what I'm going to do! If it works it
will be useful). I updated my /etc/ld.so.conf and run ldconfig as
root. I also link grass library into gdal directory and compile
gdal-grass plugin -with-grass=${DIR_INST_GRASS} and
--with-gdal=${DIR_INST_GDAL}/bin/gdal-config.

What's wrong?

Ciao Paolo!

I don't remember facing this error. Are you 100% you removed libgdal
from Ubuntu repositories?
# sudo apt-get purge libgdal1-1.5.0

Also, "sudo make distclean" before re-compiling?

Maybe try to remove manually everything that "is" GDAL? Here are my
findings looking for GDAL on my machine:

=============================
(1)
/usr/local/bin
/usr/local/bin/gdal-config
/usr/local/bin/gdal2tiles.py
/usr/local/bin/gdal2xyz.py
/usr/local/bin/gdal_contour
/usr/local/bin/gdal_grid
/usr/local/bin/gdal_merge.py
/usr/local/bin/gdal_rasterize
/usr/local/bin/gdal_retile.py
/usr/local/bin/gdal_translate
/usr/local/bin/gdaladdo
/usr/local/bin/gdalchksum.py
/usr/local/bin/gdalenhance
/usr/local/bin/gdalident.py
/usr/local/bin/gdalimport.py
/usr/local/bin/gdalinfo
/usr/local/bin/gdalmanage
/usr/local/bin/gdaltindex
/usr/local/bin/gdaltransform
/usr/local/bin/gdalwarp

(2)
/usr/local/share
/usr/local/share/gdal

(3)
/usr/local/lib
/usr/local/lib/libgdal.a
/usr/local/lib/libgdal.la
/usr/local/lib/libgdal.so
/usr/local/lib/libgdal.so.1
/usr/local/lib/libgdal.so.1.12.3

in /usr/local/include/
/usr/local/include/gdal.h
/usr/local/include/gdal_alg.h
/usr/local/include/gdal_frmts.h
/usr/local/include/gdal_pam.h
/usr/local/include/gdal_priv.h
/usr/local/include/gdal_rat.h
/usr/local/include/gdal_version.h
/usr/local/include/gdal_vrt.h
/usr/local/include/gdalgrid.h
/usr/local/include/gdaljp2metadata.h
/usr/local/include/gdalwarper.h

The "configuration" parameters I use for GRASS (under Ubuntu II 64-bit)
are:

CFLAGS="-g -Wall" LDFLAGS="-s" ./configure \
     --enable-64bit \
     --with-libs=/usr/lib64 \
     --with-cxx \
     --with-freetype=yes \
     --with-freetype-includes="/usr/include/freetype2/" \
     --with-postgres=no \
     --with-sqlite=yes \
     --enable-largefile=yes \
     --with-tcltk-includes="/usr/include/tcl8.4/" \
     --with-freetype-includes=/usr/include/freetype2 \
     --with-opengl-libs=/usr/include/GL \
     --with-readline \
     --with-python=yes \
     --with-proj-share=/usr/local/share/proj/ \
     --with-wxwidgets \
     --with-cairo \
     --with-ffmpeg=yes --with-ffmpeg-includes="/usr/include/ffmpeg/"

Kind regards, Nikos

Hi Nikos

2009/1/29 Nikos Alexandris <nikos.alexandris@felis.uni-freiburg.de>:

On Thu, 2009-01-29 at 20:11 +0100, Paolo Craveri wrote:

I don't remember facing this error. Are you 100% you removed libgdal
from Ubuntu repositories?
# sudo apt-get purge libgdal1-1.5.0

"""
sudo apt-get purge libgdal1-1.5.0
[... ]
Il pacchetto libgdal1-1.5.0 non è installato, quindi non è stato rimosso
(=Nothing to remove)
"""

Also, "sudo make distclean" before re-compiling?

Yes

Maybe try to remove manually everything that "is" GDAL?

e.g.:
locate gdal-config
/usr/local/gdal/bin/gdal-config
/usr/local/src/gdal/apps/gdal-config
/usr/local/src/gdal/apps/gdal-config-inst
/usr/local/src/gdal/apps/gdal-config.in
/usr/local/src/gdal/apps/.svn/prop-base/gdal-config.in.svn-base
/usr/local/src/gdal/apps/.svn/text-base/gdal-config.in.svn-base

I find only files compiled from source.

ciao
--
--
Paolo C.
Lat. 44° 39' 11.08'' N Long. 7° 23' 25.26'' E

Hello,
just a guess:
updatedb
locate libgdal
rm located 1.5.so
ldconfig

Maris.

Hi to all

Solved. Probably the problem came from:
1)an incorrect build of gdal-grass plugin (--with-ld-shared="g++
-shared" seems necessary (but I haven't enough knowledge to evaluate
this); anyways, thanks Markus for
http://mpa.itc.it/markus/useful/conf_install_gdal_ogr_grass_plugin.sh).
2)No clean system (sudo updatedb...and clean! thanks Maris Nartiss);

I post here my simple script-reminder, perhaps useful to others Ubuntu
end-users in panic/paranoia.

ciao

--
Paolo C.
Lat. 44° 39' 11.08'' N Long. 7° 23' 25.26'' E

(attachments)

compgdalgrass.txt (6.85 KB)