[GRASS-dev] libgeos on debian stable
Glynn Clements
glynn at gclements.plus.com
Tue Nov 21 15:06:59 EST 2006
Hamish wrote:
> > > [debian/stable (sarge)]
> > >
> > > just updated to the latest GRASS 6.3-cvs. libproj didn't complile,
> > > complained about missing -lgeos. this fixed it:
> > >
> > > # ln -s /usr/liblibgeos.so.2.1.1 /usr/lib/libgeos.so
>
> Glynn Clements wrote:
> > That suggests that you need a -dev[el] package.
> >
> > The unversioned symlinks are only needed when compiling, so they are
> > normally only included in development packages.
> >
> > > is this something new? The only thing that changed recently on my
> > > machine was I moved libgdal temporarily out the way to test startup
> > > errors.
> > >
> > > or was it a recent change somewhere else?
> >
> > I'm fairly sure it's a GDAL thing. If GDAL was built with --with-geos,
> > -lgeos will probably appear in the output of "gdal-config --dep-libs".
>
>
> $ apt-file search /usr/lib/libgeos.so
> libgeos-dev: usr/lib/libgeos.so
> libgeos2: usr/lib/libgeos.so.2
> libgeos2: usr/lib/libgeos.so.2.1.1
>
> $ dpkg -s libgeos-dev
> Package `libgeos-dev' is not installed and no info is available.
>
> $ gdal-config --dep-libs
> -L/usr/lib -lgeos -lodbc -L/usr/lib -lxerces-c -lpthread -ljasper -lmfhdf -ldf -lgif -ljpeg -ltiff -lpng -lnetcdf -lcfitsio -L/usr/lib -lpq -lz -lpthread -lm -lrt -ldl
>
> $ dpkg -s libgdal1-1.3.1 | grep Version
> Version: 1.3.1-0.dgis.stable.2
> (this hasn't changed since March)
> http://pkg-grass.alioth.debian.org/debian-gis/pool/g/gdal/
>
> I am wondering what changed in the GRASS source so now we need geos devel
> packages as well?
Nothing changed in GRASS; it's GDAL that appears to have changed.
configure.in has:
GDAL_DEP_LIBS=`"$GDAL_CONFIG" --dep-libs`
...
GDAL_LIBS="$GDAL_LIBS $GDAL_DEP_LIBS"
So GRASS needs whatever gdal-config claims to need.
If GDAL is a shared library with dependency information, you don't
actually *need* those switches to link against GDAL, but we have no
way of knowing that gdal-config is lying.
OTOH, if GDAL is a static library, or a shared library which lacks
that information, we do need those switches or else unresolved-symbol
errors will occur.
> New GRASS 6.3+ packages will have to add libgeos-dev to the build-depends
> list in the debian/control file.
It only needs gdal-dev (or whatever it's called). The gdal-dev package
needs to list libgeos-dev as a dependency; if it doesn't, that's
gdal-dev's bug, not ours.
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-dev
mailing list