[Mlir-commits] [mlir] [mlir][python] automatic location inference (PR #151246)

Han-Chung Wang llvmlistbot at llvm.org
Tue Aug 19 07:28:35 PDT 2025


hanhanW wrote:

Hi, I'm seeing the below error on macos build:

```
ld: warning: ignoring duplicate libraries: '-lm'
ld: Undefined symbols:
  _PyCode_Addr2Location, referenced from:
      (anonymous namespace)::maybeGetTracebackLocation(std::__1::optional<mlir::python::PyLocation> const&) in IRCore.cpp.o
  _PyFrame_GetLasti, referenced from:
      (anonymous namespace)::maybeGetTracebackLocation(std::__1::optional<mlir::python::PyLocation> const&) in IRCore.cpp.o
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

I haven't tracked the change yet, but I'll try to provide a patch. Currently, we can only revert three commits together, otherwsie there are conflicts.

- https://github.com/llvm/llvm-project/commit/2b842e56000af9ba774fb96a8bb3b89980296bb0
- https://github.com/llvm/llvm-project/commit/9df846bf71a7935d3a798f275471bb59e9b27803
- https://github.com/llvm/llvm-project/commit/a40f47c9725f3aed6752f050f3010f3701d0cff7

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


More information about the Mlir-commits mailing list