Skip to content

Need CentOS support #1001

Description

@jim-meyer

Describe the bug
I would like to be able to use onnxruntime on CentOS 7.6. I can pip install onnxruntime 0.4.0 on CentOS 7.6 fine. But when I try to "import onnxruntime" using python 3.6.3 it fails:

/opt/app-root/lib/python3.6/site-packages/onnxruntime/capi/_pybind_state.py:12: UserWarning: Cannot load onnxruntime.capi. Error: '/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by /opt/app-root/lib/python3.6/site-packages/onnxruntime/capi/onnxruntime_pybind11_state.so)'
  warnings.warn("Cannot load onnxruntime.capi. Error: '{0}'".format(str(e)))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/app-root/lib/python3.6/site-packages/onnxruntime/__init__.py", line 21, in <module>
    from onnxruntime.capi._pybind_state import RunOptions, SessionOptions, get_device, NodeArg, ModelMetadata
ImportError: cannot import name 'RunOptions'

This almost certainly fails for other supported (>=3.5) versions of python though I haven't tried any other versions.

The output of strings /usr/lib64/libstdc++.so.6 | grep GLIBCXX is:

GLIBCXX_3.4
GLIBCXX_3.4.1
GLIBCXX_3.4.2
GLIBCXX_3.4.3
GLIBCXX_3.4.4
GLIBCXX_3.4.5
GLIBCXX_3.4.6
GLIBCXX_3.4.7
GLIBCXX_3.4.8
GLIBCXX_3.4.9
GLIBCXX_3.4.10
GLIBCXX_3.4.11
GLIBCXX_3.4.12
GLIBCXX_3.4.13
GLIBCXX_3.4.14
GLIBCXX_3.4.15
GLIBCXX_3.4.16
GLIBCXX_3.4.17
GLIBCXX_3.4.18
GLIBCXX_3.4.19
GLIBCXX_DEBUG_MESSAGE_LENGTH

From https://gcc.gnu.org/onlinedocs/libstdc++/manual/abi.html it appears that onnxruntime is built with gcc 4.9 on Ubuntu but CentOS 7.6 only has gcc 4.8. And this appears to be the root of the problem.

System information

  • OS Platform and Distribution: centos/python-36-centos7:1 from DockerHub (7.6)
  • ONNX Runtime installed from (source or binary): binary
  • ONNX Runtime version: 0.4.0
  • Python version: 3.6

Discussion
I wanted to open this as an issue to hopefully spark some discussion and/or see if CentOS support is something that is being worked on by anybody.

Does anybody know if onnxruntime can be built with gcc 4.8? Or if there are components in the onnxruntime build tool chain that absolutely requires gcc 4.9?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    feature requestrequest for unsupported feature or enhancement

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions