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