Re:OpenBSD 5.9
by cm3 on Friday April 15, 2016 @10:05PM
(#11508954)
OpenBSD isn't the only system that's avoided gcc5 due to the breaking C++ ABI changes.
[ Parent
| on HN ]
Which bring lots of fun when trying to use binary builds of Swift, for example.
Do you mean linking C++ .so built by gcc5?
No just plain Swift.
For example the binaries for Ubuntu 14.04 don't work if the newer GCC is already installed.
Swift compiler will fail to find the modules due to an ABI error as it will interpret the function call results from libstd++ as failure.
The workaround is to re-compile everything with the new version.
I don't know much about Swift, so please excuse my ignorance. Are these modules .so files, written in C++, linked by the system CXX (gcc5), and therefore unusable by Swift which was linked with Clang itself, or what's the technical explanation?
The Swift runtime library is currently partially written in C++.
I see, and in what scenario does it try to load a C++ .so built with gcc4? I'm sure this happens, but I'm curious what scenario it is on a distro where stuff shouldn't be partially built with g++4 and other stuff with g++5. I ran into the issues and am interested in the details as a way to avoid it myself.
This is the bug: