Skip to content

conflicting packages "ImportError: libeckit_geo.so: cannot open shared object file: No such file or directory" #288

Description

@sbnielsen

What happened?

When installing pyfdb (version 5.21.4.20. Have also tried 5.20 and 5.17) and its dependencies from PyPI via pip and uv, the package fails to import out-of-the-box on Linux environments.
This yields the following error
ImportError: libeckit_geo.so: cannot open shared object file: No such file or directory

Having debugged, it looks like the build time paths are locked into the pyfdb wheels in fdb/python/fdb5lib/buildconfig

# NOTE pyfdb interface is dependent on python 3.11+ -- but we don't activate
# the venv at the time this is sourced, that's why we rely on PYVERSION. Remove
# this whole part around October 2026 when 3.10 goes EoL
# if [ "True" = "$(python -c 'import sys; print(sys.version_info[0:2] >= (3, 11))')" ] ; then
if [ "3.10" != "$PYVERSION" ] ; then
    PYFDB_IFACE="-DENABLE_PYTHON_FDB_INTERFACE=ON"
else
    >&2 echo "Not enabling pyfdb interface because python version is $PYVERSION"
    PYFDB_IFACE=""
fi

CMAKE_PARAMS="-Deckit_ROOT=/tmp/fdb/prereqs/eckitlib -Dmetkit_ROOT=/tmp/fdb/prereqs/metkitlib -Deccodes_ROOT=/tmp/fdb/prereqs/eccodeslib $ZARR_IFACE $PYFDB_IFACE" 
readelf -d .venv/lib/python3.12/site-packages/pyfdb_bindings/pyfdb_bindings*.so | grep RPATH
Output:
0x000000000000000f (RPATH) Library rpath: [$ORIGIN/../lib64:/tmp/fdb/prereqs/metkitlib/lib64:/tmp/fdb/prereqs/eckitlib/lib64:/tmp/fdb/prereqs/eccodeslib/lib64]

What are the steps to reproduce the bug?

uv venv
source .venv/bin/activate
uv pip install pyfdb
python3 -c "import pyfdb; print(pyfdb.__version__)"

Version

5.17 and above

Platform (OS and architecture)

Atos

Relevant log output

from pyfdb_bindings import pyfdb_bindings as pyfdb_internal
ImportError: libeckit_geo.so: cannot open shared object file: No such file or directory

Accompanying data

No response

Organisation

DMI

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions