Debian soname/suffix/0c2a/thingy overview?

This is a slightly modified version of my email to the maemo-developers list, in case a Debian person can clear this up for me:

When creating maemo packages, we will tend to take the debian or Ubuntu package and modify it for maemo. However, for C++ libraries, and maybe C libraries, the latest Debian or Ubuntu soname might not be appropriate.

In this context, the soname is the package suffix, such as 0c2a seen in the http://packages.debian.org/unstable/libs/libsigc++-2.0-0c2a>libsigc++ package.

I believe that these suffixes are changed whenever either

  • A new version of g++, with a new C++ ABI, is used.
  • A new version of libstdc++, with a new ABI, is used.
  • A new version of glibc, with a new ABI, is used.

I don’t know what the 0, c, 2, or a parts of the suffix mean, or if suffix is just changed arbitrarily. I can’t find an overview of these in the debian documentation, so I don’t know what might be an appropriate soname for maemo’s own mix of ABI.

6 thoughts on “Debian soname/suffix/0c2a/thingy overview?

  1. Libraries are usually named libfoo + SONAME, it may or may not match exactly the SONAME, but whent the SONAME or in general the ABI changes incompatibly, the package must be renamed and reverse dependencies rebuilt (to get the new dependency on the new package name). The same goes for the API and the -dev packages which must be renamed when the API changes incompatibly.

    Since it’s nice to keep the SONAME in the package name, the last time we had an ABI transition due to g++ 3.4, packages were renamed to libfoo + SONAME + c2a.

    On the next SONAME change, each package will return to libfoo + SONAME.

  2. 0 is the soname
    c2 is indicating that we’re using version 2 of the C++ ABI (was previously c102)
    a is indicating that we’re using a different, ABI-incompatible, allocator

    So, e.g., qt used to be libqt-mt3c102, for libqt-mt.so.3, version 1.02 of the ABI.

  3. > c2 is indicating that we’re using version 2 of the C++ ABI (was previously c102)

    Is that debian’s second C++ ABI, or some version of the g++ ABI that is commonly (also outside of debian) referred to as “second”? I mean, is there any meaningful way to reuse this on a debian derivative (maemo) that has no previous ABI, or do we need to invent our own suffixes?

  4. Someone pointed me at that email before, but I missed this important part that seems to answer part of my question:

    The C++ ABI has many names (no, actually only two). G++ 3.2/3.3 have
    the Version 1, 3.4/4.0 have the version 2. To get the ABI version:

    g++ -E -dM – < /dev/null | awk '/GXX_ABI/ {print $3}' Compilers with ABI version 1 print '102', those with version 2 print 1002. During the last C++ ABI transition package names were renamed from libfoo to libfooc102. So rename them to libfooc1002 this time? No, - if your package is called libfoo1, add the string ''c2'' to the package name (see below). - if your package is called libfoo1c102, then drop the ''c102'' from the package name (see below). "

Comments are closed.