Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.16.0 built from source on RHEL8 fails with: undefined symbol: _ZNSt10filesystem7__cxx114path14_M_split_cmptsEv #6047

Open
cjvolzka opened this issue Mar 28, 2024 · 0 comments
Labels

Comments

@cjvolzka
Copy link
Contributor

cjvolzka commented Mar 28, 2024

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, use pip3 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
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
@cjvolzka cjvolzka added the bug label Mar 28, 2024
github-merge-queue bot pushed a commit that referenced this issue Apr 12, 2024
### Description
Possible fix for #6047 based on
https://stackoverflow.com/questions/33149878/experimentalfilesystem-linker-error/33159746#33159746

### Motivation and Context
I'm not a cmake expert so there may be a better way to do this. This did
allow me to build ONNX 1.16 on RHEL 8.

---------

Signed-off-by: Charles Volzka <cjvolzka@us.ibm.com>
Signed-off-by: Charles Volzka <42243335+cjvolzka@users.noreply.github.com>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
gramalingam added a commit to gramalingam/onnx that referenced this issue Apr 12, 2024
### Description
Possible fix for onnx#6047 based on
https://stackoverflow.com/questions/33149878/experimentalfilesystem-linker-error/33159746#33159746

### Motivation and Context
I'm not a cmake expert so there may be a better way to do this. This did
allow me to build ONNX 1.16 on RHEL 8.

---------

Signed-off-by: Charles Volzka <cjvolzka@us.ibm.com>
Signed-off-by: Charles Volzka <42243335+cjvolzka@users.noreply.github.com>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
gramalingam added a commit to gramalingam/onnx that referenced this issue Apr 12, 2024
### Description
Possible fix for onnx#6047 based on
https://stackoverflow.com/questions/33149878/experimentalfilesystem-linker-error/33159746#33159746

### Motivation and Context
I'm not a cmake expert so there may be a better way to do this. This did
allow me to build ONNX 1.16 on RHEL 8.

---------

Signed-off-by: Charles Volzka <cjvolzka@us.ibm.com>
Signed-off-by: Charles Volzka <42243335+cjvolzka@users.noreply.github.com>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
Signed-off-by: Ganesan Ramalingam <grama@microsoft.com>
cjvolzka added a commit that referenced this issue Apr 29, 2024
### Description
Possible fix for #6047 based on
https://stackoverflow.com/questions/33149878/experimentalfilesystem-linker-error/33159746#33159746

### Motivation and Context
I'm not a cmake expert so there may be a better way to do this. This did
allow me to build ONNX 1.16 on RHEL 8.

---------

Signed-off-by: Charles Volzka <cjvolzka@us.ibm.com>
Signed-off-by: Charles Volzka <42243335+cjvolzka@users.noreply.github.com>
Co-authored-by: Thiago Crepaldi <thiago.crepaldi@microsoft.com>
Co-authored-by: G. Ramalingam <grama@microsoft.com>
(cherry picked from commit 3f24ef3)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant