You are not logged in.

#1 2013-02-10 15:57:27

Ubuntuz
Member
Registered: 2013-02-10
Posts: 7

[SOLVED] Building to both architectures?

Hello,

I was just wondering if it was possible to build to both i386 and x86_64 from a 64-bit machine, and if so, how? I have tried changing my makepkg configs and PKGBUILD files to build to 'any' architecture but that causes alot of problems...

Thanks.

Last edited by Ubuntuz (2013-02-10 16:16:22)

Offline

#2 2013-02-10 15:59:07

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [SOLVED] Building to both architectures?

Offline

#3 2013-02-10 16:01:50

Ubuntuz
Member
Registered: 2013-02-10
Posts: 7

Re: [SOLVED] Building to both architectures?

Thanks for the supernaturally fast reply! However, would you be able to dumb it down a bit for me? I'm finding some of these wiki articles tricky to understand...

EDIT: If I just change the PKGBUILD $arch to " 'i386', 'x86_64' " and change the makepkg config to i386 and x86_64 as I need to, would these properly compile the package for each architecture? Or are other steps needed?

Last edited by Ubuntuz (2013-02-10 16:06:01)

Offline

#4 2013-02-10 16:13:38

Scimmia
Fellow
Registered: 2012-09-01
Posts: 11,466

Re: [SOLVED] Building to both architectures?

OK, first off, put i386 out of your mind. Arch uses i686, not i386. Hell, the kernel even dropped support for i386.

Second, stop editing makepkg.conf. If you want to build for i686 on a x86_64 installation, it needs to be done inside a chroot. "Convenience Way" in that wiki page makes it very simple, one command will automatically set up the chroot, clean it, update it, and build the package for you.

Offline

#5 2013-02-10 16:16:06

Ubuntuz
Member
Registered: 2013-02-10
Posts: 7

Re: [SOLVED] Building to both architectures?

Scimmia wrote:

OK, first off, put i386 out of your mind. Arch uses i686, not i386. Hell, the kernel even dropped support for i386.

Second, stop editing makepkg.conf. If you want to build for i686 on a x86_64 installation, it needs to be done inside a chroot. "Convenience Way" in that wiki page makes it very simple, one command will automatically set up the chroot, clean it, update it, and build the package for you.

Ah sorry, I did mean 'i686'. Anyways, thanks, I'll give it some more reading...

Offline

#6 2013-02-10 16:28:35

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,595
Website

Re: [SOLVED] Building to both architectures?

See my build script for both arches and sync to/from my local repo hosted on my router.  Modify as needed.  Note-Setting up a 32-bit chroot is trivial.  I cleaned-up that wiki page myself tongue

https://github.com/graysky2/bin/blob/master/generic


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

Board footer

Powered by FluxBB