-
Notifications
You must be signed in to change notification settings - Fork 3.8k
Open
Labels
Description
Bug Report
Is the issue related to model conversion?
No
Describe the bug
importing ONNX, built from source, on RHEL8 fails with ImportError: /usr/local/lib64/python3.9/site-packages/onnx/onnx_cpp2py_export.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt10filesystem7__cxx114path14_M_split_cmptsEv
System information
- OS Platform and Distribution (e.g. Linux Ubuntu 20.04): RHEL 8
- ONNX version (e.g. 1.13): 1.16.0
- Python version: 3.9
- GCC/Compiler version (if compiling from source): 8.5.0
- CMake version: 3.29.0
Reproduction instructions
- Notes
- Issue won't appear on x86 using
pip3 install onnx
as that installs pre-built wheel files. To replicate on x86 RHEL 8, usepip3 install --no-binary onnx onnx
- I'm guessing issue will appear on any Linux using GCC less than 9 (based on https://stackoverflow.com/a/33159746).
- By default, RHEL 8 uses python3.6 which only installs onnx 1.14 via pip. You need to use a newer python so pip will install the latest onnx
- Issue won't appear on x86 using
pip3 uninstall -y onnx
pip3 install --no-binary onnx onnx
python3 -c "import onnx; print(f'installed onnx version: {onnx.__version__}')"
Traceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib64/python3.9/site-packages/onnx/__init__.py", line 77, in <module>
from onnx.onnx_cpp2py_export import ONNX_ML
ImportError: /usr/local/lib64/python3.9/site-packages/onnx/onnx_cpp2py_export.cpython-39-x86_64-linux-gnu.so: undefined symbol: _ZNSt10filesystem7__cxx114path14_M_split_cmptsEv
Expected behavior
installed onnx version: 1.16.0