Building 32-bit packages on a 64-bit system - ParabolaWiki

# Building 32-bit packages on a 64-bit system

How to build i686 packages on a x86_64 system. This article focuses on configuration of package building tools. This used to be complicated (actually, it was pretty simple, but there were more steps), but as of libretools 20160418, it's really simple.

### Create the chroot

All you need to do to create the 32-bit chroot with libretools is :

    # librechroot -A i686 -n my-i686-chroot-name make

### Using the chroot

After this, you can compile your packages for i686 on x86_64 machines:

    # libremakepkg                        # for x86_64
    # libremakepkg -n my-i686-chroot-name # for i686

### Recreate chroots

Delete all chroots and create chroots for both architectures.

    # rm -rf /var/lib/archbuild # or whatever CHROOTDIR is set to in your /etc/libretools.d/chroot.conf or ~/.config/libretools/chroot.conf
    # librechroot make                                # for x86_64
    # librechroot -A i686 -n my-i686-chroot-name make # for i686

## See also

- Cross-toolchain and distcc contains information specific to compilation.

Category:

- Software