[Mlir-commits] [mlir] [mlir][Python] create MLIRPythonSupport (PR #171775)

llvmlistbot at llvm.org llvmlistbot at llvm.org
Thu Dec 25 13:40:36 PST 2025


github-actions[bot] wrote:

<!--PREMERGE ADVISOR COMMENT: Linux-->
# :penguin: Linux x64 Test Results

* 3865 tests passed
* 201 tests skipped

All executed tests passed, but another part of the build **failed**. Click on a failure below to see the details.

<details>
<summary>tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonSupport-mlir.so</summary>

```
FAILED: tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonSupport-mlir.so
: && /opt/llvm/bin/clang++ -fPIC -gmlt -fPIC -fno-semantic-interposition -fvisibility-inlines-hidden -Werror -Werror=date-time -Werror=unguarded-availability-new -Wall -Wextra -Wno-unused-parameter -Wwrite-strings -Wcast-qual -Wmissing-field-initializers -pedantic -Wno-long-long -Wc++98-compat-extra-semi -Wimplicit-fallthrough -Wcovered-switch-default -Wno-noexcept-type -Wnon-virtual-dtor -Wdelete-non-virtual-dtor -Wsuggest-override -Wstring-conversion -Wno-pass-failed -Wmisleading-indentation -Wctad-maybe-unsupported -fdiagnostics-color -ffunction-sections -fdata-sections -Wundef -Werror=mismatched-tags -O3 -DNDEBUG  -Wl,-z,defs -Wl,-z,nodelete -fuse-ld=lld -Wl,--color-diagnostics   -Xlinker --exclude-libs -Xlinker ALL -shared -Wl,-soname,libMLIRPythonSupport-mlir.so -o tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonSupport-mlir.so tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp.o  -Wl,-rpath,"\$ORIGIN:/home/gha/actions-runner/_work/llvm-project/llvm-project/build/tools/mlir/python_packages/mlir_core/mlir/_mlir_libs:"  tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libnanobind-mlir.so  lib/libLLVMSupport.a  tools/mlir/python_packages/mlir_core/mlir/_mlir_libs/libMLIRPythonCAPI.so.22.0git  -lrt  -ldl  -lm  /usr/lib/x86_64-linux-gnu/libz.so  lib/libLLVMDemangle.a && :
ld.lld: error: undefined symbol: PyGILState_Ensure
>>> referenced by nb_misc.h:15 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_misc.h:15)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::PyMlirContext(MlirContext))
>>> referenced by nb_misc.h:15 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_misc.h:15)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::~PyMlirContext())
>>> referenced by nb_misc.h:15 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_misc.h:15)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::forContext(MlirContext))
>>> referenced 4 more times

ld.lld: error: undefined symbol: PyGILState_Release
>>> referenced by nb_misc.h:16 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_misc.h:16)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::PyMlirContext(MlirContext))
>>> referenced by nb_misc.h:16 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_misc.h:16)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::PyMlirContext(MlirContext))
>>> referenced by nb_misc.h:16 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_misc.h:16)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::~PyMlirContext())
>>> referenced 9 more times

ld.lld: error: undefined symbol: _Py_NoneStruct
>>> referenced by nb_types.h:189 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_types.h:189)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp.o:(mlir::python::mlir::PyGlobals::loadDialectModule(llvm::StringRef))
>>> referenced by Globals.cpp:0 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp:0)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp.o:(mlir::python::mlir::PyGlobals::loadDialectModule(llvm::StringRef))
>>> referenced by nb_types.h:198 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_types.h:198)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp.o:(mlir::python::mlir::PyGlobals::loadDialectModule(llvm::StringRef))
>>> referenced 12 more times

ld.lld: error: undefined symbol: PyCapsule_New
>>> referenced by Interop.h:217 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir-c/Bindings/Python/Interop.h:217)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::getCapsule())
>>> referenced by Interop.h:236 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir-c/Bindings/Python/Interop.h:236)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyDialectRegistry::getCapsule())
>>> referenced by Interop.h:256 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir-c/Bindings/Python/Interop.h:256)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyLocation::getCapsule())
>>> referenced 6 more times

ld.lld: error: undefined symbol: PyExc_ModuleNotFoundError
>>> referenced by Globals.cpp:65 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp:65)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp.o:(mlir::python::mlir::PyGlobals::loadDialectModule(llvm::StringRef))

ld.lld: error: undefined symbol: PyErr_GivenExceptionMatches
>>> referenced by nb_error.h:41 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_error.h:41)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/Globals.cpp.o:(nanobind::python_error::matches(nanobind::handle) const)

ld.lld: error: undefined symbol: PyCapsule_GetPointer
>>> referenced by Interop.h:225 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir-c/Bindings/Python/Interop.h:225)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::createFromCapsule(nanobind::object))
>>> referenced by Interop.h:247 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir-c/Bindings/Python/Interop.h:247)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyDialectRegistry::createFromCapsule(nanobind::object))
>>> referenced by Interop.h:265 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/include/mlir-c/Bindings/Python/Interop.h:265)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyLocation::createFromCapsule(nanobind::object))
>>> referenced 6 more times

ld.lld: error: undefined symbol: PyUnicode_InternFromString
>>> referenced by nb_accessor.h:84 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_accessor.h:84)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyDiagnostic::getMessage())
>>> referenced by nb_accessor.h:84 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_accessor.h:84)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyDiagnostic::getMessage())
>>> referenced by nb_accessor.h:84 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_accessor.h:84)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOperationBase::getAsm(bool, std::optional<long>, std::optional<long>, bool, bool, bool, bool, bool, bool, bool))
>>> referenced 4 more times

ld.lld: error: undefined symbol: _Py_Dealloc
>>> referenced by object.h:705 (/usr/include/python3.12/object.h:705)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(nanobind::detail::accessor<nanobind::detail::str_attr>::~accessor())
>>> referenced by object.h:705 (/usr/include/python3.12/object.h:705)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::PyFileAccumulator::PyFileAccumulator(nanobind::object const&, bool))
>>> referenced by object.h:705 (/usr/include/python3.12/object.h:705)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOperationBase::print(std::optional<long>, std::optional<long>, bool, bool, bool, bool, bool, bool, nanobind::object, bool, bool))
>>> referenced 3 more times

ld.lld: error: undefined symbol: PyTuple_New
>>> referenced by IRCore.cpp:387 (/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp:387)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyDiagnostic::getNotes())

ld.lld: error: undefined symbol: PyDict_Next
>>> referenced by nb_types.h:900 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_types.h:900)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOperation::create(std::basic_string_view<char, std::char_traits<char>>, std::optional<std::vector<mlir::python::mlir::PyType*, std::allocator<mlir::python::mlir::PyType*>>>, llvm::ArrayRef<MlirValue>, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, int, mlir::python::mlir::PyLocation&, nanobind::object const&, bool))
>>> referenced by nb_types.h:900 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_types.h:900)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOperation::create(std::basic_string_view<char, std::char_traits<char>>, std::optional<std::vector<mlir::python::mlir::PyType*, std::allocator<mlir::python::mlir::PyType*>>>, llvm::ArrayRef<MlirValue>, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, int, mlir::python::mlir::PyLocation&, nanobind::object const&, bool))

ld.lld: error: undefined symbol: _Py_FalseStruct
>>> referenced by nb_types.h:189 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_types.h:189)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::maybeInsertOperation(mlir::python::mlir::PyObjectRef<mlir::python::mlir::PyOperation>&, nanobind::object const&))
>>> referenced by nb_cast.h:258 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:258)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::attachDiagnosticHandler(nanobind::object)::$_0::__invoke(MlirDiagnostic, void*))
>>> referenced by nb_cast.h:270 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:270)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PySymbolTable::walkSymbolTables(mlir::python::mlir::PyOperationBase&, bool, nanobind::object)::$_0::__invoke(MlirOperation, bool, void*))

ld.lld: error: undefined symbol: PyLong_Type
>>> referenced by object.h:231 (/usr/include/python3.12/object.h:231)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced by object.h:231 (/usr/include/python3.12/object.h:231)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced by object.h:231 (/usr/include/python3.12/object.h:231)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced 1 more times

ld.lld: error: undefined symbol: PyBool_Type
>>> referenced by object.h:232 (/usr/include/python3.12/object.h:232)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced by object.h:232 (/usr/include/python3.12/object.h:232)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced by object.h:232 (/usr/include/python3.12/object.h:232)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced 1 more times

ld.lld: error: undefined symbol: PyDict_New
>>> referenced by nb_types.h:552 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_types.h:552)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))

ld.lld: error: undefined symbol: PyUnicode_FromString
>>> referenced by nb_cast.h:300 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:300)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced by nb_cast.h:300 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:300)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))

ld.lld: error: undefined symbol: PyDict_Contains
>>> referenced by nb_cast.h:719 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:719)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))
>>> referenced by nb_cast.h:719 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:719)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyOpView::buildGeneric(std::basic_string_view<char, std::char_traits<char>>, std::tuple<int, bool>, nanobind::object, nanobind::object, std::optional<nanobind::list>, nanobind::list, std::optional<nanobind::dict>, std::optional<std::vector<mlir::python::mlir::PyBlock*, std::allocator<mlir::python::mlir::PyBlock*>>>, std::optional<int>, mlir::python::mlir::PyLocation&, nanobind::object const&))

ld.lld: error: undefined symbol: _Py_TrueStruct
>>> referenced by nb_cast.h:258 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:258)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::attachDiagnosticHandler(nanobind::object)::$_0::__invoke(MlirDiagnostic, void*))
>>> referenced by nb_cast.h:258 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:258)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PyMlirContext::attachDiagnosticHandler(nanobind::object)::$_0::__invoke(MlirDiagnostic, void*))
>>> referenced by nb_cast.h:0 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/nb_cast.h:0)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(mlir::python::mlir::PySymbolTable::walkSymbolTables(mlir::python::mlir::PyOperationBase&, bool, nanobind::object)::$_0::__invoke(MlirOperation, bool, void*))

ld.lld: error: undefined symbol: PyUnicode_AsUTF8AndSize
>>> referenced by string.h:23 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/stl/string.h:23)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(nanobind::detail::type_caster<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>::from_python(nanobind::handle, unsigned char, nanobind::detail::cleanup_list*))

ld.lld: error: undefined symbol: PyErr_Clear
>>> referenced by string.h:25 (/home/gha/.local/lib/python3.12/site-packages/nanobind/include/nanobind/stl/string.h:25)
>>>               tools/mlir/python/CMakeFiles/MLIRPythonModules.extension.MLIRPythonSupport-mlir.dso.dir/home/gha/actions-runner/_work/llvm-project/llvm-project/mlir/lib/Bindings/Python/IRCore.cpp.o:(nanobind::detail::type_caster<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char>>, int>::from_python(nanobind::handle, unsigned char, nanobind::detail::cleanup_list*))

ld.lld: error: too many errors emitted, stopping now (use --error-limit=0 to see all errors)
clang++: error: linker command failed with exit code 1 (use -v to see invocation)
```
</details>

If these failures are unrelated to your changes (for example tests are broken or flaky at HEAD), please open an issue at https://github.com/llvm/llvm-project/issues and add the `infrastructure` label.

https://github.com/llvm/llvm-project/pull/171775


More information about the Mlir-commits mailing list