Replies: 1 comment 1 reply
-
nanobind is currently unnecessarily strict. It will be fixed by #788. I am waiting for PR pybind/pybind11#5439 to wrap up so that nanobind can match pybind11's behavior. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
I'm curious about the limitations of ABI/compiler compatibility.
I'm working on a project utilizing a "plugin" architecture, where there is a base project and plugin projects will inherit from C++ types from the base project and build modules that interact with the base project. All shared types and plugin modules are nanobind extensions. And I want to deploy manylinux wheels to pypi.org.
I find that I can get everything to work exactly how I want, provided that plugins use the same compiler version as what the base project's wheel was built with. For example, if I build a manylinux_2_28 wheel (gcc13) for the base project, I have to use gcc13 when building a plugin wheel locally, or I have to build and install a matching manylinux_2_28 wheel using cibuildwheel. If the compiler doesn't match, I get "TypeError...incompatible function arguments..." when I try to pass objects between different extensions. I did this comparison using Ubuntu22.04 using the default gcc11 and installing gcc13, and using Ubuntu24.04 with the default gcc13. I'm using python3.12, stable_abi, and nb_static.
The nanobind docs mention gcc/clang compatibility issues, but is this essentially an unsolvable issue due to variations between gcc versions? Or is this a libc++ version issue? Is there any way I can make my project compatible across different versions of gcc or different manylinux images? It would be nice if I didn't need to impose a compiler restriction on plugin developers.
But ultimately, gcc13/ubuntu24 should be easily obtainable for developers, and my project is otherwise accessible by building the base project from source or building plugins with cibuildwheel. So I don't really see this as a big problem. I'm just curious if there's anything different that I can do or if this is just how it is. Thanks.
Beta Was this translation helpful? Give feedback.
All reactions