fynv / ThrustRTC

CUDA tool set for non-C++ languages that provides similar functionality like Thrust, with NVRTC at its core.
Other
59 stars 6 forks source link

import fails after fresh install with pip (/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found) #11

Closed slayoo closed 3 years ago

slayoo commented 3 years ago

As reported originally here: https://github.com/atmos-cloud-sim-uj/PySDM/pull/513#issuecomment-840725954

We have a machine on which a fresh install of ThrustRTC using pip results in unusable package (Python 3.8.5, pip 20.3.1, ThrustRTC 0.3.10, cffi 1.14.5):

python3 -c "import ThrustRTC as trtc"

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/home/ajaruga/.local/lib/python3.8/site-packages/ThrustRTC/__init__.py", line 1, in <module>
    from .Native import native, check_i
  File "/home/ajaruga/.local/lib/python3.8/site-packages/ThrustRTC/Native.py", line 12, in <module>
    native = ffi.dlopen(path_thrustrtc)
OSError: cannot load library '/home/ajaruga/.local/lib/python3.8/site-packages/ThrustRTC/libPyThrustRTC.so': /lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by /home/ajaruga/.local/lib/python3.8/site-packages/ThrustRTC/libPyThrustRTC.so)

Some Googleing suggests that it is a glibc version incompatibility with the symbols used within the precompiled .so object shipped with pip, but then it should likely be reported by pip (i.e. pip should prevent from installing it), right?

Any hints? Thanks

trontrytel commented 3 years ago

Thank you for looking into this!

It's a CentOS 7 machine. All the other package versions are correct.

slayoo commented 3 years ago

hmm... image not an uncommon problem :(

trontrytel commented 3 years ago

Oh wow. OK. If it turns out to be too big of a problem I can come back to trying to run it inside the Ubuntu Singularity image.

fynv commented 3 years ago

Sorry for being inactive recently. I don't have CentOS and the specific ABI. How about getting CUDA set up and building the code locally? Does it work it this case?

fynv commented 3 years ago

One down-side using CFFI(ABI mode) is that the building process doesn't really have an ABI check. The "AuditWheel" step is bypassed, which could cause a problem like this.

fynv commented 3 years ago

The lastest version 0.3.11, which I've just checked in to PyPi, is build using the Manylinux2010 docker image. Hopefully it will solve the issue.

slayoo commented 3 years ago

Thank you! @trontrytel could you check if it helps on the CentOS 7 machine?