Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider properly versioning the SONAME of the library #15

Open
charles2910 opened this issue Oct 15, 2024 · 0 comments
Open

Consider properly versioning the SONAME of the library #15

charles2910 opened this issue Oct 15, 2024 · 0 comments

Comments

@charles2910
Copy link

charles2910 commented Oct 15, 2024

Hi, first of all, thanks for developing AML!

There are many projects using it nowadays such neatvnc, weston and wayvnc. This means these projects rely on AML's ABI and so do distro maintainers to guarantee proper transitions when there is an ABI change. Currently, AML defines a fixed version: '0.0.0', in the library() section of meson.build. This in turn makes meson set the SONAME of the library as the major version of the version string which is always 0.

This complicates things for reverse-dependencies and distros, because one breaking change can be introduced in AML without bumping the SONAME and all of the sudden the reverse dependencies compiled against an older version of the library will stop working. On distros, we rely on the SONAME to not rebuilding every reverse-dependency when a new (backwards-compatible - therefore the same SONAME) of a library is available.

So, in the end I'd like to see AML managing the SONAME properly. Ideally, it would stick to the major version while it's backwards-compatible, and bump it when a backwards-incompatible change is introduced (removal of public functions, changes on public available structs, etc.). The patch below does this:

diff --git a/meson.build b/meson.build
index 111716d..a2cdb0a 100644
--- a/meson.build
+++ b/meson.build
@@ -74,7 +74,7 @@ dependencies = [
 aml = library(
        'aml',
        sources,
-       version: '0.0.0',
+       version: meson.project_version(),
        dependencies: dependencies,
        include_directories: inc,
        install: not is_static_subproject,

Mind that it will only bump the SONAME when bumping AML's major version.

If instead you don't want to guarantee ABI compatibility between versions, you can bump the SONAME on every new version:

diff --git a/meson.build b/meson.build
index 111716d..0a0cba9 100644
--- a/meson.build
+++ b/meson.build
@@ -74,7 +74,8 @@ dependencies = [
 aml = library(
        'aml',
        sources,
-       version: '0.0.0',
+       version: meson.project_version(),
+       soversion: meson.project_version(),
        dependencies: dependencies,
        include_directories: inc,
        install: not is_static_subproject,

Cheers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant