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

BLD: building in modern Python environments #560

Open
tylerjereddy opened this issue Apr 12, 2024 · 1 comment
Open

BLD: building in modern Python environments #560

tylerjereddy opened this issue Apr 12, 2024 · 1 comment

Comments

@tylerjereddy
Copy link

I'm trying to benchmark PyTaco in various scenarios, and it would be most helpful to have viable PyPI releases per gh-525.

For example, when trying to compile from source on Ubuntu 22.04.2 LTS with Python 3.11.7 I run into errors that look related to maintenance issues with newer Python versions.

cmake -DCMAKE_BUILD_TYPE=Release -DPYTHON=ON ..
make -j 32

<snip>
/home/treddy/github_projects/taco/python_bindings/pybind11/include/pybind11/cast.h:448:64: error: expected primary-expression before ‘>’ token
  448 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
      |                                                                ^
/home/treddy/github_projects/taco/python_bindings/pybind11/include/pybind11/cast.h:448:66: error: expected primary-expression before ‘)’ token
  448 |                 handle(frame->f_code->co_name).cast<std::string>() + "\n";
      |                                                                  ^
/home/treddy/github_projects/taco/python_bindings/pybind11/include/pybind11/cast.h:449:26: error: invalid use of incomplete type ‘PyFrameObject’ {aka ‘struct _frame’}
  449 |             frame = frame->f_back;

<snip>

From the Python 3.11 release notes:

The PyFrameObject structure members have been removed from the public C API.

If there's no plan to support newer Python versions, it would probably make sense to have CMake upper bound that dependency and error out at build time more clearly. When assessing whether or not it makes sense to use PyTaco for certain applications, the ability to install it on modern Python versions with minimal hassle will obviously be a factor, but if there are no plans to maintain it I suppose you could just error out.

@tylerjereddy
Copy link
Author

If you update your pybind11 submodule to point to v2.12.0, you can fix the error, for example.

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

No branches or pull requests

1 participant