Bug 1568808 - rpmbuild doesn't generate necessary ELF dependencies
Summary: rpmbuild doesn't generate necessary ELF dependencies
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: rpm
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: Packaging Maintenance Team
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 1551223
TreeView+ depends on / blocked
 
Reported: 2018-04-18 09:26 UTC by Igor Gnatenko
Modified: 2018-04-18 09:43 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2018-04-18 09:32:08 UTC
Type: Bug


Attachments (Terms of Use)

Description Igor Gnatenko 2018-04-18 09:26:06 UTC
⋊> ~ ldd /usr/bin/exa                                                                                                                                                                                      11:25:05
	linux-vdso.so.1 (0x00007ffc2bb91000)
	libgit2.so.26 => /lib64/libgit2.so.26 (0x00007fa87c2a3000)
	libdl.so.2 => /lib64/libdl.so.2 (0x00007fa87c09f000)
	librt.so.1 => /lib64/librt.so.1 (0x00007fa87be97000)
	libpthread.so.0 => /lib64/libpthread.so.0 (0x00007fa87bc78000)
	libgcc_s.so.1 => /lib64/libgcc_s.so.1 (0x00007fa87ba60000)
	libc.so.6 => /lib64/libc.so.6 (0x00007fa87b6a1000)
	libcurl.so.4 => /lib64/libcurl.so.4 (0x00007fa87b419000)
	libhttp_parser.so.2 => /lib64/libhttp_parser.so.2 (0x00007fa87b211000)
	libz.so.1 => /lib64/libz.so.1 (0x00007fa87affa000)
	libssl.so.1.1 => /lib64/libssl.so.1.1 (0x00007fa87ad8d000)
	libcrypto.so.1.1 => /lib64/libcrypto.so.1.1 (0x00007fa87a901000)
	libssh2.so.1 => /lib64/libssh2.so.1 (0x00007fa87a6d3000)
	/lib64/ld-linux-x86-64.so.2 (0x00007fa87c8ad000)
	libnghttp2.so.14 => /lib64/libnghttp2.so.14 (0x00007fa87a4ad000)
	libidn2.so.0 => /lib64/libidn2.so.0 (0x00007fa87a290000)
	libssh.so.4 => /lib64/libssh.so.4 (0x00007fa87a01f000)
	libpsl.so.5 => /lib64/libpsl.so.5 (0x00007fa879e0f000)
	libgssapi_krb5.so.2 => /lib64/libgssapi_krb5.so.2 (0x00007fa879bc0000)
	libkrb5.so.3 => /lib64/libkrb5.so.3 (0x00007fa8798d3000)
	libk5crypto.so.3 => /lib64/libk5crypto.so.3 (0x00007fa8796a0000)
	libcom_err.so.2 => /lib64/libcom_err.so.2 (0x00007fa87949c000)
	libldap-2.4.so.2 => /lib64/libldap-2.4.so.2 (0x00007fa879250000)
	liblber-2.4.so.2 => /lib64/liblber-2.4.so.2 (0x00007fa879041000)
	libunistring.so.2 => /lib64/libunistring.so.2 (0x00007fa878cc1000)
	libkrb5support.so.0 => /lib64/libkrb5support.so.0 (0x00007fa878ab2000)
	libkeyutils.so.1 => /lib64/libkeyutils.so.1 (0x00007fa8788ae000)
	libresolv.so.2 => /lib64/libresolv.so.2 (0x00007fa878697000)
	libsasl2.so.3 => /lib64/libsasl2.so.3 (0x00007fa87847a000)
	libselinux.so.1 => /lib64/libselinux.so.1 (0x00007fa878251000)
	libcrypt.so.1 => /lib64/libcrypt.so.1 (0x00007fa878028000)
	libpcre2-8.so.0 => /lib64/libpcre2-8.so.0 (0x00007fa877da8000)
⋊> ~ rpm -qR (rpm -qf /usr/bin/exa)                                                                                                                                                                        11:25:07
libc.so.6()(64bit)
libc.so.6(GLIBC_2.14)(64bit)
libc.so.6(GLIBC_2.18)(64bit)
libc.so.6(GLIBC_2.2.5)(64bit)
libc.so.6(GLIBC_2.3)(64bit)
libc.so.6(GLIBC_2.3.4)(64bit)
libc.so.6(GLIBC_2.4)(64bit)
libdl.so.2()(64bit)
libdl.so.2(GLIBC_2.2.5)(64bit)
libgcc_s.so.1()(64bit)
libgcc_s.so.1(GCC_3.3)(64bit)
libgcc_s.so.1(GCC_4.2.0)(64bit)
libgit2.so.26()(64bit)
libpthread.so.0()(64bit)
libpthread.so.0(GLIBC_2.2.5)(64bit)
libpthread.so.0(GLIBC_2.3.2)(64bit)
libpthread.so.0(GLIBC_2.3.3)(64bit)
librt.so.1()(64bit)
librt.so.1(GLIBC_2.2.5)(64bit)
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(PayloadIsXz) <= 5.2-1
rtld(GNU_HASH)

I assume this is happening with all binaries compiled with Rust.

Comment 1 Panu Matilainen 2018-04-18 09:32:08 UTC
ldd is recursive, ie it lists the dependencies of the dependent libraries and dependencies of those libraries etc. Rpm dependency generators are not recursive, for hopefully obvious reasons.

Comment 2 Panu Matilainen 2018-04-18 09:43:50 UTC
FWIW, to cross-check rpm dependency generator output on elf files, readelf -d (or objdump -p) is the appropriate tool. Eg:

[pmatilai@sopuli ~]$ readelf -d /usr/bin/exa | grep NEEDED
 0x0000000000000001 (NEEDED)             Shared library: [libgit2.so.26]
 0x0000000000000001 (NEEDED)             Shared library: [libdl.so.2]
 0x0000000000000001 (NEEDED)             Shared library: [librt.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libpthread.so.0]
 0x0000000000000001 (NEEDED)             Shared library: [libgcc_s.so.1]
 0x0000000000000001 (NEEDED)             Shared library: [libc.so.6]
[pmatilai@sopuli ~]$


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