[geos-devel] Undefine references in libgeos_c 2.2.3

Mateusz Loskot mateusz at loskot.net
Mon Jul 10 09:13:05 EDT 2006


strk at refractions.net wrote:
> On Mon, Jul 10, 2006 at 12:31:15PM +0200, Mateusz Loskot wrote:
>> strk at refractions.net wrote:
> ...
>>> One problem might be that libgeos_c.so *knows* which version
>>> of libgeos.so to link against, while manual link could pick up
>>> a wrong one (ie: manual -lgeos would link against 3.0.0 while
>>> libgeos_c.so from 2.2.3 needs to use libgeos.so from 2.2.3!)
>> I don't suppose this is the problem.
>> I have cleaned all old geos include/lib files from my system before
>> I attempted to test GDAL + GEOS 2.2.3.
> 
> Did it work with *any* other 2.2.x release ? 
> Does it work with head ?

Yes, but the problem is not related with GEOS version (between 2.2.0 <->
3.0.0).
I mean, I work with GDAL CVS + GEOS CVS for long time without any
problems, but... I build GDAL without libtool enabled
And THAT seems to be the problem.
I've tested it now.

I did build GEOS 2.2.3:

$ ./configure
$ make
$ sudo make install

$ geos-config --version
2.2.3

Next, I built GDAL but using --without-libtool option:

$ ./configure --without-libtool --with-geos=yes
$ make
$ sudo make install

Everything works well, no errors about undefined refereces, GDAL is
linked with GEOS 2.2.3:

mloskot:~$ ldd /home/mloskot/usr/lib/libgdal.so
        linux-gate.so.1 =>  (0xffffe000)
        libgeos.so.2 => /usr/local/lib/libgeos.so.2 (0xb79e5000)
        libgeos_c.so.1 => /usr/local/lib/libgeos_c.so.1 (0xb79d7000)
        ...

The QUESTION is where is the problem with libtool, between GDAL and
GEOS? It seems that libtool for GDAL is not able to link it with GEOS
properly.
Any ideas?

I'll write about it to gdal-dev list too.

> What does `ldd path/to/libgeos_c.so` returns ?
> What does `nm path/to/the/linked/libgeos.so | grep <your_undefined_syms>` ?

Both, GEOS 2.2.2 and 2.2.3 includes all symbols reported by GDAL as
missing. So, there is everything fine with GEOS.

Cheers
-- 
Mateusz Loskot
http://mateusz.loskot.net



More information about the geos-devel mailing list