[Python] Libtensorflow_framework.so.2: symbol clock_gettime version GLIBC_2.17 not defined in...

Discussão em 'Python' iniciado por Stack, Agosto 29, 2025.

  1. Stack

    Stack Membro Participativo

    I am running a ML model using TensorFlow on an embedded platform based on Yocto Dunfell). The ML model and its python code is compiled into a .so. I wrote a C code which calls functions from the .so to get model outputs.

    When I build my C code with -lrt (to use timer_create()), I get the following runtime error inside the .so. However, if I remove -lrt and comment out any timer_create() calls, everything works fine — TensorFlow loads, and the model outputs as expected.

    Please help me resolve this issue

    Traceback (most recent call last):
    File "/usr/lib64/python3.11/site-packages/tensorflow/__init__.py", line 40, in <module>
    from tensorflow.python import pywrap_tensorflow as _pywrap_tensorflow # pylint: disable=unused-import
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/site-packages/tensorflow/python/pywrap_tensorflow.py", line 34, in <module>
    self_check.preload_check()
    File "/usr/lib64/python3.11/site-packages/tensorflow/python/platform/self_check.py", line 63, in preload_check
    from tensorflow.python.platform import _pywrap_cpu_feature_guard
    ImportError: /usr/lib64/python3.11/site-packages/tensorflow/python/platform/../../libtensorflow_framework.so.2: symbol clock_gettime version GLIBC_2.17 not defined in file librt.so.1 with link time reference

    Continue reading...

Compartilhe esta Página