Skip to content

Conversation

@mortbopet
Copy link
Contributor

AFAICT, pybind11 v. 3.0.0 (release 2 weeks ago) changed a bit how modules are being defined. A result of that is that it's not sufficient to just look for Python3_FOUND, since pybind module definition will fail inside the pybind CMake files if the Development component hasn't been enabled.

That can occur when e.g. building the ESI runtime alongside the rest of CIRCT, if python bindings are not enabled. In that case here in the top-level CMakeLists, we don't look for the Python3 Development component, which then triggers the issue. I'm a bit surprised that this isn't done inside the pybind11 cmake files (i.e. ensuring that Development is present), but oh well... the problem is fixed by always find_package'ing for both Interpreter and Development in the ESI runtime CMakeLists.txt.

Also sneaks in a .gitignore for the ESI/runtime library, to better support in-tree builds of just the runtime.

AFAICT, pybind11 v. 3.0.0 (release 2 weeks ago) changed a bit how modules are being defined. A result of that is that it's not sufficient to just look for `Python3_FOUND`. That can be evident when e.g. building the ESI runtime alongside the rest of CIRCT, if python bindings are _not_ enabled. In that case [here](https://github.com/llvm/circt/blob/main/CMakeLists.txt) the top-level CMakeLists won't look for the Python3 `Development` component... I'm a bit surprised that this isn't done inside the pybind11 cmake files, but oh well... the problem is fixed by always `find_package`'ing for both `Interpreter` and `Development` in the ESI runtime CMakeLists.txt.

Also sneaks in a .gitignore for the `ESI/runtime` library, to better support in-tree builds of just the runtime.
@mortbopet mortbopet requested a review from teqdruid as a code owner July 25, 2025 08:22
Copy link
Contributor

@teqdruid teqdruid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I seem to recall a particular reason I did this, but as long as it works...

@mortbopet mortbopet merged commit 2696da0 into main Jul 25, 2025
8 checks passed
@mortbopet mortbopet deleted the dev/mpetersen/esiruntime_cmake branch July 25, 2025 08:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants