[gnome-desktop] Fix the soname versioning for libgnome-desktop
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-desktop] Fix the soname versioning for libgnome-desktop
- Date: Wed, 12 Sep 2018 11:56:11 +0000 (UTC)
commit 854cfe77cdc62206a619986a97391b59a2464a21
Author: Emmanuele Bassi <ebassi gnome org>
Date: Sat Sep 8 12:34:57 2018 +0100
Fix the soname versioning for libgnome-desktop
With Meson, using the `soversion` argument of a library() target means
setting the explicit soname, e.g.:
soversion: 17.0.2
will be used to generate:
libgnome-desktop-3.so.17.0.2
Unlike libtool, though, Meson will not generate the symbolic links for
the first component of the soversion:
libgnome-desktop-3.so.17
Which is what the dynamic linker will actually use to resolve the
library dependency at link time.
In order to get a symbolic link, we need to use the `version` field for
the soname, and the `soversion` field for the first component:
version: '17.0.2'
soversion: '17'
To avoid having to manually set two fields, we can generate the
`soversion` value from the `version` one, so that they will always be in
sync.
This fixes the build of gnome-shell on Continuous, which has been
failing since gnome-desktop has been moved to Meson with the error:
ld: warning: libgnome-desktop-3.so.17, needed by /usr/lib/libmutter-3.so,
not found (try using -rpath or -rpath-link)
Signed-off-by: Emmanuele Bassi <ebassi gnome org>
libgnome-desktop/meson.build | 1 +
meson.build | 8 +++++---
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/libgnome-desktop/meson.build b/libgnome-desktop/meson.build
index 4bc7bdb8..75bfee2a 100644
--- a/libgnome-desktop/meson.build
+++ b/libgnome-desktop/meson.build
@@ -85,6 +85,7 @@ libgnome_desktop = library('gnome-desktop-3',
libgnome_desktop_sources,
dependencies: [gnome_desktop_deps, m_dep, rt_dep, x_dep],
soversion: soversion,
+ version: libversion,
c_args: libargs,
install: true
)
diff --git a/meson.build b/meson.build
index 9b10bbf7..c30395e0 100644
--- a/meson.build
+++ b/meson.build
@@ -4,15 +4,17 @@ project('gnome-desktop', 'c',
license: ['GPL2+', 'LGPL2+']
)
-# Before making a release, the soversion string should be modified.
-# The string is of the form C.A.R.
+# Before making a release, the libversion string should be modified.
+# The string follows the libtool versioning scheme, and it is of the
+# form `C.A.R`.
# - If interfaces have been changed or added, but binary compatibility has
# been preserved, change to C+1.A+1.0
# - If binary compatibility has been broken (eg removed or changed interfaces)
# change to C+1.0.0
# - If the interface is the same as the previous version, change to C.A.R+1
-soversion = '17.0.2'
+libversion = '17.0.2'
+soversion = libversion.split('.')[0]
gdk_pixbuf_req = '>= 2.36.5'
gtk_req = '>= 3.3.6'
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]