Unidefined symbol launching python program

This just started happening on one of our development machines:

    import pyzed.sl as pyzed  # type: ignore
    ^^^^^^^^^^^^^^^^^^^^^^^^
ImportError: /workspaces/firefly/.venv/lib/python3.12/site-packages/pyzed/sl.cpython-312-x86_64-linux-gnu.so: undefined symbol: _ZN2sl8GNSSDataC1Ev

I have seen other threads that indicate similar issues are a mismatch between the python API and the native SDK however I ran the ZED 5.0.1 SDK installation and then immediately ran the /usr/local/zed/get_python_api.py script, so they should be in sync.

I figured out the problem. This is because StereoLabs released SDK 5.0.2 and the matching Python API. The problem is that StereoLabs doesn’t maintain ABI compatibility between patch releases, and the Python API is not versioned at the patch release level.

So in our case we have an install_zed.sh shell script that downloads SDK version 5.0.1 and then runs /usr/local/zed/get_python_api.py. But the api install script pulls version “5.0”, which has been updated to be compatible with 5.0.2 and is not backwards compatible with 5.0.1.

StereoLabs either needs to start versioning the Python API with patch versions so the SDK can install the correct version, or needs to maintain ABI compatibility between patch releases.

2 Likes