[GRASSLIST:309] Compiling gdal with grass support: need help on '--with-grass=' p ointer

Following Dylan's tutorial (http://169.237.35.250/~dylan/grass_user_group/)
on getting Grass cvs installed, I got surprisingly far before running into a
compile error:

Downloaded latest cvs from repository into /usr/local
compiled gdal --without-grass, no problems (used the script on Dylan's site)
./configure for grass cvs, all dependencies met:

./configure --with-png=internal --with-jpeg=internal \
  --with-gif=internal --with-libtiff=internal \
  --with-geotiff=internal --with-libz=internal\
  --without-pg --without-ogdi --with-python \
  --with-threads=yes --without-grass \
        --enable-largefile

make
make install
ldconfig

And no problems. Now I'm trying to configure gdal with grass support, again,
using the script provided on Dylan's site:

./configure --with-png=internal --with-jpeg=internal \
--with-gif=internal --with-libtiff=internal \
--with-geotiff=internal --with-libz=internal\
--without-pg --without-ogdi --with-python \
--with-threads=yes --with-grass=/usr/local/grass6/

and received error message:

configure: error: --with-grass=/usr/local/grass6/ requested, but libraries
not found!

So where should the '--with-grass' flag be pointing to? I've read
conflicting information on the archives that the path inserted for this flag
should be everything from the binary
(/usr/local/grass6/bin.i686-pc-linux-gnu/grass61) to a symlink in /usr/lib
that points to grass libs somewhere else.

I'm able to run grass-cvs normally, except of course I can't use r.*.gdal,
but everything else seems fine so far.

~ Eric.

Eric,

  When you compile GRASS, are you sure it's picking up on you local
installation of GDAL? Try explicitly setting
--with-gdal=/usr/local/bin/gdal-config

Also, instead of recompiling GDAL, I think the prefered method is to
use the GDAL-GRASS plugin. It's fairly simple once you have gdal and
grass installed, though I think it only works for recent (> 1.3.1 )
versions of gdal:

==========
wget "http://www.gdal.org/dl/gdal-grass-1.3.1.2.tar.gz"
tar -xzvf gdal-grass-1.3.1.2.tar.gz
cd gdal-grass-1.3.1/
./configure --with-gdal=/usr/local/bin/gdal-config
--with-grass=/usr/local/grass-6.1.cvs

- matt

On 3/22/06, Patton, Eric <epatton@nrcan.gc.ca> wrote:

Following Dylan's tutorial (http://169.237.35.250/~dylan/grass_user_group/)
on getting Grass cvs installed, I got surprisingly far before running into a
compile error:

Downloaded latest cvs from repository into /usr/local
compiled gdal --without-grass, no problems (used the script on Dylan's site)
./configure for grass cvs, all dependencies met:

./configure --with-png=internal --with-jpeg=internal \
        --with-gif=internal --with-libtiff=internal \
        --with-geotiff=internal --with-libz=internal\
        --without-pg --without-ogdi --with-python \
        --with-threads=yes --without-grass \
        --enable-largefile

make
make install
ldconfig

And no problems. Now I'm trying to configure gdal with grass support, again,
using the script provided on Dylan's site:

./configure --with-png=internal --with-jpeg=internal \
--with-gif=internal --with-libtiff=internal \
--with-geotiff=internal --with-libz=internal\
--without-pg --without-ogdi --with-python \
--with-threads=yes --with-grass=/usr/local/grass6/

and received error message:

configure: error: --with-grass=/usr/local/grass6/ requested, but libraries
not found!

So where should the '--with-grass' flag be pointing to? I've read
conflicting information on the archives that the path inserted for this flag
should be everything from the binary
(/usr/local/grass6/bin.i686-pc-linux-gnu/grass61) to a symlink in /usr/lib
that points to grass libs somewhere else.

I'm able to run grass-cvs normally, except of course I can't use r.*.gdal,
but everything else seems fine so far.

~ Eric.

--
Matt Perry
perrygeo@gmail.com
http://www.perrygeo.net

Patton, Eric wrote:

And no problems. Now I'm trying to configure gdal with grass support, again,
using the script provided on Dylan's site:

./configure --with-png=internal --with-jpeg=internal \
--with-gif=internal --with-libtiff=internal \
--with-geotiff=internal --with-libz=internal\
--without-pg --without-ogdi --with-python \
--with-threads=yes --with-grass=/usr/local/grass6/

and received error message:

configure: error: --with-grass=/usr/local/grass6/ requested, but libraries
not found!

So where should the '--with-grass' flag be pointing to? I've read
conflicting information on the archives that the path inserted for this flag
should be everything from the binary
(/usr/local/grass6/bin.i686-pc-linux-gnu/grass61) to a symlink in /usr/lib
that points to grass libs somewhere else.

Look at GDAL's config.log file for error messages; that should provide
some clues as to exactly what went wrong.

Error messages which configure scripts show to the user are often
misleading; e.g. "X not found" usually means "a test program which
tried to use X failed for some reason.

One potential issue is that the most recent versions of GRASS install
their headers in $GISBASE/include/grass/*.h, but GDAL expects to find
the headers as <grass dir>/include/*.h and won't let you specify a
specific path. If that is the problem, you will need to populate
$GISBASE/include with symlinks, e.g.

  cd $GISBASE/include
  ln -s grass/*.h .

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

Eric,

Ahh.. I might need to update this, or take it down to point to some newer
directions. Sorry about any mis-information that this page might have
dispensed.

Cheers,

Dylan

On Wednesday 22 March 2006 04:52 am, Patton, Eric wrote:

Following Dylan's tutorial (http://169.237.35.250/~dylan/grass_user_group/)
on getting Grass cvs installed, I got surprisingly far before running into
a compile error:

Downloaded latest cvs from repository into /usr/local
compiled gdal --without-grass, no problems (used the script on Dylan's
site) ./configure for grass cvs, all dependencies met:

./configure --with-png=internal --with-jpeg=internal \
  --with-gif=internal --with-libtiff=internal \
  --with-geotiff=internal --with-libz=internal\
  --without-pg --without-ogdi --with-python \
  --with-threads=yes --without-grass \
        --enable-largefile

make
make install
ldconfig

And no problems. Now I'm trying to configure gdal with grass support,
again, using the script provided on Dylan's site:

./configure --with-png=internal --with-jpeg=internal \
--with-gif=internal --with-libtiff=internal \
--with-geotiff=internal --with-libz=internal\
--without-pg --without-ogdi --with-python \
--with-threads=yes --with-grass=/usr/local/grass6/

and received error message:

configure: error: --with-grass=/usr/local/grass6/ requested, but libraries
not found!

So where should the '--with-grass' flag be pointing to? I've read
conflicting information on the archives that the path inserted for this
flag should be everything from the binary
(/usr/local/grass6/bin.i686-pc-linux-gnu/grass61) to a symlink in /usr/lib
that points to grass libs somewhere else.

I'm able to run grass-cvs normally, except of course I can't use r.*.gdal,
but everything else seems fine so far.

~ Eric.

--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341