Commit 854cfe77 authored by Emmanuele Bassi's avatar Emmanuele Bassi

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:

Unlike libtool, though, Meson will not generate the symbolic links for
the first component of the soversion:

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

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:, needed by /usr/lib/,
    not found (try using -rpath or -rpath-link)
Signed-off-by: default avatarEmmanuele Bassi <>
parent 97db725e
Pipeline #29415 passed with stage
in 2 minutes and 11 seconds
......@@ -85,6 +85,7 @@ libgnome_desktop = library('gnome-desktop-3',
dependencies: [gnome_desktop_deps, m_dep, rt_dep, x_dep],
soversion: soversion,
version: libversion,
c_args: libargs,
install: true
......@@ -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'
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment