Install Arch i586

From ArchWiki
Revision as of 11:12, 4 October 2005 by Dlin (talk | contribs) (Solve validity check error)
Jump to: navigation, search


This document try to describe the process which let me successful build ArchLinux under other architectures.


A faster PC which installed ArchLinux, we'll use it to build packages for i586.

Step 1. Download PKGBUILD source

get required packages

pacman -S cvsup ccache libtar libol

edit the /etc/abs/abs.conf enable arch,extra.

SUPFILES=(arch extra !unstable !community)

Maybe you can also get the testing version by Getting_Testing_PKGBUILDs. Execute abs to get PKGBUILDs in /var/abs, make a directory called i586, and copy base packages into it.

# abs
# mkdir /var/abs/i586
# cd /var/abs/i586
# cp -a ../base .

Step 2. Compile Require Packages

prepare the destination directory where we put the package. Here we use /home/i586/base, edit the /etc/makepkg.conf, modify following lines, we use -mtune option for x86 can also use the binary packages.

export CC="ccache gcc"
export CPP="ccache cpp"
export CXX="ccache g++"
export CARCH="i586"
export CHOST="i586-pc-linux-gnu"
export CFLAGS="-mtune=i586 -O2 -pipe"
export CXXFLAGS="-mtune=i586 -O2 -pipe"
export PKGDEST=/home/i586/base

compile all base directory

mkdir -p /home/i586/base
cd /var/abs/i586
makeworld /home/i586/base base

we can view the process by build.log and makepkg.log under /var/abs/i586/.

Step 3. Solve Problem during Compiling

found out which package build failed by grep

grep failed build.log 

build again by makepkg

solve the failed package by manual run makepkg(eg. pacman failed)

cd /var/abs/i586/base/pacman
makepkg -w /home/i586/base

Solve Missing Dependencies

You may found the error message like

==> Missing Dependencies:
requires: libtar

get the missing libary for your system

pacman -S libtar

Solve validity check error

You may found the error message like ( here I use syslog-ng as example)

==> ERROR: One or more files did not pass the validity check!

To make sure you get the full size package, remove the source cache and try again

cd /var/abs/i586/base/syslog-ng
makepkg -C ; makepkg

If still failed, you should try to check the PKGBUILD, read the syslog-ng's web-site, try to found mirror which near your site, and download it to /var/cache/pacman/src/. If that file is really missing, report to bug system.

Solve cpp: too many input files

Found following error message:

ccache cpp -Wall -D_GNU_SOURCE -DLinux  ...
cpp: too many input files
make: *** [depend] Error 1
==> ERROR: Build Failed.  Aborting...

Comment off the ccache setting in /etc/makepkg.conf. Try again.

Step 4. Share Built Packages for i586

Step 5. Install ArchLinux on i586 by bootable linux

# grep "^base" packages.txt | grep -v pacman \
  | grep -v glibc | grep -v iputils \
  | sed -e 's:base/::' -e 's:-[0-9].*::' > ~/i.txt
# pacman -Syfw --noconfirm -r /mnt `cat ~/i.txt` kernel26 2>&1 &
# pacman -S --noconfirm -r /mnt glibc iputils pacman | tee ~/i.log
# pacman -Sf --noconfirm -r /mnt `cat ~/i.txt` kernel26