Opened 2 years ago

Closed 2 years ago

#2363 closed defect (fixed)

gdal's ogr2ogr misses libgrass_vector.8.2.so

Reported by: edso Owned by: osgeolive@…
Priority: major Milestone: OSGeoLive15.0
Component: OSGeoLive Keywords:
Cc: osgeolive@…

Description

user@osgeolive:~$ ogr2ogr --version
ERROR 1: libgrass_vector.8.2.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_vector.8.2.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_vector.8.2.so: cannot open shared object file: No such file or directory
ERROR 1: libgrass_vector.8.2.so: cannot open shared object file: No such file or directory
GDAL 3.4.3, released 2022/04/22

can be fixed by adding the location to the library path

user@osgeolive:~$ LD_LIBRARY_PATH=/usr/lib/grass82/lib/ ogr2ogr --version
GDAL 3.4.3, released 2022/04/22

maybe it's best to add the path globally via /etc/ld.so.conf.d/grass.conf ?

Change History (6)

comment:1 by Bas Couwenberg, 2 years ago

GRASS was updated to 8.2.0 which sets RUNPATH, see:

https://github.com/OSGeo/grass/pull/2280

This removes the need for ld.so.conf snippets.

The libgdal-grass package was not updated correctly for 8.2.0:

g++ -shared  -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro \
             -Wl,-z,now -Wl,--no-as-needed grass.o \
             -L/usr/lib/grass82/lib -lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree \
                                    -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_raster \
                                    -lgrass_imagery -lgrass_gproj -lgrass_gmath -lgrass_gis \
                                    -lgrass_datetime -lgrass_btree2 -lgrass_ccmath \
             -L/usr/lib -lgdal  -o gdal_GRASS.so -Wl,-rpath,/usr/lib/grass80/lib
g++ -shared  -Wl,-Bsymbolic-functions -flto=auto -ffat-lto-objects -flto=auto -Wl,-z,relro \
             -Wl,-z,now -Wl,--no-as-needed ogrgrassdriver.o ogrgrassdatasource.o ogrgrasslayer.o \
             -L/usr/lib/grass82/lib -lgrass_vector -lgrass_dig2 -lgrass_dgl -lgrass_rtree \
                                    -lgrass_linkm -lgrass_dbmiclient -lgrass_dbmibase -lgrass_raster \
                                    -lgrass_imagery -lgrass_gproj -lgrass_gmath -lgrass_gis \
                                    -lgrass_datetime -lgrass_btree2 -lgrass_ccmath \
             -L/usr/lib -lgdal  -o ogr_GRASS.so -Wl,-rpath,/usr/lib/grass80/lib

It still uses the RUNPATH for GRASS 8.0.x.

The rpath patch needs to be updated too, see the packaging changes in Debian for 8.2.0:

https://salsa.debian.org/debian-gis-team/gdal-grass/-/commit/4a84adb0830faef4d0ae3f1efa9d09ea9b58de7c

libgdal-grass (1:1.0.0-1~exp1) dropped this patch because it's included upstream:

https://github.com/OSGeo/gdal/pull/5503

Last edited 2 years ago by Bas Couwenberg (previous) (diff)

comment:2 by edso, 2 years ago

or that way :). thanks for digging into!

comment:3 by sanak, 2 years ago

I confirmed the similar libgrass_vector.8.2.so: cannot open shared object file: No such file or directory issue, when I launched MapProxy service.

Temporarily, I confirmed that MapProxy service can be launched by the following workaround.

maybe it's best to add the path globally via /etc/ld.so.conf.d/grass.conf ?

comment:4 by kalxas, 2 years ago

Cc: osgeolive@… added
Priority: normalmajor

comment:5 by kalxas, 2 years ago

New libgdal-grass package now uploaded in nightly ppa to fix this issue.

Thanks Bas for the commit link.

comment:6 by kalxas, 2 years ago

Resolution: fixed
Status: newclosed

confirmed fixed in build89

Note: See TracTickets for help on using tickets.