> any clue how to compile 6.5 with GEOS support? Vlib fails:
What did you feed configure ? It should be something like this:
--with-geos=/usr/bin/geos-config
This works for me with libgeos-3.0.0.
Ah. With geos-2.2.3, the configure checks pass, but the build fails.
The GEOS configure checks should actually do some checking. Apart from
the version issue, there's no LOC_CHECK_LIBS or similar, so the checks
will pass even if the library is entirely absent.
LOC_CHECK_LIBS checks for a specific symbol, so it should be
straightforward to check for a symbol which is only present in 3.x.
On Tue, Jul 28, 2009 at 5:18 PM, Glynn Clements<glynn@gclements.plus.com> wrote:
Moritz Lennert wrote:
> any clue how to compile 6.5 with GEOS support? Vlib fails:
What did you feed configure ? It should be something like this:
--with-geos=/usr/bin/geos-config
This works for me with libgeos-3.0.0.
Ah. With geos-2.2.3, the configure checks pass, but the build fails.
The GEOS configure checks should actually do some checking. Apart from
the version issue, there's no LOC_CHECK_LIBS or similar, so the checks
will pass even if the library is entirely absent.
LOC_CHECK_LIBS checks for a specific symbol, so it should be
straightforward to check for a symbol which is only present in 3.x.
Something like this?
[neteler@localhost grass70]$ svn diff configure.in
Index: configure.in
(still no solution to the original problem:
perhaps my much liked "-Werror-implicit-function-declaration" is the problem?)
Your original problem appears to be that you don't have a compatible
version of GEOS installed. It's compiling okay, so it looks like the
headers are compatible but the library isn't. Maybe a problem with
32-bit and 64-bit libraries?
(still no solution to the original problem:
perhaps my much liked "-Werror-implicit-function-declaration" is the problem?)
Your original problem appears to be that you don't have a compatible
version of GEOS installed. It's compiling okay, so it looks like the
headers are compatible but the library isn't. Maybe a problem with
32-bit and 64-bit libraries?
>> > LOC_CHECK_LIBS checks for a specific symbol, so it should be
>> > straightforward to check for a symbol which is only present in 3.x.
>>
>> Something like this?
>> [neteler@localhost grass70]$ svn diff configure.in
>
>> + LOC_CHECK_LIBS(geos,GEOSGeom_createLinearRing,GEOS,$GEOS_CFLAGS,$GEOS_LIBS,)
>
> Probably:
>
> LOC_CHECK_LIBS(geos,GEOSGeom_createLinearRing,GEOS,$GEOS_LIBS,GEOS_LIBS)
I have submitted that.
Locally it fails for me, according to config.log the following line is missing: #include <geos_c.h>
That line isn't supposed to be there.
If I extract the test manually, it find the function GEOSGeom_createLinearRing()
but complains about:
gcc -o conftest -g -Wall -Werror-implicit-function-declaration
-fno-common -mtune=nocona -m64 -minline-all-stringops
-L/usr/local/lib -lgeos -Wl,--no-undefined -Wl,--export-dynamic
-L/usr/lib64 conftest.c -lgeos
conftest.c:7: error: conflicting types for �GEOSGeom_createLinearRing�
/usr/local/include/geos_c.h:237: error: previous declaration of
�GEOSGeom_createLinearRing� was here
In /usr/local/include/geos_c.h it is
extern GEOSGeometry GEOS_DLL *GEOSGeom_createLinearRing(GEOSCoordSequence* s);
but in conftest.c it is:
char GEOSGeom_createLinearRing();
No idea how to fix the test in configure.in.
Library checks merely check that the function is exported by the
library. The declaration doesn't need to have the correct type, as the
linker doesn't perform any type checking.
Note that the library checks only work with exported functions. They
won't work with macros or inline functions, as those don't exist in
the library.
No. Broken in r38867; fixed (i.e. reverted) in r38872.
Sorry, on my computer is broken now...
GRASS needs GEOS 3.x; the check is supposed to fail on older versions.
geos-config --version
3.1.0
checking for geos-config... /usr/local/bin/geos-config
checking for geos_c.h... yes
checking for GEOSGeom_createLinearRing in -lgeos... no
configure: error: *** Unable to locate GEOS library.
checking for geos-config... /usr/local/bin/geos-config
checking for geos_c.h... yes
checking for GEOSGeom_createLinearRing in -lgeos... no
configure: error: *** Unable to locate GEOS library.
as I mentioned earlier it should check geos_c (i.e. GEOS C API) not geos.