3

When I run ./configure --with-grass=/usr/local/grass-6.5.svn/ I get the following errors:

..........
checking for gdal-config... /usr/bin/gdal-config
using /usr/lib/gdalplugins as GDAL shared library autoload directory
checking for G_asprintf in -lgrass_gis... 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?

Also if I use --with-grass=/usr/local/grass-6.5.svn, I get the following error:

checking for gdal-config... /usr/bin/gdal-config
using /usr/lib/gdalplugins as GDAL shared library autoload directory
checking for G_asprintf in -lgrass_gis... 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?

I have created a grass.conf as instructed elsewhere inside /etc/ld.so.conf.d/ and have added following lines in it:

/usr/local/lib
/usr/local/grass-6.5.svn/lib

I ran sudo ldconfig after that too.

I came across a similar issue posted in the GRASS-Dev mailing list. As an answer it was instructed to: 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 html. 

I ran,

cd /usr/local/grass-6.5.svn/lib
ln -s $file ${file%.6.5.svn.so}.so

It made no difference to the errors. Did I make any mistake? What do I need to do?

3

GDAL and GRASS are not necessarily circular dependent when using the GRASS-GDAL plugin. In short: Compile GDAL without GRASS support, compile GRASS (needs GDAL), then compile the GRASS-GDAL plugin.

Above problem was a temporary mess which has been fixed since then: See http://trac.osgeo.org/grass/changeset/46104

Solution for Chethan S.: either get GRASS 6.4 from current SVN (or weekly source snapshot) or wait for 6.4.2 which will have the fix.

Note that the fix is yet lacking in 6.5, it should be done shortly.

  • For the record: one hour ago also in GRASS 6.5.svn unversioned lib names have been re-enabled. Hence compilation should work again. – markusN May 3 '11 at 14:16
2

GDAL and GRASS are circular dependencies, there are specific instructions on the GRASS-GDAL wiki page. You also have a trailing slash in --with-grass, it should just be --with-grass=/usr/local/grass-6.5.svn. If this doesn't work, report the specific error encountered in the configure.log

  • If I remove the trailing slash, I get similar error. I have added the error I get in my question now. – Chethan S. May 2 '11 at 12:14
  • Just to avoid mis-information, as stated above by markusN, GDAl and GRASS are not (necessarily) circular dependent. – Nikos Alexandris Feb 17 '15 at 18:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.