Re: error: Failed dependencies

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I followed steps provided by you on fresh installation of CentOS 6.7 (Final)
and I didn't encounter the problem described by you. I was able to install
the package without problems and create provides and requires seem properly:

# rpm -i mypackage-1.0-0.1.x86_64.rpm
# echo $?
0
# rpm -q --provides -p mypackage-1.0-0.1.x86_64.rpm 
libtestlib.so()(64bit)  
mypackage = 1.0-0.1
mypackage(x86-64) = 1.0-0.1
# rpm -q --requires -p mypackage-1.0-0.1.x86_64.rpm 
libc.so.6()(64bit)  
libc.so.6(GLIBC_2.2.5)(64bit)  
libgcc_s.so.1()(64bit)  
libm.so.6()(64bit)  
libstdc++.so.6()(64bit)  
libstdc++.so.6(CXXABI_1.3)(64bit)  
libtestlib.so()(64bit)  
rpmlib(CompressedFileNames) <= 3.0.4-1
rpmlib(FileDigests) <= 4.6.0-1
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rtld(GNU_HASH)  
rpmlib(PayloadIsXz) <= 5.2-1

I don't know why that doesn't work in your system. Maybe check if the shared
object in your BUILDROOT directory really contains soname:
# readelf -d rpmbuild/BUILDROOT/mypackage-1.0-0.1.x86_64/tmp/mypackage/lib/testlib.so | grep SONAME
0x000000000000000e (SONAME)             Library soname: [libtestlib.so]

BTW you should really follow rules for creating rpm packages e. g. your sources
should be in SOURCES directory then you can create srpm and then you don't need
to sent the whole rpmbuild directory. Some useful guidelines:
https://fedoraproject.org/wiki/How_to_create_an_RPM_package
https://fedoraproject.org/wiki/Packaging:Guidelines

Lubos

----- Original Message -----
> From: "david kerns" <david.t.kerns@xxxxxxxxx>
> To: "General discussion about the RPM package manager" <rpm-list@xxxxxxxxxxxxx>
> Sent: Wednesday, March 30, 2016 5:32:55 PM
> Subject: Re: error: Failed dependencies
> 
> 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)
>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uEZyBi6T9AU3cCmSZcb1tS9FpziyWJgSQoGIYeFWWJUyGoG
> 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@xxxxxxxxxx > 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@xxxxxxxxx >
> To: "General discussion about the RPM package manager" <
> rpm-list@xxxxxxxxxxxxx >
> 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@xxxxxxxx > 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@xxxxxxxx
> 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@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
> 
> 
> 
> _______________________________________________
> Rpm-list mailing list
> Rpm-list@xxxxxxxxxxxxx
> http://lists.rpm.org/mailman/listinfo/rpm-list
> 
_______________________________________________
Rpm-list mailing list
Rpm-list@xxxxxxxxxxxxx
http://lists.rpm.org/mailman/listinfo/rpm-list



[Index of Archives]     [RPM Ecosystem]     [Linux Kernel]     [Red Hat Install]     [PAM]     [Red Hat Watch]     [Red Hat Development]     [Red Hat]     [Gimp]     [Yosemite News]     [IETF Discussion]

  Powered by Linux