Hi,

Just tried ogdi on bullseye, and I found that its plugin mechanism isn't 
functional.

How to reproduce:
- apt install ogdi-bin
- wget 
http://freefr.dl.sourceforge.net/project/ogdi/OGDI_Test_Suite/3.1/ogdits-3.1.0.zip
- unzip ogdits-3.1.0.zip
- ogdi_info -u gltp:/vrf/./ogdits-3.1/data/vpf/vm2alv2/texash

It outputs:
ECSERROR: Could not find the dynamic library "vrf"

Now do:
ln -s /usr/lib/ogdi/libvrf.so /usr/lib

and retry, and it will output a long listing with the dataset content


The plugin loading mechanism is at
https://github.com/libogdi/ogdi/blob/de0189d5447acaf438a9e7866b906aa75ea8f51f/ogdi/c-api/ecs_dyna.c#L86

and relies on a MODULES_PATH #define that defaults to "/usr/lib/ogdi/"
but is actually overwritten at
https://github.com/libogdi/ogdi/blob/2b431a9bca962fe78d89c0283df95fcaf870dd71/ogdi/c-api/makefile#L31

with -DMODULES_PATH="\"$(INST_LIB)/ogdi/\""

And in 
https://salsa.debian.org/debian-gis-team/ogdi-dfsg/-/blob/master/debian/rules#L31

configure is called with  --libdir=$(CURDIR)/debian/tmp/usr/lib

Looking at the content of libogdi.so confirms that the search path is actually 
the temporary build directory:

$ strings /tmp/libogdi.so.4 | grep "/usr/lib"
/build/ogdi-dfsg-7e7JrZ/ogdi-dfsg-4.1.0+ds/debian/tmp/usr/lib/ogdi/%s
/build/ogdi-dfsg-7e7JrZ/ogdi-dfsg-4.1.0+ds/debian/tmp/usr/lib/ogdi/lib%s.so

Now that I remember, I actually hit that issue a long time ago, but failed to 
report it,
and probably just did the ln -s workaround.

I guess the issue might have started from
https://salsa.debian.org/debian-gis-team/ogdi-dfsg/-/commit/5b7c9c0b1d1c21c1a551cbad130828c86818a51b
since before --libdir was not overridden.


A potential solution could be to add a patch to ogdi/c-api/makefile to remove 
-the -DMODULES_PATH= override.


Cheers,

Even


-- 
Spatialys - Geospatial professional services
http://www.spatialys.com

Reply via email to