[QGIS-Developer] Protobuf mismatch with compiled python package

Nils Nolde nilsnolde at proton.me
Tue Jun 7 08:28:05 PDT 2022


Hi all,

bit of an exotic one: I'm trying to use a Python package for a new QGIS Plugin we want to release soon, and which has a C++ extension: https://pypi.org/project/pyvalhalla/. One of the dependencies of that library is protobuf. I've been using it extensively over the past months, but now in QGIS it seems to not like the fact that the python library is compiled with manylinux_2_24 (Debian 9) which has protobuf v3.0.0. This is the error message popping up:

This program was compiled against version 3.0.0 of the Protocol Buffer runtime library, which is not compatible with the installed version (3.20.1). Contact the program author for an update. If you compiled the program yourself, make sure that your headers are from the same version of Protocol Buffers as your link-time library. (Version verification failed in "/valhalla-py/upstream/build/src/valhalla/proto/api.pb.cc".)

I'm on Arch Linux with Python 3.10, I tried QGIS 3.24.3 and 3.22.1. It's very easy to reproduce: "pip install pyvalhalla" and in QGIS Python console "from valhalla import Actor". Careful though, our QGIS plugin "valhalla" will clash here, it needs to be uninstalled first..

I checked with Blender and its Python console: no problem running pyvalhalla.

Does QGIS somehow patch/override the search paths for dynamic libraries? I figured that's what python's auditwheel does when building packages for PyPI: patching the RPATH of the library to point to the /python-dir/site-packages/pyvalhalla.libs directory. And it breaks my brain that QGIS can override that somehow.. Anyone got a clue what I'm missing?

Many thanks for any tip/advice Nils
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20220607/fe48a8f5/attachment.htm>


More information about the QGIS-Developer mailing list