Bug 1249325 - gdb recommends librpm.so.3
Summary: gdb recommends librpm.so.3
Keywords:
Status: CLOSED RAWHIDE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
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-7.9.90.20150717-8.fc24
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-08-01 19:12:34 UTC


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


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1249326 None None None Never

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):
gdb-7.9.90.20150717-7.fc24.x86_64
rpm-libs-4.12.90-3.fc24.x86_64

$ rpm -ql rpm-libs
/usr/lib64/librpm.so.7
/usr/lib64/librpm.so.7.0.0
/usr/lib64/librpmio.so.7
/usr/lib64/librpmio.so.7.0.0
/usr/lib64/rpm-plugins

Comment 1 Jan Kratochvil 2015-08-01 19:12:34 UTC
http://pkgs.fedoraproject.org/cgit/gdb.git/commit/?id=ddc0fde6fde9238309396e08025f3473c2ea2ac7

(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.