Bug 1249325 - gdb recommends librpm.so.3
Summary: gdb recommends librpm.so.3
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
Depends On:
TreeView+ depends on / blocked
Reported: 2015-08-01 15:29 UTC by Zbigniew Jędrzejewski-Szmek
Modified: 2015-08-02 07:40 UTC (History)
6 users (show)

Fixed In Version: gdb-
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-08-01 19:12:34 UTC
Type: Bug

Attachments (Terms of Use)
patch to detect current librpm.so version automatically (1.43 KB, patch)
2015-08-01 23:08 UTC, Zbigniew Jędrzejewski-Szmek
no flags Details | Diff

System ID Private Priority Status Summary Last Updated
Red Hat Bugzilla 1249326 0 unspecified CLOSED gdb still recommends yum 2021-02-22 00:41:40 UTC

Internal Links: 1249326

Description Zbigniew Jędrzejewski-Szmek 2015-08-01 15:29:57 UTC
Description of problem:
I was using gdb on rawhide, and noticed the following messages:

warning: Unable to open "librpm.so.3" (librpm.so.3: cannot open shared object file: No such file or directory), missing debuginfos notifications will not be displayed

gdb seems to want to use librpm.so.3, but there was an SO bump and I have /usr/lib64/librpm.so.7. Packages were rebuilt in a mass rebuild, but gdb was not. It seems that gdb should Require (or Recommend) librpm with a specific so version (e.g. librpm.so.7()(64bit)) so that a) the dependency is installed even in minimalistic chroots, b) it is installed in a matching version.

Version-Release number of selected component (if applicable):

$ rpm -ql rpm-libs

Comment 1 Jan Kratochvil 2015-08-01 19:12:34 UTC

(In reply to Zbigniew Jędrzejewski-Szmek from comment #0)
> It seems that gdb should Require (or Recommend) librpm with a specific
> so version (e.g. librpm.so.7()(64bit))

'Recommend' only as it is also a soft (dlopen) dependency of /usr/bin/gdb.

BuildRequires: %{_libdir}/librpm.so.%{librpmver}
Recommends: rpm-libs%{?_isa}

It is a file dependency as I do not see rpm NVR package mapping to the .so version.  And I do not see how to make safe mapping to 'librpm.so.7()(64bit)' as on i386 it is 'librpm.so.7'.  %{?_isa} is not this kind of suffix.

And I have not made Recommends a file dependency as it may require the 'filelists' index of yum/dnf.  But I am not sure if /usr/lib*/ requires 'filelists' or not, at least /usr/bin/ does not.

Comment 2 Zbigniew Jędrzejewski-Szmek 2015-08-01 23:08:21 UTC
Created attachment 1058424 [details]
patch to detect current librpm.so version automatically

Thanks for the fast response!

You can use elfdeps to craft the dependency. Attached patch detects rpm so version provided by rpm-devel automatically.

Comment 3 Jan Kratochvil 2015-08-02 07:25:48 UTC
Thanks for the patch but I do not like this approach, packaging should know what it builds against.

Comment 4 Jan Kratochvil 2015-08-02 07:40:37 UTC
reason: There is currently no good automatic testing for the librpm functionality so that one notices when the librpm API could break.

Note You need to log in before you can comment on or make changes to this bug.