You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I compile the library on CentOS 7 and deploy on Ubuntu 20.04.
In python I do:
fromh5geopyimport_h5geo
On CentOS 7 everything works fine.
But on Ubunutu I get error:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/jjj/Documents/tmp/lib/Python/lib/python3.9/site-packages/h5geopy/__init__.py", line 15, in <module>
from h5geopy import _h5geo as h5geo
ImportError: /home/jjj/Documents/tmp/lib/Python/lib/python3.9/site-packages/h5geopy/_h5geo.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZN5h5geo2sr15setAngularUnitsERKSs
I understand that it can't load sr.setAngularUnits function because it probably doesn' load the libh5geo.so library.
But if I preliminary manually load that library:
then I'm able to load h5geopy._h5geo library on Ubuntu as well.
Why Ubuntu doesn't load the dependency library libh5geo.so during import h5geopy._h5geo? And how to solve that (except adding cdll.LoadLibrary to the init.py)?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Hi,
I have a module and define a submodule
In cmake:
I compile the library on CentOS 7 and deploy on Ubuntu 20.04.
In python I do:
On CentOS 7 everything works fine.
But on Ubunutu I get error:
I understand that it can't load
sr.setAngularUnits
function because it probably doesn' load thelibh5geo.so
library.But if I preliminary manually load that library:
then I'm able to load
h5geopy._h5geo
library on Ubuntu as well.Why Ubuntu doesn't load the dependency library
libh5geo.so
during importh5geopy._h5geo
? And how to solve that (except addingcdll.LoadLibrary
to theinit.py
)?And yes
libh5geo.so
is inLD_LIBRARY_PATH
Pybind11 version:
v2.9.0
Beta Was this translation helpful? Give feedback.
All reactions