开发者

How to convert a 64 bit rpm file into 32 bit rpm file

开发者 https://www.devze.com 2022-12-12 10:40 出处:网络
Hi I am using Fedora 10 linux with 64bit architecture. I have created 64bit rpm file for my application. It works fine all fedora 10 linux which have 64 bit. But my application doesnot work well for 3

Hi I am using Fedora 10 linux with 64bit architecture. I have created 64bit rpm file for my application. It works fine all fedora 10 linux which have 64 bit. But my application doesnot work well for 32 bit linux. So how to convert 64bit rpm file into 32 bit rpm file. Or how to recreate 32 bit rpm file.

Thanks Sunil Kumar Sahoo开发者_JAVA技巧


You will need to have 32bit libraries installed on your machine and while package is being build/compile, compiler will need to get -m32 option. I came across this solution:

CC='gcc -m32' CXX='g++ -m32' linux32 rpmbuild --rebuild --target=i586 package.src.rpm

But I didn't try it myself.

Hops it will help you somehow.

BR, Dawid.


You can use the way Czlowiekwidmo has mentioned or if you have a machine with 32 bit architecture you can set up the same environment as you have setup for 64 bit. follow the same process for rpm creation as you have done for 64 bit then you will get rpm for 32 bit.


Maybe a bit more than you ask for but have you ever looked at http://build.opensuse.org/ ? It's a fantastic build service that allows to build packages for a vast number of Linux distributions (including Fedora 10 - however marked as DISCONTINUED).

Apart from using the superb web-interface, you can also build locally (just in case, your package is closed-source?).

And yes, building both 64 bit and 32 bit packages is supported, along with building 32 bit support libraries for 64 bit platforms.


You can also use "mock" command. "yum install mock", then "man mock", you will find how to use it.

The similar question was answered here: https://serverfault.com/questions/200712/how-to-create-rpm-for-32-bit-arch-from-a-64-bit-arch-server

One example for mock: mock -r fedora-10-i386 --rebuild foo.srpm

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号