[GRASS-dev] gdal-grass plugin fails during ./configure with GRASS 6.3 CVS

Hi,

With current GRASS 6.3 CVS gdal-grass 1.3.1.2 and 1.3.2 fail during
configure:

$ ./configure --with-grass=/usr/local/grass-6.3.cvs/
[...]
checking for 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
configure: error: --with-grass=/usr/local/grass-6.3.cvs/ requested, but
libraries not found! Perhaps you need to set LD_LIBRARY_PATH to
include /usr/local/grass-6.3.cvs//lib?

GRASS is installed /usr/local/grass-6.3.cvs/, the
/usr/local/grass-6.3.cvs/lib is present in the /etc/ld.so.conf and I
remembered to run ldconfig.

Did something change in GRASS between 6.2 and 6.3, or in GDAL, that
gdal-grass plugin won't build with GRASS 6.3? Both gdal-grass versions
configure fine with GRASS 6.2.2 (CVS 23.12.2006).

Using GDAL 1.4 CVS 25.12.2006.

Any hints appreciated!

Thanks.

Maciek

You probably need to check config.log to see what the actual error is.

But as a sidenote, in some circumstances G_asprintf is/was/will be implemented as a macro (replaced by a call to the system asprintf()) and not a function in libgrass_gis.so, so it is not a very good choice as a typical GRASS function to test for in the configure script. Perhaps G_gisinit() would be better, or some function that the GDAL GRASS plugin directly uses.

Paul

On Mon, 1 Jan 2007, Maciej Sieczka wrote:

Hi,

With current GRASS 6.3 CVS gdal-grass 1.3.1.2 and 1.3.2 fail during
configure:

$ ./configure --with-grass=/usr/local/grass-6.3.cvs/
[...]
checking for 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
configure: error: --with-grass=/usr/local/grass-6.3.cvs/ requested, but
libraries not found! Perhaps you need to set LD_LIBRARY_PATH to
include /usr/local/grass-6.3.cvs//lib?

GRASS is installed /usr/local/grass-6.3.cvs/, the
/usr/local/grass-6.3.cvs/lib is present in the /etc/ld.so.conf and I
remembered to run ldconfig.

Did something change in GRASS between 6.2 and 6.3, or in GDAL, that
gdal-grass plugin won't build with GRASS 6.3? Both gdal-grass versions
configure fine with GRASS 6.2.2 (CVS 23.12.2006).

Using GDAL 1.4 CVS 25.12.2006.

Any hints appreciated!

Thanks.

Maciek

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Paul Kelly wrote:

You probably need to check config.log to see what the actual error is.

Tried that but no enlightment. I'm attaching it if anybody would like
to have a look.

Cheers,
Maciek

(attachments)

config.log.bz2 (3.42 KB)

Hello Maciek

On Mon, 1 Jan 2007, Maciej Sieczka wrote:

Paul Kelly wrote:

You probably need to check config.log to see what the actual error is.

Tried that but no enlightment. I'm attaching it if anybody would like
to have a look.

Here is the relevant output:

configure:2840: found /usr/local/bin/gdal-config
configure:2853: result: /usr/local/bin/gdal-config
configure:2912: result: using /usr/local/lib/gdalplugins as GDAL shared library
autoload directory
configure:2939: checking for G_asprintf in -lgrass_gis
configure:2969: gcc -o conftest -O2 conftest.c -lgrass_gis -L/usr/local/grass
-6.3.cvs/lib -lgrass_I -lgrass_vask -lgrass_gmath -lgrass_gis -lgrass_datetime -
lgrass_gproj -lgrass_vect -lgrass_dbmibase -lgrass_dbmiclient -lgrass_dgl -lgras
s_dig2 -lgrass_rtree -lgrass_linkm -L/usr/local/lib -lgdal >&5
/usr/local/lib/libgeos_c.so.1: undefined reference to `geos::WKBReader::read(std
::basic_istream<char, std::char_traits<char> >&)'
/usr/local/lib/libgeos_c.so.1: undefined reference to `geos::WKBWriter::write(ge
os::Geometry const&, std::basic_ostream<char, std::char_traits<char> >&)'
/usr/local/lib/libgeos_c.so.1: undefined reference to `geos::Point::getCoordinat
esRO() const'
/usr/local/lib/libgeos_c.so.1: undefined reference to `geos::WKBWriter::WKBWrite
r(int, int)'
collect2: ld returned 1 exit status

So the problem is something to do with geos. What has changed appears to be something to do with GDAL now depending on GEOS in some way?

This e-mail from Glynn may be related:
http://grass.itc.it/pipermail/grass-dev/2006-November/027546.html

Hope this is some help. GDAL and Geos-related stuff has started coming up a bit in the last month or two so it looks like something is perhaps not right somewhere but I don't know what needs fixed exactly.

Paul

Hi,

For thread completeness:

The reason for gdal-grass 1.3.2 failing at ./configure was two
instances of GEOS installed. After removing one conflicting instalation
the configure and build went smooth.

More details:

http://www.nabble.com/Re%3A--Gdal-dev--GDAL-OGR-1.4.0-Released-tf3027971.html#a8412512

Thanks to Paul and Markus for help!

Maciek