Mailinglist Archive: opensuse (3513 mails)

< Previous Next >
Re: [opensuse] How to compile for i86 on a x64 machine?
  • From: Michal Vyskocil <mvyskocil@xxxxxxx>
  • Date: Tue, 6 Jan 2009 15:24:40 +0100
  • Message-id: <200901061524.40984.mvyskocil@xxxxxxx>
On Tuesday 06 of January 2009 13:17:28 Joe Morris wrote:
On 01/06/2009 07:53 PM, Josef Wolf wrote:

I have entered 64 bit world with 11.1, and to my surprise, it seems to
work pretty fine so far.

Now I am curious how to compile for 32 bit machines from that 64 bit
machine. Do I really need to use a virtual machine or a cross compiler
or is there a more convenient way?

I guess it depends a bit on what you are building. For a spec file
linux32 rpmbuild -bb --target=i586 xxxx.spec and for a src.rpm, try
linux32 rpmbuild --rebuild --target=i586 xxxx.src.rpm. If it is a
source package, I would guess
linux32 ./configure && make, etc. linux32 is a 32 bit shell. HTH.

But this also need a 32-bit BuildRequires installed, don't it?

Usage of osc (osc build openSUSE_foo i586 spec), or /usr/bin/build
(BUILD_DIST=foo-i586 build spec) is better in this case, because the
BuildRequires will be installed in a build root, not in your system. But from
my experience is the %ifarch always expanded to x86_64 in 32-bit chroot.

Michal Vyskocil

To unsubscribe, e-mail: opensuse+unsubscribe@xxxxxxxxxxxx
For additional commands, e-mail: opensuse+help@xxxxxxxxxxxx

< Previous Next >
Follow Ups