Re: Building a 32bit RPM on 64bit Linux: Wrong dependencies auto-generated

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

 



On 07/29/2010 01:08 PM, devzero2000 wrote:
> On Thu, Jul 29, 2010 at 12:05 PM, Philipp Münzel <mail@xxxxxxxxxxxxxxxxx> wrote:
>> Hi folks,
>>
>> I'm unsure whether this is the right place for posting this question, but I
>> have searched the web for days now and was unable to come up with a
>> solution.
>>
>> This is the problem: I made a SPEC file for building an application in 32bit
>> mode on a 64bit Linux. I got around all the stuff regarding compiler flags,
>> 32bit libraries and so on.
> Are you using the "GNU build tool" ? Have you used rpmbuild --target
> or something like mock ?

Im using the following command:
rpmbuild -ba --target=i586 SPECS/myspec.spec

>> The RPM generated ends up in the i586 folder and it has i586 in its name.
>> When I unpack it using rpm2cpio it has a 32bit application inside. When I
>> ldd the application, it says it links to the 32bit libraries. Everything as
>> it should be.
> 
> What tell you rpm -qRp <rpmname> ?

I just tried to build on a native 32bit Linux and see what happens. The
problem here is, I cannot deploy the packet on the same machine I build
it on. That means the machine that build the goddamn thing doesn't
satisfy it's own requirements? WTF?

This is the output of rpm -qRp

/bin/sh
/bin/sh
/bin/sh
rpmlib(PayloadFilesHavePrefix) <= 4.0-1
rpmlib(CompressedFileNames) <= 3.0.4-1
/bin/sh
libc.so.6
libc.so.6(GLIBC_2.0)
libc.so.6(GLIBC_2.1)
libc.so.6(GLIBC_2.1.3)
libc.so.6(GLIBC_2.3)
libc.so.6(GLIBC_2.3.4)
libc.so.6(GLIBC_2.7)
libgcc_s.so.1
libgcc_s.so.1(GCC_3.0)
libgcc_s.so.1(GLIBC_2.0)
libJSB-CInterface.so.1
libm.so.6
libm.so.6(GLIBC_2.0)
libm.so.6(GLIBC_2.1)
libpthread.so.0
libpthread.so.0(GLIBC_2.0)
libpthread.so.0(GLIBC_2.1)
librt.so.1
librt.so.1(GLIBC_2.2)
libstdc++.so.6
libstdc++.so.6(CXXABI_1.3)
libstdc++.so.6(CXXABI_1.3.1)
libstdc++.so.6(GLIBCXX_3.4)
libstdc++.so.6(GLIBCXX_3.4.11)
libstdc++.so.6(GLIBCXX_3.4.14)
libstdc++.so.6(GLIBCXX_3.4.9)
libxml2.so.2
libxslt.so.1
rpmlib(PayloadIsLzma) <= 4.4.6-1

as you see, everyhting native 32bit.
When I try to install, I get:
error: Failed dependencies:
        libstdc++.so.6(GLIBCXX_3.4.14) is needed by example.rpm


>> I didn't specify any dependencies in the spec manually, because I rely on
>> dependency auto-generation by ldd (ldd correctly points to the 32bit
>> libraries, as mentioned).
> ldd ? rpm have an internal dependency generator based on libelf from
> rh 9. BTW, find-requires script are gone from a loong time.
> 
> Use this toy script for finding the deps as rpm does internally
> (http://devzero2000.pastebin.com/NBLpeKwN)
> _______________________________________________

Huh? I remember reading the day before that rpm uses some magic that
involves invoking ldd on the binaries to generate the dependencies.
Maybe this information was outdated?

Philipp

> 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