cmake: give cachelib_nvmitem a SOVERSION like the other libraries - #500
Open
michel-slm wants to merge 1 commit into
Open
michel-slm wants to merge 1 commit into
michel-slm wants to merge 1 commit into
Conversation
cachelib_nvmitem was split out of cachelib_allocator to break a cycle with cachelib_navy, but it was not added to the list of targets that get SOVERSION/VERSION when BUILD_SHARED_LIBS is on. It is the only installed library that ends up as an unversioned libcachelib_nvmitem.so, which distribution packaging treats as a development symlink. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Signed-off-by: Michel Lind <salimma@fedoraproject.org>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
cachelib_nvmitemwas split out ofcachelib_allocatorto break a dependency cycle withcachelib_navy, but it was never added to theset_target_properties(... SOVERSION VERSION)list that the other seven libraries are in. WithBUILD_SHARED_LIBS=ONit is the only installed library without a soname, a barelibcachelib_nvmitem.sothatlibcachelib_allocator.so.19then depends on by that unversioned name. Distribution packaging treats an unversioned.soas a development symlink and strips it from runtime packages, which would break the allocator library at load time; and the soname bump on a major version change would never reach it.One line: add
cachelib_nvmitemto the list.Before
From a getdeps
--shared-libbuild on Fedora Rawhide aarch64, the link inputs ofbinary_trace_gen:After
Same build with this patch, installed tree (Fedora package
cachelib-19^20260918.38gitee4c153):and the consumers'
DT_NEEDEDnow readslibcachelib_nvmitem.so.19()(64bit)alongside the other seven sonames.🤖 Generated with Claude Code