[GRASS-dev] gdal-grass plugin build failed

hi All

tring to rebuild the gdal-grass plugin on my linux (debian sid)
but i'm having this error

epifanio@epybox:/etc/ld.so.conf.d$ cat grass.conf
#/usr/local/grass-7.0.svn/lib
/usr/local/grass-6.5.svn/lib

epifanio@epybox: export LD_LIBRARY_PATH=/usr/local/grass-6.5.svn/lib
epifanio@epybox:/etc/ld.so.conf.d$ sudo ldconfig

epifanio@epybox:/usr/local/src/gis/gdal/frmts/grass/gdal-grass-1.9.0
$ ./configure --with-gdal=/usr/local/bin/gdal-config
--with-grass=/usr/local/grass-6.5.svn
checking for gcc... gcc
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
checking whether we are cross compiling... no
checking for suffix of executables...
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ANSI C... none needed
checking for g++... g++
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking for ranlib... ranlib
checking for g++ -shared ... yes
user supplied gdal-config (/usr/local/bin/gdal-config)
using /usr/local/lib/gdalplugins as GDAL shared library autoload
directory
checking for G_asprintf in -lgrass_gis... no
checking for G_putenv in -lgrass_gis.7.0.svn... no
configure: error: --with-grass=/usr/local/grass-6.5.svn requested, but
libraries not found! Perhaps you need to set LD_LIBRARY_PATH to
include /usr/local/grass-6.5.svn/lib?

have you any clue ? the error happens if i try to build the gdal-grass
plugin using grass 6.5 ... instead using the 7.0 it build fine.

the config.log file contents : http://paste.debian.net/112667/
it can't find lib .. but they exists

thanks for any hints!

Massimo.

Massimo Di Stefano wrote:

tring to rebuild the gdal-grass plugin on my linux (debian sid)
but i'm having this error

checking for G_asprintf in -lgrass_gis... no
checking for G_putenv in -lgrass_gis.7.0.svn... no
configure: error: --with-grass=/usr/local/grass-6.5.svn requested, but
libraries not found! Perhaps you need to set LD_LIBRARY_PATH to
include /usr/local/grass-6.5.svn/lib?

have you any clue ? the error happens if i try to build the gdal-grass
plugin using grass 6.5 ... instead using the 7.0 it build fine.

the config.log file contents : http://paste.debian.net/112667/

  configure:2969: gcc -o conftest -O2 conftest.c -lgrass_gis
  -L/usr/local/grass-6.5.svn/lib -lgrass_I -lgrass_vask -lgrass_gmath
  -lgrass_gis -lgrass_datetime -lgrass_gproj -lgrass_vect
  -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgrass_dig2
  -lgrass_rtree -lgrass_linkm -L/usr/local/lib -lgdal >&5
  /usr/bin/ld: cannot find -lgrass_gis
  /usr/bin/ld: cannot find -lgrass_I
  ...

it can't find lib .. but they exists

The 6.x build system no longer generates the unversioned symlinks,
which the configure script requires.

This has long been the case for the 7.0 build system, but the
gdal-grass configure script explicitly checks for the versioned names
for 7.0.

You could just generate the symlinks yourself, e.g.:

  cd /usr/local/grass-6.5.svn/lib
  for file in libgrass_*.so ; do ln -s $file ${file%.6.5.svn.so}.so ; done

--
Glynn Clements <glynn@gclements.plus.com>