[Development] Summary ABI compabilty

Olivier Goffart olivier at woboq.com
Fri Nov 25 13:03:21 CET 2016


On Freitag, 25. November 2016 10:51:06 CET Giuseppe D'Angelo wrote:
> On Fri, Nov 25, 2016 at 1:37 AM, Kevin Kofler <kevin.kofler at chello.at> 
wrote:
> > libstdc++ now has a sub-ABI-version that was already bumped recently for
> > better C++11 compliance. It can be bumped again, without even changing the
> > soname, and all libraries using the std:: types in their APIs will have a
> > broken ABI.
> 
> Out of curiosity, why does a ABI break not incur in a soname change?

Because they would use a new abi tag or new inline namespace and so they would 
technically not break their ABI. (As the symbols in the old namespace or 
without the abi tag would still be present in the binary)

However, if a library (such as Qt) made use of the standard library in their 
interface, they would only contain one set of symbols (with the new or the old 
tag, but not both). Therefore, the applications have to be build with the same 
standard library abi tag than all libraries.

It's a bit unfortunate that this happens like that. But, we should ask:

- How often will it happen in the future? They only change the binary 
compatibility if they have a very good reason to do so. Last time it was 
required in the GNU's libstdc++ because of a change in C++11 (which specified 
things that were left unspecified before). The standard committee is not 
easily accepting changes that force implementer to break binary compatibility. 
So perhaps not more than once every 6 years. (conservative estimate)

- Why would Qt be different than all the other libraries that uses the 
standard library?  I mean, when the gcc break happened last year, most C++ 
applications and libraries had to be rebuilt anyway. Should Qt ABI depends on 
the stl, how big is the set of dependencies that would not need to be rebuilt 
compared to the amount of package that anyway need to be rebuilt?

So considering these two points, it should not happen often and most packages 
would anyway need to be recompiled.

-- 
Olivier

Woboq - Qt services and support - https://woboq.com - https://code.woboq.org




More information about the Development mailing list