Skip to content
  • Emmanuele Bassi's avatar
    Fix the soname versioning for libgnome-desktop · 854cfe77
    Emmanuele Bassi authored
    
    
    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: default avatarEmmanuele Bassi <ebassi@gnome.org>
    854cfe77