Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python] MacOS wheel builds fail after successfully building and installing CIRCTPythonModules. #8054

Open
mikeurbach opened this issue Jan 9, 2025 · 0 comments
Labels
Python Python bindings

Comments

@mikeurbach
Copy link
Contributor

This appears to have been failing since we updated LLVM to integrate the upstream MLIR switch to nanobind for the core dialect here.

I'm planning to remove this for now, since no one seems to care about MacOS wheels, and we have finite space in PyPI for CIRCT.

I do want to leave my thoughts, such as they are, in case anyone wants to try to pick this up.

There are a number of failed Upload Wheels jobs that I manually ran while testing, but take a look at one of the failures that was scheduled on main: https://github.com/llvm/circt/actions/runs/12632127552

In the failing MacOS job, it gets to the build_ext step, which is supposed to be a no-op, but instead tries to run a half-baked C compile command, which fails: https://github.com/llvm/circt/actions/runs/12632127552/job/35195198998#step:6:7419

  [...]
  [100%] Built target install-CIRCTPythonModules
  running build_ext
  building 'circt._mlir_libs._mlir' extension
  clang -bundle -undefined dynamic_lookup -g -arch x86_64 -o build/lib.macosx-10.9-x86_64-cpython-310/circt/_mlir_libs/_mlir.cpython-310-darwin.so
  clang: error: no input files
  error: command '/usr/bin/clang' failed with exit code 1

In a passing Linux job, the build_ext step really is a no-op: https://github.com/llvm/circt/actions/runs/12632127552/job/35195198360#step:6:7819

  [...]
  [100%] Built target install-CIRCTPythonModules
  Detected static linked python. Faking a library for cmake.
  running build_ext
  running build_scripts

I tried a few things here. For one, I set a breakpoint in the NoopBuildExtension method, and it never seems to get called. To sanity check myself, I did set a breakpoint in the CustomBuild, before and after build_py, and the breakpoint before build_py was hit, but the failing build_ext step was run before the breakpoint after build_py was hit. So I think there is something wonky going on with setuptools/distutils, which has its own little command running framework. It feels like somehow that is conjuring a build_ext that isn't our overridden one.

I don't know why this would have changed recently. I don't know of anything upstream that would affect this, but maybe I'm missing something. I do know that we have an open ended setuptools dependency, which I don't like, so I tried pinning it to the oldest version of setuptools we can use, and that didn't fix this. I also know we recently switched to macos-13 runners, so perhaps that is related.

For now, I will plan to remove MacOS wheel builds in #8051.

@mikeurbach mikeurbach added the Python Python bindings label Jan 9, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Python Python bindings
Projects
None yet
Development

No branches or pull requests

1 participant