My system has libgmp.so.10.2.0 while official source says current version is 6.1.2.

Is this specific to GMP? Would having libgmp.so.42.0.0 be OK?

Debian adds another number "2" to the mix (ignoring patches).

libgmp10:amd64  2:6.0.0+dfsg-6
  • 1
    That's a libtool version, which is usually unrelated to the library's release version. Dec 24 '16 at 21:25
  • How can I get interface number, revision and age then?
    – sevo
    Dec 24 '16 at 21:32
  • 2
    This is not a duplicate, this question is about the number "10" in the libary (and Debian package) name.
    – sevo
    Dec 24 '16 at 21:40
  • 1
    It is a duplicate, 10 is part of the soname (it's the major version). Dec 24 '16 at 21:48
  • 1
    I agree that it's not a duplicate and the answers to the other question do not answer this question at all. @ThomasDickey's answer does! Dec 24 '16 at 22:02

You're referring to the libtool version, which is usually unrelated to the library's release version.

A quick look at the sources would show you that the versions are set in Makefile.am, with a comment-block preceding the values giving a summary of the history.

Here's a chunk where you'll see the numbers of the Debian package (version info for libmp is in the last column):

#       release   libgmp  libgmpxx libmp 
#        5.0.1   10:1:0    6:1:2   4:21:1 
#        5.0.2   10:2:0    6:2:2   4:22:1 
#        5.0.3   10:3:0    6:3:2   4:23:1 
#        5.0.4   10:4:0    6:4:2   4:24:1 
#        5.0.5   10:5:0    6:5:2   4:25:1 
#        5.1.0   11:0:1    7:0:3     - 

and (current)

#        6.1.2   13:2:3    9:2:5     - 


# We interpret "implementation changed" in item "1." above as meaning any 
# release, ie. the REVISION is incremented every time (if nothing else). 
# Even if we thought the code generated will be identical on all systems, 
# it's still good to get the shared library filename (like 
# libgmpxx.so.3.0.4) incrementing, to make it clear which GMP it's from. 

LIBGMP_LT_AGE        = 3

  • A link to Makefile.am, if available, would be helpful. And some elaboration would also be useful. For example, some explanation of the meaning of CURRENT, REVISION, AGE. Finally, this doesn't seem to agree with the OPs observation. He said 6.1.2 corresponds to 10:2:0, but in your table it seems to correspond to 13:2:3. Disclaimer: it's the middle of the night here, so I may not be with it. Regardless, a little more explanation would not hurt. Dec 24 '16 at 22:29
  • It's related to the information given to libtool, since that is used to calculate the soname. But the number used in the library and package name is the soname, nothing else. Dec 26 '16 at 22:17

Debian policy requires changing package name whenever SONAME changes (as others correctly pointed out the relationship to version numbers). The interface number is 10 in releases 5.0.x so it's a good idea to make it part of the package name.

Note that release 5.1.0 has age = 1 which means it could "provide" both interface numbers 10 and 11. Not sure whether Debian actually does this.

  • from the same link: "Normally, the run-time shared library and its SONAME symlink should be placed in a package named librarynamesoversion, where soversion is the version number in the SONAME of the shared library_... Dec 24 '16 at 22:25

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.