View previous topic :: View next topic |
Author |
Message |
jwdonal n00b
Joined: 17 Sep 2009 Posts: 10
|
Posted: Wed Sep 18, 2019 8:09 pm Post subject: Difference between library file version and library version? |
|
|
I have been using linux for ages but I don't know the answer to this question and Google was not being helpful (possibly because I'm not using the proper terminology?).
I was dealing with a library dependency issue for a program when I came up with the following question.
What is the difference between the library version number appended to the .so files and the version of the library itself? Moreover, why do they not match?
For one example, I have libfreetype6 library installed. The .so file that is linked to is:
/usr/lib/libfreetype.so.6 -> libfreetype.so.6.16.1
So the version is 6.16.1......but it's really not. Because the actual version of libfreetype that is installed is 2.9.1-r3.
There is no freetype version 6.16.1 on the freetype.org website. The latest on the website is 2.10.1.
So will/can someone please tell me why there are two different version numbers?
Why wouldn't the .so file just be named libfreetype.so.2.9.1??? That would make much more sense to me.
And this is not specific to the freetype library either, it seems to be prevalent across many (all?) libraries.
Where do the 6.16.1 numbers come from? Who decides what these numbers are? Are they even related to the 2.9.1 library version at all or do they reference something totally different? Perhaps the C library version that the freetype source was compiled with or something?
Could someone please enlighten me? It's really bugging me that I don't know this.
Thanks! |
|
Back to top |
|
|
ct85711 Veteran
Joined: 27 Sep 2005 Posts: 1791
|
Posted: Wed Sep 18, 2019 9:01 pm Post subject: |
|
|
Version numbering in general is a complete jumbled mess as a whole, to where you shouldn't be too worried about the version numbers too closely. Some of the times, the library version does not follow what the package (the overall project's versioning). Other times, you get some projects that decide to change versioning schemes later on (like going from being on version 12, then version being version 3). There is some cases, where some projects change a library but don't change the library versioning, so it really breaks anything that links to those libraries). |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Wed Sep 18, 2019 11:03 pm Post subject: |
|
|
jwdonal wrote: |
So the version is 6.16.1......but it's really not. Because the actual version of libfreetype that is installed is 2.9.1-r3.
There is no freetype version 6.16.1 on the freetype.org website. The latest on the website is 2.10.1. |
There is ABI (binary compatbility is 6.16.1) and API (source code compatibility is 2.10.1)
It written in the Makefile (or in the file used to generate the Makefile) released upstream
https://github.com/aseprite/freetype2/blob/master/CMakeLists.txt
Code: |
project(freetype C)
set(VERSION_MAJOR "2")
set(VERSION_MINOR "10")
set(VERSION_PATCH "0")
# SOVERSION scheme: CURRENT.AGE.REVISION
# If there was an incompatible interface change:
# Increment CURRENT. Set AGE and REVISION to 0
# If there was a compatible interface change:
# Increment AGE. Set REVISION to 0
# If the source code was changed, but there were no interface changes:
# Increment REVISION.
set(LIBRARY_VERSION "6.16.0")
set(LIBRARY_SOVERSION "6")
|
exactly who decides the number upstream is probably a mistery that only git log can solve:-) _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
jwdonal n00b
Joined: 17 Sep 2009 Posts: 10
|
Posted: Wed Sep 18, 2019 11:07 pm Post subject: thank you! |
|
|
Quote: | There is ABI (binary compatbility is 6.16.1) and API (source code compatibility is 2.10.1) |
AHA! This is what I wanted to know! Eureka! Thank you so much!! |
|
Back to top |
|
|
|