[postgis-users] Re: ver 1.1.5 configure fails on Ubuntu

strk at refractions.net strk at refractions.net
Fri Nov 10 08:09:38 PST 2006


On Fri, Nov 10, 2006 at 10:35:34AM -0500, Greg Troxel wrote:
> Thanks.   Here's the workaround I have in place, which works fine.
> Plus, shouldn't that be -L${libdir} in your patch?
> 
> (This patch is applied to postgis sources before building.)
> 
> $NetBSD: patch-aa,v 1.1 2006/09/20 16:24:46 gdt Exp $
> 
> --- configure.orig	2006-07-01 00:53:02.000000000 -0400
> +++ configure
> @@ -3735,7 +3735,7 @@ fi;
>  
>  if test $USE_GEOS -gt 0; then
>  	GEOS_DIR=`$GEOSCONFIG --prefix`
> -	GEOS_LDFLAGS=`$GEOSCONFIG --ldflags`
> +	GEOS_LDFLAGS=`$GEOSCONFIG --libs`
>  	GEOS_MAJOR=`$GEOSCONFIG --version | cut -d. -f1`
>  	if test "$GEOS_MAJOR" = "@GEOS_VERSION@"; then
>  		GEOS_MAJOR=1

--ldflags was introduced because dos not include -lgeos, so it
is usable to link against the C-API lib instead (-lgeos_c).
--libs will instead always add -lgeos.
So, with your patch, you'll end up with both -lgeos_c and -lgeos.
Not a big deal actually, as libgeos_c.so will link to libgeos.so
anyway, but it might link to a specific version of it instead
of the default one that would be found by -lgeos...
So, I'd recommend to try my patch first, which will be included
in next release.

> This patch (among others not relevant to this issue) is applied to
> geos 2.0.0.  It's kludgy, but it gets -Wl,-R/usr/pkg/lib added like it
> should be.

mmm... I'm not sure we want to force that -rpath...

> $NetBSD: patch-ae,v 1.1 2006/09/20 16:01:48 gdt Exp $
> 
> --- tools/geos-config.in.orig	2004-07-17 05:07:17.000000000 -0400
> +++ tools/geos-config.in
> @@ -34,7 +34,7 @@ case $1 in
>      echo @CFLAGS@ -I at prefix@/include 
>        ;;
>      --libs)
> -      echo -L at prefix@/lib -lgeos
> +      echo -L at prefix@/lib @LDFLAGS@ -lgeos
>        ;;
>      --includes)
>        echo @prefix@/include
> 
> 
> So perhaps postgis should require a newer version of geos.  When did
> -ldflags get added?  I see 2.2.3 has it.  (I'm currently building
> 2.2.3 with an uncommitted pkgsrc update, as that seems safer than
> 3.0.0rc right now.)

Postgis should work back to against GEOS-1.0.0, and I belive it still
does, and I'm also proud of it ;)

--strk;



More information about the postgis-users mailing list