-
Notifications
You must be signed in to change notification settings - Fork 96
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
build: enable use of versioned SONAME #2
Conversation
Most libraries are using a versioned SONAME to track API changes. When they don't, we usually use a SOVERSION of 0. When willing to commit to some API stability, SOVERSION and VERSION should be updated to more adequate values (VERSION could match the library version, assuming it follows the major.minor.patch convention and SOVERSION could be major.minor since CMake doesn't support libtool versioning scheme with age). With this change CMake will install the library as libcbor.so.0.0.0. libcbor.so.0 will be a symlink to the library for other applications, to be found with the dynamic linker. libcbor.so will be a symlink to libcbor.so.0 for use by the linker (ld).
For
The other way is to have something like this:
|
Thanks, @vincentbernat, I learned something new today :) This looks good enough to start with. I'm only vaguely familiar with libtool's conventions and I haven't really taken it into account since I find it quite difficult to work with when using build system other than autotools (correct me if I'm wrong). Is there any significant drawback to using the
approach? It seems like it would fit in nicely with semver |
build: enable use of versioned SONAME
As long as you think to at least increase the minor version when changing API, I think this is fine. |
* Remove out of date cppcheck suppressions; fix hook for deleted files * Stop using suppressions * Try adding custom findcmocka * Vain attempt to debug deps bs * Vain attempt to debug deps bs #2 * Deps BS: Try stealing a simpler travis setup * Deps BS: Add find module (facepalm) * GCC: Update sanitizer specs * CI: Add arm64 target * CI: Migrate rest of script * CI: Debug clang formaat * CI: Try different multine strings * CI: Explicitly install clangf8 * CI: Explicitly install clangf8 * CI: More clf8 tweaks * CI: Install cppcheck * CI: Fix YAML syntax * CI: Get rid of the qemu hack * CI: Build cmocka in a separte dir to avoid confusing cppcheck * CI: Fix format hook to find the right files * CI: Make format hook chatty in CI
Most libraries are using a versioned SONAME to track API changes. When
they don't, we usually use a SOVERSION of 0. When willing to commit to
some API stability, SOVERSION and VERSION should be updated to more
adequate values (VERSION could match the library version, assuming it
follows the major.minor.patch convention and SOVERSION could be
major.minor since CMake doesn't support libtool versioning scheme with
age).
With this change CMake will install the library as
libcbor.so.0.0.0. libcbor.so.0 will be a symlink to the library for
other applications, to be found with the dynamic linker. libcbor.so will
be a symlink to libcbor.so.0 for use by the linker (ld).