error: Failed dependencies

david kerns david.t.kerns at gmail.com
Wed Mar 30 15:32:55 UTC 2016


here's a base64 of a tarball reproducer;

base64 -d - > rpmbuild.tgz;
tar tvf rpmbuild.tgz # (verfiy contents)
tar xf rpmbuild.tgz; cd rpmbuild; # (after you're happy with content)
./doit
--------

H4sIAPLu+1YAA+1ZfWxbVxV/SRpa36ExTevoYEKnjb36sfjj2bEjuQtrmrhL2nx4jtPS0mGe37uO
n/K++t5zmqx1B0MVCxvSQHwMaf2HTRP8MW0STDANMalSxdqEom0gMvEHaIMhUFGn8SE1Q8C97/nb
TUKq2Ejg4zi+vu/e3z3v/M65vuc8Q1cyeUkWA0zzJEikPxIhn6FwPxe2P/tC/XZ/URguFO2nrxBH
xnFcuD/IQKSJOpUlb1q8AcCI1uy64xRJ5M1WKNRaMUr8H5geHRtujhdsgv9oOMoR/kOhcJv/lkgd
/+P8LM5KMt7SNSjB0b6+Nfnv7wuX+Q9GSD8XJk0GgluqxRryf85/ajIx4PYmjg6ziDeEHGmbOSzL
kFd5BYNPYRHiZTmGXPuxkNPAvR+MvIwR0g2sN/YqCzovzPIzmFwSRAhYir6PQD0s6eD2kqXYQHmE
n3Qil9s7Png4zoJvyB5cuQyCjHkVyNoISSrhSJbT1ejKrCgZ4NOhBOz3Oy6cnJxMBdxeqj7rc3vn
sGFKmkqbBiaQJmb9bi+91SpdkCsrqWK9Bmdghtwk+OagFBVVXaYhBMhXQZc0ooWYV25ejyqzpe27
brSrPzEyOXEsRs0B1PJQ0bLBOFCHhtblvy7+a+jZKh/bIP5D/X2Ryv4fIeO4vn5yuR3/LZDE4a5t
joc8MXh2pPoKYu5myu4QmE65mK6Vqx8c+TV55+dvYTq2Le1lmG0f3VuNIZ8q1GDcWoORkVQH55XV
1SNXbx5HljL/IU7YXA+HxrCN88b7G+CcO1kYQUf3PXuctOl7VwOOhU2L6OUXBBvxe9dWjyz+Y7Ue
sUdSBTkvYrjPtERJ8+c+RXc3C7LeOU0SWXQaAYlv0pP17pFU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ksdUjbnTZ
hTzkmmBIOlUfpXKSCeSPh9pb7YEk1mVewGAumERhICcpUHjB0MDUgGRZvCFhMs3AoGoWmBYB1LFI
wbPEHCS718x0qYqnawQaIJA3DTuZIuEZyBi6T9AU3cCmSZcb1tS9FpziyWJgSQoGIYeFWWJUyGoG
5NWiZiLQRMGsWscel7Z7iUFVSS4g5KHlRKSQtMIpLFLTDhQtDEX7DlQsDUU7D1QsXvIUp4u2KKy9
qTi4lcrkVoEXreXANxZAh+NTqeHRJJlja2EQdyps2dpOTbX2xoqFVuSpWJy3LMPr66VrO/98LKqt
L5NhmkABc7w6g2VtBq1fqW2OVPb/5iUAN3H+CwdD7d//VkiZf1GTrCatsRH/oWi47vk/Of+1n/+1
RHp224XADG/mEJKy8Blw98AABOEhZOWwilz6QNVjsh77sdSevEkfwoE7CMR99tDueckCDmHZxHSG
m0NZCaEsT7ZD0UvL2va8g4OjY/FhVBxMNtMHB9PJxGBqZGogOE/8IAwlbwRfJgPOidSt20dROHMG
HLz/xi7Zlra0pS3/e/JvfMO/tQAoAAA=





On Wed, Mar 30, 2016 at 5:26 AM, Lubos Kardos <lkardos at redhat.com> wrote:

