Now that 7.8.7 has been released, I started looking into updating the
Debian package to 8.0.x which requires rebuilding libgdal-grass and qgis.
Initial tests with libgdal-grass are not promising. Both gdalinfo and
ogrinfo show errors because not all libraries are linked. We saw this
too when 7.2 was released: https://trac.osgeo.org/gdal/ticket/6785
The attached patch helps to some extent, but does not resolve all
issues. ogrinfo still shows errors:
# ogrinfo -ro -so /tmp/spearfish60_grass7/PERMANENT/vector/roads/head
Warning 1: GRASS warning: GISBASE environment variable was not set, using:
/usr/lib/grass80
/usr/lib/grass80/driver/db/sqlite: error while loading shared libraries:
libgrass_dbmidriver.8.0.so: cannot open shared object file: No such file
or directory
dbmi: Protocol error
Warning 1: GRASS warning: Unable to start driver <sqlite>
ERROR 1: Cannot open database sqlite by driver
/tmp/spearfish60_grass7/PERMANENT/sqlite/sqlite.db, check if GISBASE
environment variable is set, the driver is available and the database
is accessible.
INFO: Open of `/tmp/spearfish60_grass7/PERMANENT/vector/roads/head'
using driver `OGR_GRASS' successful.
1: roads (Line String)
The grass drivers lacks the RPATH that was set for ogr_GRASS:
# objdump -x /usr/lib/gdalplugins/ogr_GRASS.so | egrep "NEEDED|RUNPATH"
NEEDED libgrass_vector.8.0.so
NEEDED libgrass_dig2.8.0.so
NEEDED libgrass_dgl.8.0.so
NEEDED libgrass_rtree.8.0.so
NEEDED libgrass_linkm.8.0.so
NEEDED libgrass_dbmiclient.8.0.so
NEEDED libgrass_dbmibase.8.0.so
NEEDED libgrass_dbmidriver.8.0.so
NEEDED libgrass_dbstubs.8.0.so
NEEDED libgrass_raster.8.0.so
NEEDED libgrass_imagery.so
NEEDED libgrass_gproj.8.0.so
NEEDED libgrass_gmath.8.0.so
NEEDED libgrass_gis.8.0.so
NEEDED libgrass_datetime.8.0.so
NEEDED libgrass_btree2.8.0.so
NEEDED libgrass_ccmath.8.0.so
NEEDED libgdal.so.30
NEEDED libstdc++.so.6
NEEDED libm.so.6
NEEDED libgcc_s.so.1
NEEDED libc.so.6
RUNPATH /usr/lib/grass80/lib
# objdump -x /usr/lib/grass80/driver/db/sqlite | egrep "NEEDED|RUNPATH"
NEEDED libgrass_dbmidriver.8.0.so
NEEDED libgrass_dbmibase.8.0.so
NEEDED libgrass_gis.8.0.so
NEEDED libsqlite3.so.0
NEEDED libc.so.6
Should we perhaps take this opportunity to move the grass libraries to
default library search paths as raised on the debian-gis list?
https://lists.debian.org/debian-gis/2021/12/msg00023.html
Has any work been done testing and patching gdal-grass and qgis for
GRASS 8 yet?
Kind Regards,
Bas
--
GPG Key ID: 4096R/6750F10AE88D4AF1
Fingerprint: 8182 DE41 7056 408D 6146 50D1 6750 F10A E88D 4AF1
Description: Link additional libraries for GRASS 8.0.
Author: Bas Couwenberg <sebas...@debian.org>
--- a/configure.in
+++ b/configure.in
@@ -123,16 +123,23 @@ fi
if test "$with_grass" != "yes" ; then
- AC_CHECK_LIB(grass_gis,G_read_compressed,GRASS_SETTING=grass72+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ AC_CHECK_LIB(grass_gis,G_make_mapset_object_group,GRASS_SETTING=grass80+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
if test "$GRASS_SETTING" = "no" ; then
- AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ AC_CHECK_LIB(grass_gis,G_read_compressed,GRASS_SETTING=grass72+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
if test "$GRASS_SETTING" = "no" ; then
- AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ AC_CHECK_LIB(grass_gis,G_is_initialized,GRASS_SETTING=grass70+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ if test "$GRASS_SETTING" = "no" ; then
+ AC_CHECK_LIB(grass_gis,G_asprintf,GRASS_SETTING=grass57+,GRASS_SETTING=no,-L$with_grass/lib -lgrass_datetime)
+ fi
fi
fi
if test "$GRASS_SETTING" != "no" ; then
- if test "$GRASS_SETTING" = "grass72+" ; then
+ if test "$GRASS_SETTING" = "grass80+" ; then
+ G_RASTLIBS="-lgrass_raster -lgrass_imagery"
+ G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_dbmidriver -lgrass_dbstubs"
+ LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath $LIBS"
+ elif test "$GRASS_SETTING" = "grass72+" ; then
G_RASTLIBS="-lgrass_raster -lgrass_imagery"
G_VECTLIBS="-lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase"
LIBS="-L$with_grass/lib $G_VECTLIBS $G_RASTLIBS -lgrass_gproj -lgrass_gmath -lgrass_gis -lgrass_datetime -lgrass_btree2 -lgrass_ccmath $LIBS"
_______________________________________________
grass-dev mailing list
grass-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-dev