Why does rpm built not able to find the library from the system?
Issue
- Create a package
foov1 containing a shared library (/usr/local/lib/libfoo.so) which does not set thesoname - Create a package bar using this shared library
# rpm -qRp bar.rpm | grep foo
libfoo.so
- Create a new version of package
foov2 where the shared library now sets thesonameand is installed as a symbolic link from/usr/local/lib/libfoo.soto/usr/local/lib/libfoo.so.1 - The
barprogram built against the original verson oflibfoocan find it regardless of whether the old or new version is installed. - However, installation of
barwhenfoov2 is installed fails dependency checking.
error: Failed dependencies:
libfoo.so is needed by bar
- Likewise an upgrade from
foov1 to foo v2 will fail for the same reason. - One needs to recompile (relink)
baragainstlibfoo.so.1. - Shall
rpmshould not understand thatlibfoo.sois inclusive oflibfoo.so.1when checking dependencies. - That is, the behavior of
rpmshould match the behavior of the OS.
Environment
- Red Hat Enterprise Linux 7
rpm-build
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