> Hi,
>
> rpm generates provides from sonames of ELF shared objects. If a shared
> object
> doens't have any soname then the provide is created from name of file. rpm
> generates provides only from ELF shared objects it doesn't generate
> provides
> from symlinks to shared objects. Yes, it generates provides from hard
> links to
> shared ojbects because of obvious reason.
>
> Difference between rpm-4.8.0 (rhel-6.7) and rpm-4.11.3 (rhel-7.2) is that
> the
> newer rpm requires soname to start with prefix "lib" otherwise from this
> soname
> no provides is created. If a file doesn't have soname and a provide is
> created
> from name of the file then the file name must start with "lib" prefix too.
>
> This doesn't explain completely what you observed and I tested this and I
> got
> a bit different results but nevertheless you have to follow common
> practices
> for creating shared libraries (as was already written here) and rename your
> library to match expected format of name for shared library i. e. library
> name should start with lib also you should link a library to some program
> using name from a generated provide then rpm will create a matching
> require and
> dependency checking will work.
>
> Lubos
>
> ------------------------------
>
> *From: *"david kerns" <david.t.kerns at gmail.com>
> *To: *"General discussion about the RPM package manager" <
> rpm-list at lists.rpm.org>
> *Sent: *Wednesday, March 30, 2016 12:48:13 AM
> *Subject: *Re: error: Failed dependencies
>
>
>
> On Tue, Mar 29, 2016 at 2:58 PM, Tim Mooney <Tim.Mooney at ndsu.edu> wrote:
>
>> In regard to: error: Failed dependencies, david kerns said (at 2:44pm
>> on...:
>>
>> Just joined the mail-list and found an (unresolved) existing thread with
>>> my
>>> exact issue. I'm hoping this get's linked to the existing thread... (last
>>> response Tue, Sep 1, 2015)
>>>
>>> # rpm -i mypackage.x86_64.rpm
>>> error: Failed dependencies:
>>>    libtestlib.so()(64bit) is needed by mypackage.x86_64.rpm
>>>
>>> # rpm -qlp --provides mypackage.x86_64.rpm
>>> testlib.so()(64bit)
>>> /opt/mypackage/lib/testlib.so
>>> /opt/mypackage/lib/libtestlib.so
>>>
>>
>> This is just a guess, but it looks like the shared library you're creating
>> either doesn't have a SONAME or the SONAME doesn't match the actual file
>> name.
>>
>> You should probably read up on best practices for creating a shared
>> library on your platform (Linux, I presume, though you don't provide
>> any details about your OS, distribution, version, or RPM version, all of
>> which would be useful to include).
>>
>
> ah yes, sorry:
> CentOS release 6.7 (Final)
> RPM version 4.8.0
>
> This may end the conversation ... (but if there's a fix available on
> CentOS 6.7, ... we'll be there for a while)
> I just tried the exact thing on:
>
> CentOS Linux release 7.2.1511 (Core)
> RPM version 4.11.3
>
> and the rpm works without issue. Ugh!
>
>
>> Note: libtestlib.so is a symbolic link to testlib.so
>>>
>>> If I make a hard link instead of a symbolic link (during the build
>>> process), the rpm install works fine
>>>
>>
>> That seems to confirm that it's an issue with the SONAME.  Read up
>> on shared libraries on Linux and the SONAME.
>>
>> thanks ...
> I tried adding (one at a time) both SONAME libtestlib.so and testlib.so
> ... both fail with the listed SONAME
>
> $ objdump -p
> BUILDROOT/mypackage-1.0-0.1.x86_64/tmp/mypackage/lib/libtestlib.so | grep
> SONAME
>   SONAME               testlib.so
> $ rpm -qlp --provides   RPMS/x86_64/mypackage-1.0-0.1.x86_64.rpm
> testlib.so()(64bit)
> mypackage = 1.0-0.1
> mypackage(x86-64) = 1.0-0.1
> /tmp/mypackage
> /tmp/mypackage/bin
> /tmp/mypackage/bin/main
> /tmp/mypackage/lib
> /tmp/mypackage/lib/libtestlib.so
> /tmp/mypackage/lib/testlib.so
> /tmp/mypackage/src
>
>
> $ objdump -p
> BUILDROOT/mypackage-1.0-0.1.x86_64/tmp/mypackage/lib/libtestlib.so | grep
> SONAME
>   SONAME               libtestlib.so
> $ rpm -qlp --provides   RPMS/x86_64/mypackage-1.0-0.1.x86_64.rpm
> libtestlib.so()(64bit)
> mypackage = 1.0-0.1
> mypackage(x86-64) = 1.0-0.1
> /tmp/mypackage
> /tmp/mypackage/bin
> /tmp/mypackage/bin/main
> /tmp/mypackage/lib
> /tmp/mypackage/lib/libtestlib.so
> /tmp/mypackage/lib/testlib.so
> /tmp/mypackage/src
>
>
> PS: if this is a package you will eventually distribute to customers,
>> it's even more important that you follow more of the Linux conventions
>> for shared libraries.
>>
>> Tim
>> --
>> Tim Mooney
>> Tim.Mooney at ndsu.edu
>> Enterprise Computing & Infrastructure                  701-231-1076
>> (Voice)
>> Room 242-J6, Quentin Burdick Building                  701-231-8541 (Fax)
>> North Dakota State University, Fargo, ND 58105-5164
>>
>>
> Per Jay Hendron's suggestion:
> Maybe a silly suggestion, but could you add a "Provides:
> libtestlib.so()(64bit)" tag to your spec file and rebuild?
>
> Which ever (or both) one I list as for "Provides:" adds another depends in
> the "rpm -qlp" output.
> So, it does seem like a bug, but already fixed by 4.11.3
>
>
> _______________________________________________
>> Rpm-list mailing list
>> Rpm-list at lists.rpm.org
>> http://lists.rpm.org/mailman/listinfo/rpm-list
>>
>
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
>
>
> _______________________________________________
> Rpm-list mailing list
> Rpm-list at lists.rpm.org
> http://lists.rpm.org/mailman/listinfo/rpm-list
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rpm.org/pipermail/rpm-list/attachments/20160330/d33d5e84/attachment-0001.html>


More information about the Rpm-list mailing list