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

Unclear description of C++ ABI #16

Open
giordano opened this issue Jan 4, 2023 · 2 comments
Open

Unclear description of C++ ABI #16

giordano opened this issue Jan 4, 2023 · 2 comments
Labels
bug Something isn't working content PRs and issues related to content for a website

Comments

@giordano
Copy link

giordano commented Jan 4, 2023

It isn't very clear what the C++ ABI discussed in the Complex C++ dependencies page is. Since you mention "old" and "new" ABIs and refer to setting _GLIBCXX_USE_CXX11_ABI I presume you're talking about the libstdc++ dual std::string ABI, but that isn't intrinsic to the C++ language, rather to GCC's libstdc++ runtime, LLVM's libcxx library doesn't have this problem.

Another C++ ABI conflict may be the combination of different C++ runtime libraries (e.g. libstdc++ and libcxx), but that one doesn't seem to be explicitly addressed.

@h-vetinari
Copy link
Member

There's a bit more discussion ABI (including the std::string case) in https://pypackaging-native.github.io/background/binary_interface/, but yeah, the main C++ deps page should do better in distinguishing the various sources of ABI differences.

We should also include "changing your C++ standard library" in the list of ways to break ABI on the background page.

@rgommers rgommers added bug Something isn't working content PRs and issues related to content for a website labels Jan 5, 2023
@rgommers
Copy link
Member

rgommers commented Jan 5, 2023

I presume you're talking about the libstdc++ dual std::string ABI, but that isn't intrinsic to the C++ language, rather to GCC's libstdc++ runtime, LLVM's libcxx library doesn't have this problem.

Yes indeed. Good points, thanks. The text should make it explicit that the issue stems from the runtime, and that package authors have no control over runtime selection and have to write their code in a way that it builds with GCC/Clang/MSVC at least, and more compilers for the most widely used packages.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working content PRs and issues related to content for a website
Projects
None yet
Development

No branches or pull requests

3 participants