Opened 10 years ago
Closed 10 years ago
#41 closed defect (fixed)
libtool: DLL version suffix doesn't follow version-info idea
Reported by: | Silvan Scherrer | Owned by: | |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | libtool | Version: | |
Severity: | Keywords: | ||
Cc: |
Description
in the dll creation stage we add the $current number to the dll name. but when i read the docs https://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html it seems we should do $current - $age
Change History (6)
comment:1 by , 10 years ago
Component: | *none → libtool |
---|
comment:2 by , 10 years ago
comment:3 by , 10 years ago
Summary: | libtool → libtool: DLL version suffix doesn't follow version-info idea |
---|
comment:4 by , 10 years ago
I also checked binary builds of other software on Linux (like curl, expat): all use subtraction to get the major DLL version number. Or, to be exact, the mapping between version-info
and the full DLL suffix is as follows: name.so.(current-age).age.revision
. In our case it must be only current-age
(i.e. the major number which is responsible for backward compatibility). This is also proven by reading ltmain.m4sh (around line 6750).
comment:5 by , 10 years ago
I fixed the problem in r891. The RPM packages are now being rebuilt and will be uploaded shortly.
Note that we will also have to rebuild at least curl
and expat
packages since they already got wrong version numbers (just $current). There is a potential problem with the CURL DLL because Yuri also missed the -version-info
logic when manually hacking the CURL makefiles back then so his DLL was named curl7.dll
. This is wrong. The correct name is curl4.dll
. All packages using it will have to be rebuilt. The list is quite big, a quick search across all .spec files gives: clamav
, git
, liboauth
, openssh
, rpm
, rpm48
. I will ask Yuri to assist me here.
comment:6 by , 10 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
This article sheds some light on the
-version-info
magic: https://www.sourceware.org/autobook/autobook/autobook_91.html. From it it's pretty clear what theage
part in thecurrent:revision:age
scheme actually means. It's the number of previous interfaces starting from the current one that the current one also supports (i.e. is backward compatible). So if we have, say,6:0:3
it means that the current interface 6 is backward compatible with interfaces 5, 4 and 3. So if we want to express this in terms of binary DLL compatibility on OS/2 (where a number is used to differentiate between incompatible DLLs), we should indeed subtractage
fromcurrent
to get an number that uniquely identifies incompatible ABIs. So in case of the above example this will be number 3.The unusual thing here is that when the ABI changes so that backward compatibility is broken (by e.g. removing or changing APIs), many projects usually set
current
to a value which is greater by 1 than the last value ofcurrent
that it had whenage
was 0. On a straight line this looks likecurrent
goes backwards (gets decreased), but what is surely increased in this case (by 1) is the difference betweencurrent
andage
.So, for example in poppler we will see this: http://trac.netlabs.org/ports/log/poppler/vendor/current/qt4/src/Makefile.am?rev=889:
And so on.
I will change libtool in the next days as it's important (used in many projects now).