apt does not declare all the symbols, others get auto-added with the most current version

Bug #1275787 reported by Philipp Kern on 2014-02-03
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
apt (Ubuntu)
Low
Unassigned
Nominated for Precise by Philipp Kern

Bug Description

(You can disregard the old version in this, that's just due to my environment. It also applies to the current version in precise.)

It seems that apt does not declare all the symbols it exports and does not fail on symbol file mismatches. Hence the new symbols are automatically added with the most current version used at time of build, even if they were already available previously. This means that if you fork apt on your system, you need to needlessly rebuild python-apt whenever it depends on a newer version in the base distribution. The obvious fix is to add all the symbols and fail whenever there is a mismatch and new ones popped up. Like this the symbols file is basically useless because you will always find some functions that need the most current version.

 _Z11SHA256_DataPKhmPc@Base 0.8.16~exp12ubuntu10.10
 _Z11SHA384_DataPKhmPc@Base 0.8.16~exp12ubuntu10.10
 _Z11SHA512_DataPKhmPc@Base 0.8.16~exp12ubuntu10.10
 _Z13SHA256_UpdateP11_SHA256_CTXPKhm@Base 0.8.16~exp12ubuntu10.10
 _Z13SHA384_UpdateP11_SHA512_CTXPKhm@Base 0.8.16~exp12ubuntu10.10
 _Z13SHA512_UpdateP11_SHA512_CTXPKhm@Base 0.8.16~exp12ubuntu10.10
 _Z19GetListOfFilesInDirRKSsb@Base 0.8.16~exp12ubuntu10.10
 _Z22IsDuplicateDescriptionN8pkgCache12DescIteratorERK12HashSumValueILi128EERKSs@Base 0.8.16~exp12ubuntu10.10
 _Z31StartsWithGPGClearTextSignatureRKSs@Base 0.8.16~exp12ubuntu10.10
 _Z6SigINTi@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgCacheGenerator14MergeListGroupERNS_10ListParserERKSs@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgCacheGenerator16MergeListPackageERNS_10ListParserERN8pkgCache11PkgIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgCacheGenerator16MergeListVersionERNS_10ListParserERN8pkgCache11PkgIteratorERKSsRPNS2_11VerIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgCacheGenerator18AddImplicitDependsERN8pkgCache11GrpIteratorERNS0_11PkgIteratorERNS0_11VerIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgCacheGenerator18AddImplicitDependsERN8pkgCache11VerIteratorERNS0_11PkgIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgPackageManager10SigINTStopE@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgPackageManager11SmartUnPackEN8pkgCache11PkgIteratorEbi@Base 0.8.16~exp12ubuntu10.10
 _ZN17pkgPackageManager14SmartConfigureEN8pkgCache11PkgIteratorEi@Base 0.8.16~exp12ubuntu10.10
 _ZN23SummationImplementation5AddFDER6FileFdy@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper14canNotFindTaskEPNS_25PackageContainerInterfaceER12pkgCacheFileSs@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper15canNotFindRegExEPNS_25PackageContainerInterfaceER12pkgCacheFileSs@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper16canNotFindAllVerEPNS_25VersionContainerInterfaceER12pkgCacheFileRKN8pkgCache11PkgIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper17canNotFindPackageEPNS_25PackageContainerInterfaceER12pkgCacheFileRKSs@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper17showTaskSelectionERKN8pkgCache11PkgIteratorERKSs@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper18showRegExSelectionERKN8pkgCache11PkgIteratorERKSs@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper19showSelectedVersionERKN8pkgCache11PkgIteratorENS1_11VerIteratorERKSsb@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper21canNotFindCandInstVerEPNS_25VersionContainerInterfaceER12pkgCacheFileRKN8pkgCache11PkgIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT14CacheSetHelper21canNotFindInstCandVerEPNS_25VersionContainerInterfaceER12pkgCacheFileRKN8pkgCache11PkgIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE14setConstructorERKNS_25PackageContainerInterface11ConstructorE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE5clearEv@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE6insertERKS3_@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE14setConstructorERKNS_25PackageContainerInterface11ConstructorE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE5clearEv@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE6insertERKS3_@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE5clearEv@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE6insertERKS3_@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25PackageContainerInterface10FromStringEPS0_R12pkgCacheFileRKSsRNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25PackageContainerInterface15FromCommandLineEPS0_R12pkgCacheFilePPKcRNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25PackageContainerInterface23FromModifierCommandLineERtPS0_R12pkgCacheFilePKcRKSt4listINS0_8ModifierESaIS8_EERNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25PackageContainerInterface8FromNameER12pkgCacheFileRKSsRNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25PackageContainerInterface8FromTaskEPS0_R12pkgCacheFileSsRNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25PackageContainerInterface9FromRegExEPS0_R12pkgCacheFileSsRNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25VersionContainerInterface10FromStringEPS0_R12pkgCacheFileSsRKNS0_7VersionERNS_14CacheSetHelperEb@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25VersionContainerInterface11FromPackageEPS0_R12pkgCacheFileRKN8pkgCache11PkgIteratorERKNS0_7VersionERNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25VersionContainerInterface15FromCommandLineEPS0_R12pkgCacheFilePPKcRKNS0_7VersionERNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25VersionContainerInterface15getCandidateVerER12pkgCacheFileRKN8pkgCache11PkgIteratorERNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25VersionContainerInterface15getInstalledVerER12pkgCacheFileRKN8pkgCache11PkgIteratorERNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN3APT25VersionContainerInterface23FromModifierCommandLineERtPS0_R12pkgCacheFilePKcRKSt4listINS0_8ModifierESaIS8_EERNS_14CacheSetHelperE@Base 0.8.16~exp12ubuntu10.10
 _ZN4EDSP20WriteLimitedScenarioER11pkgDepCacheP8_IO_FILERKN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS8_ESaIS8_EEEEP10OpProgress@Base 0.8.16~exp12ubuntu10.10
 _ZN4EDSP30WriteScenarioLimitedDependencyER11pkgDepCacheP8_IO_FILERKN8pkgCache11PkgIteratorERKNS4_11VerIteratorERKN3APT16PackageContainerISt3setIS5_St4lessIS5_ESaIS5_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd14OpenDescriptorEijNS_12CompressModeEb@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd14OpenDescriptorEijRKN3APT13Configuration10CompressorEb@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd16ModificationTimeEv@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd20OpenInternDescriptorEjRKN3APT13Configuration10CompressorE@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd4OpenESsjNS_12CompressModeEm@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd4OpenESsjRKN3APT13Configuration10CompressorEm@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd4gzFdEv@Base 0.8.16~exp12ubuntu10.10
 _ZN6FileFd8ReadLineEPcy@Base 0.8.16~exp12ubuntu10.10
 _ZN6Hashes5AddFDER6FileFdybbbb@Base 0.8.16~exp12ubuntu10.10
 _ZNK12HashSumValueILi160EEcvSsEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK22OptionalSubIndexTarget10IsSubIndexEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE14const_iterator6getPkgEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE14getConstructorEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE5emptyEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE14const_iterator6getPkgEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE14getConstructorEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE5emptyEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE5emptyEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE8iterator6getVerEv@Base 0.8.16~exp12ubuntu10.10
 _ZNK8pkgCache11DepIterator11IsIgnorableERKNS_11PkgIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZNK8pkgCache11DepIterator11IsIgnorableERKNS_11PrvIteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZSt11max_elementIN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS4_EEE8iteratorE16CompareProvidersET_SA_SA_T0_@Base 0.8.16~exp12ubuntu10.10
 _ZTI22OptionalSubIndexTarget@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE8iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT25PackageContainerInterface14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT25PackageContainerInterfaceE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT25VersionContainerInterface14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTIN3APT25VersionContainerInterfaceE@Base 0.8.16~exp12ubuntu10.10
 _ZTS22OptionalSubIndexTarget@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE8iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT25PackageContainerInterface14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT25PackageContainerInterfaceE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT25VersionContainerInterface14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTSN3APT25VersionContainerInterfaceE@Base 0.8.16~exp12ubuntu10.10
 _ZTV22OptionalSubIndexTarget@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEE14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT16PackageContainerISt3setIN8pkgCache11PkgIteratorESt4lessIS3_ESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEE14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT16PackageContainerISt4listIN8pkgCache11PkgIteratorESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEE8iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT16VersionContainerISt4listIN8pkgCache11VerIteratorESaIS3_EEEE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT25PackageContainerInterface14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT25PackageContainerInterfaceE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT25VersionContainerInterface14const_iteratorE@Base 0.8.16~exp12ubuntu10.10
 _ZTVN3APT25VersionContainerInterfaceE@Base 0.8.16~exp12ubuntu10.10

David Kalnischkies (donkult) wrote :

I try to update the symbols files regularly, but I admit that I don't do it often (enough) and others aren't particularly better. Looks like the version which ended up in ubuntu was particularly bad in this regard.

Well maintained c++ libraries are already hard to write a symbols file for as Russ summarized a while ago [0]. The policy helpfully says that it might not be a good idea for c++ at all. libapt adds to the pain as it isn't very good from a maintain-view: It isn't versioned, visibility isn't controlled, … Should I mention that a way to big part of the symbols file deals with different gcc versions creating different symbols? (which are of course symbols nobody cares about in the end). Failing the package build basically means we need to build apt at least two times with each upload: First with the first try and the second one with a symbols file we collected from all the failures. In the hope that we haven't forgotten one/hit another gcc version in the next try… a lot of work for the buildd, new ports and last but not least for an already understaffed apt team.

Personally, I hope we can be better in the future with maintaining it, but in the end the current state is at least a bit better than shlibs in so far as it is likely that we will forget to update this one as well which exposes users to bad things if they partial-upgrade/frontend forgets to enforce a higher version for the new symbol it uses.

Or in other words: Great, we have a volunteer taking care of maintaining it! SCNR ;)

[0] http://www.eyrie.org/~eagle/journal/2012-01/008.html

Changed in apt (Ubuntu):
status: New → Triaged
importance: Undecided → Low
Julian Andres Klode (juliank) wrote :

I think we have gotten better at this, but it seems pointless to constantly keep a bug open here. When we add a new symbol it is usually not used by anything and it will eventually get added to the file.

If there are any specific instances where packages use new symbols we do not declare, file a bug about these specific issues.

Changed in apt (Ubuntu):
status: Triaged → Invalid
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers