Skip to content

[Bug] undefined symbol _ZN3tvm3ffi9ReprPrintERKNS0_3AnyE in libtvm_compiler.so #19486

Closed

Description

@petersktang

USE_CUDA=OFF USE_ROCM=ON USE_LLVM=ON

Expected behavior

import tvm is able to load

Actual behavior

Traceback (most recent call last):
  File "<test>/tvmSample1.py", line 1, in <module>
    import tvm
  File "<tvm>/python/tvm/__init__.py", line 29, in <module>
    from .base import TVMError, __version__, _RUNTIME_ONLY
  File "<tvm>/python/tvm/base.py", line 60, in <module>
    _LIB = libinfo.load_lib_ctypes(
        "tvm", "tvm_compiler", "RTLD_LOCAL", extra_lib_paths=_extra_lib_paths
    )
  File "<tvm>/python/tvm/libinfo.py", line 143, in load_lib_ctypes
    return ctypes.CDLL(str(lib_path), getattr(ctypes, mode))
           ~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<conda env>/tvm/lib/python3.14/ctypes/__init__.py", line 433, in __init__
    self._handle = self._load_library(name, mode, handle, winmode)
                   ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "<conda env>/tvm/lib/python3.14/ctypes/__init__.py", line 473, in _load_library
    return _dlopen(name, mode)
OSError: <conda env>/tvm/lib/python3.14/site-packages/tvm/lib/libtvm_compiler.so: undefined symbol: _ZN3tvm3ffi9ReprPrintERKNS0_3AnyE

Environment

  • Ubuntu 24, Linux 6.17.0-1017-oem with ROCm 7.2.2 (AMD Ryzen™ AI 9 HX 370, GPU 890M, no Nvidia GPU)
  • The CUDA compiler identification is NVIDIA 13.1.115 with host compiler GNU 14.3.0 [conda virtual environment]

Steps to reproduce

                "-DTVM_BUILD_PYTHON_MODULE=ON",
                "-DUSE_CUDA=OFF", "-DUSE_ROCM=ON", "-DUSE_LLVM=ON",
                "-DCMAKE_C_COMPILER=/opt/rocm/llvm/bin/clang",
                "-DCMAKE_CXX_COMPILER=/opt/rocm/llvm/bin/clang++"
  • set(USE_LLVM "/usr/bin/llvm-config-20" )
  • pip install -e . [in a conda virtual environment]
  • python -C 'import tvm'

Triage

Please refer to the list of label tags here to find the relevant tags and add them below in a bullet format (example below).

  • needs-triage

Activity

  1. added
    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address it
    on May 1, 2026
  2. tqchen commented on May 1, 2026

    @tqchen
    Member

    likely you need to use the latest tvm-ffi

  3. petersktang commented on May 1, 2026

    @petersktang
    Author

    likely you need to use the latest tvm-ffi

    Steps I used

    Do you mean to say I should not be using tvm-ffi @ 3c35034, this is from tvm/3rdparty/tvm-ffi already.

  4. tqchen commented on May 2, 2026

    @tqchen
    Member

    try to do pip install 3rdparty/tvm-ffi

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

    needs-triagePRs or issues that need to be investigated by maintainers to find the right assignees to address ittype: bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions