Bumping SOVERSION
Christophe Giboudeaux
christophe at krop.fr
Sat Mar 16 11:48:40 GMT 2019
Hi,
On vendredi 15 mars 2019 21:41:01 CET Sandro Knauß wrote:
> [cut]
>
> > We break each month for some lib.
> > I don't want to have a .so.15 in 1 years...
>
> nope. We do not release every month We release a new major version every 4
> months! But what you have against a so.15? There is nothing why you should
> be afraid of an so.15. see answers to dan for more details.
>
Quoting Sune [1]:
« Having a libfoo.so > libfoo.so.0 > libfoo.so.4.3.1 chain is just confusing
and bad and going to bother the future you (when you reach SONAME 4). »
At dfaure's request a couple months ago, I wrote a basic ECM script that could
help. The goal was to partially copy Qt's Foo.version behaviour (see eg. src/
corelib/QtCore.version* in qtbase).
The macro only provides a list of versions to use at link time. The result is
there:
https://build.opensuse.org/package/live_build_log/home:cgiboudeaux:ECM_POC/
karchive/openSUSE_Factory/x86_64
"[ 68s] Provides: libKF5Archive.so.5()(64bit) libKF5Archive.so.
5(KF5Archive_5)(64bit) libKF5Archive.so.5(KF5Archive_5.0)(64bit)
libKF5Archive.so.5(KF5Archive_5.1)(64bit) libKF5Archive.so.5(KF5Archive_5.10)
(64bit) ..."
and the POC can be found here: https://build.opensuse.org/package/view_file/
home:cgiboudeaux:ECM_POC/extra-cmake-modules/test.patch?expand=1
The issues I had (I didn't touch it since months, my memory may fail):
- I didn't write tests to check the behaviour,
- I'm not sure it's useful in its current form,
- Adding yet another line to the CMakeLists.txt is needed,
- it only works with GNU's ld (it's using the '-Wl,--version-script'
parameter)
In Qt's code, the private headers are also parsed to append the symbols names
to the link file.
Perhaps the Qt6 CMake port already has something we could use.
[1] https://pusling.com/blog/?p=352#comment-13279
More information about the kde-pim
mailing list