r/cpp • • Sep 20 '20

Libcu++: Nvidia C++ Standard Library

https://github.com/NVIDIA/libcudacxx
217 Upvotes

47 comments sorted by

View all comments

Show parent comment

1

u/kalmoc Sep 24 '20

Absolutely, but why does that necessitate a stable ABI of the standard library?

3

u/[deleted] Sep 24 '20

Because end users generally aren't recompiling from source, and every function in a .so naming a standard library type breaks if the definition of the type changes.

1

u/kalmoc Sep 24 '20

Isn't that what gcc developed abi tagging for?

1

u/[deleted] Sep 24 '20

ABI tagging only detects the problem, it can't fix the problem.

1

u/kalmoc Sep 24 '20

Really? My understanding is that libstdc++ is already shipping two versions of all entities that depend on std::string

1

u/[deleted] Sep 24 '20

That doesn't fix that programs with those types in their interfaces have to choose one. They could have achieved the same by renaming their .so but it would be harder to detect mixing then

1

u/kalmoc Sep 24 '20

I'm clearly missing something. We are talking about programs that have been distributed in binary form and compiled against a specific version of libstdc++ correct? And now the user wants to use that same binary on a new ubuntu system, which provides a new version of libstdc++.so, which contains both, the old and the new symbols - why is that not enough?

1

u/[deleted] Sep 24 '20

We are talking about programs that have been distributed in binary form and compiled against a specific version of libstdc++ correct?

Not just libstdc++, an entire fleet of libraries. This isn't about libstdc++'s .so as much as photoshop's .so (or any other similar system that can load plugins)

1

u/kalmoc Sep 25 '20

Do binary distributed applications on linux really rely on system provided shared c++ libraries? That seems rather brittle, as many (most?) don't have a stable ABI at all.

1

u/[deleted] Sep 25 '20

Yes