Martin Hamant
2007-Feb-16 15:53 UTC
[CentOS] RPM rebuild, cross compiling from x86 to x86_64
Hi I want to recompile some RPMs (my own) for x86_64 arch from my i386 compatible build host (because of hardware restriction/funds).Is anyone ever done this ? After a google search, it seems not so easy... i just found this: http://www.speedblue.org/cross_compilation/ but haven't tried it yet (i would have to convert these to RPM first). How is it done for Centos SRPMS rebuilds ? is it a different hardware for each target arch ? Thanks ! -- Martin
Sherwyn Greene
2007-Feb-16 16:22 UTC
[CentOS] RPM rebuild, cross compiling from x86 to x86_64
You need the src rpm for the package you want to compile -----Original Message----- From: centos-bounces at centos.org [mailto:centos-bounces at centos.org] On Behalf Of Martin Hamant Sent: Friday, February 16, 2007 11:54 AM To: CentOS mailing list Subject: [CentOS] RPM rebuild, cross compiling from x86 to x86_64 Hi I want to recompile some RPMs (my own) for x86_64 arch from my i386 compatible build host (because of hardware restriction/funds).Is anyone ever done this ? After a google search, it seems not so easy... i just found this: http://www.speedblue.org/cross_compilation/ but haven't tried it yet (i would have to convert these to RPM first). How is it done for Centos SRPMS rebuilds ? is it a different hardware for each target arch ? Thanks ! -- Martin _______________________________________________ CentOS mailing list CentOS at centos.org http://lists.centos.org/mailman/listinfo/centos
Johnny Hughes
2007-Feb-16 21:49 UTC
[CentOS] RPM rebuild, cross compiling from x86 to x86_64
On Fri, 2007-02-16 at 16:53 +0100, Martin Hamant wrote:> Hi > > I want to recompile some RPMs (my own) for x86_64 arch from my i386 > compatible build host (because of hardware restriction/funds).Is anyone > ever done this ? After a google search, it seems not so easy... i just > found this: http://www.speedblue.org/cross_compilation/ but haven't > tried it yet (i would have to convert these to RPM first). > > How is it done for Centos SRPMS rebuilds ? is it a different > hardware for each target arch ?This will not be easy to do. You can fairly easily build a cross compiler ... HOWEVER You are also going to need to install packages that are BuildRequires for the packages that you want to build (so you can compile against them) ... and the xxxxxxx-devel.x86_64 files (the ones with the headers) are going to all REQUIRE the xxxxxxx.x86_64 packages too. It is almost impossible to do this without installing the x86_64 distro ... and that requires an x86_64 capable processor. You might be able to emulate it (maybe qemu), but by the time you do that it would have been cheaper and easier to have spent $300.00 and obtained a cheap machine to do it on. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.centos.org/pipermail/centos/attachments/20070216/c5cc2856/attachment.sig>
John Summerfield
2007-Feb-16 22:13 UTC
[CentOS] RPM rebuild, cross compiling from x86 to x86_64
Johnny Hughes wrote:> On Fri, 2007-02-16 at 16:53 +0100, Martin Hamant wrote: >> Hi >> >> I want to recompile some RPMs (my own) for x86_64 arch from my i386 >> compatible build host (because of hardware restriction/funds).Is anyone >> ever done this ? After a google search, it seems not so easy... i just >> found this: http://www.speedblue.org/cross_compilation/ but haven't >> tried it yet (i would have to convert these to RPM first). >> >> How is it done for Centos SRPMS rebuilds ? is it a different >> hardware for each target arch ? > > This will not be easy to do. > > You can fairly easily build a cross compiler ... HOWEVER > > You are also going to need to install packages that are BuildRequires > for the packages that you want to build (so you can compile against > them) ... and the xxxxxxx-devel.x86_64 files (the ones with the headers) > are going to all REQUIRE the xxxxxxx.x86_64 packages too. > > It is almost impossible to do this without installing the x86_64 > distro ... and that requires an x86_64 capable processor. > > You might be able to emulate it (maybe qemu), but by the time you do > that it would have been cheaper and easier to have spent $300.00 and > obtained a cheap machine to do it on.It might also be possible to build a cross compiler, then do your "make && make install" from the source tree to put the binaries someplace, maybe /tmp/Build/package, and to construct a spec file that will take those binaries and create an rpm using those as "data" files. It's the sort of thing you'd do to transform a tarball of proprietary binaries into an rpm. In the build environment, you do away with all the benefits of rpm, but it might work. -- Cheers John -- spambait 1aaaaaaa at coco.merseine.nu Z1aaaaaaa at coco.merseine.nu Please do not reply off-list