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 bindings don't compile with Clang #143

Open
Krzmbrzl opened this issue Sep 8, 2023 · 6 comments
Open

Python bindings don't compile with Clang #143

Krzmbrzl opened this issue Sep 8, 2023 · 6 comments

Comments

@Krzmbrzl
Copy link
Collaborator

Krzmbrzl commented Sep 8, 2023

When using clang to compile SeQuant, the Python bindings (enabled via the SEQUANT_PYTHON option) fail to compile with the error

In file included from /Data/home/user/Documents/Git/SeQuant/python/src/sequant/_sequant.cc:12:
In file included from /Data/home/user/Documents/Git/SeQuant/python/src/sequant/mbpt.h:11:
In file included from /Data/home/user/Documents/Git/SeQuant/python/src/sequant/python.h:4:
In file included from /Data/home/user/Documents/Git/SeQuant/build_clang/_deps/pybind11-src/include/pybind11/boost/container/small_vector.h:3:
In file included from /Data/home/user/Documents/Git/SeQuant/build_clang/_deps/pybind11-src/include/pybind11/boost/container/../../stl.h:12:
/Data/home/user/Documents/Git/SeQuant/build_clang/_deps/pybind11-src/include/pybind11/boost/container/../../pybind11.h:1010:9: error: no matching function for call to 'operator delete'
        ::operator delete(p, s);

There is an upstream bug report about this, that indicates that this has been fixed in pybind version >= 2.4.4.
However, you are using a custom fork and within that you seem to be on version 2.4.3, which still contains this error.

I tried the quick fix of pointing to version 2.5.0 in your fork, but then an include to something like pybind11/boost/container/small_vector fails to be resolved (from SeQuant's files). Thus, I am not entirely sure how you would want to proceed with this. I was also wondering why you were using a fork to begin with. It doesn't seem like you have made any kind of patches to pybind11 🤔

@asadchev
Copy link
Contributor

asadchev commented Sep 8, 2023 via email

@Krzmbrzl
Copy link
Collaborator Author

Krzmbrzl commented Sep 8, 2023

Thanks! I just saw that you have the master branch unpatched, but have your patches located in https://github.com/ValeevGroup/pybind11/tree/ValeevGroup/v2.4.3. That's why I thought your fork was unchanged.

Anyway, I don't yet need Python bindings - it's just something I stumbled upon and thought I'd let you know. It seems a bit more complicated for me to first update your fork via PR and then submit a PR to this repo once the fork as been updated, than if someone of you (with write access to the repos) patched this.
If you want me to create those PRs instead though, just let me know.

@asadchev
Copy link
Contributor

asadchev commented Sep 8, 2023 via email

@evaleev
Copy link
Member

evaleev commented Nov 8, 2023

@asadchev would it make sense to add pybind/pybind11@dc7bb5d to SeQuant directly?

@asadchev
Copy link
Contributor

asadchev commented Nov 9, 2023 via email

@evaleev
Copy link
Member

evaleev commented Dec 1, 2023

@Krzmbrzl switching to https://github.com/ValeevGroup/pybind11/tree/ValeevGroup/v2.11 should help

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

3 participants