IPFire 2.x - Build Howto

Foreword

This how-to covers building IPFire from source code, creating a development environment that can be used to create new packages and make changes.

When building a development environment, you should be aware that:

  • This will require some patience and may take some time
  • Ideally you should have a powerful PC, with a lot of RAM (although this procedure will work on any modern PC)
  • You will need to dedicate a significant chunk of disk space

Prerequisites

You require a system with a common Linux distribution: Fedora, Ubuntu, or even IPFire itself will work.

You may have to change some minor things on your system and install several packages. There are some tips for common distributions. It also makes sense to install the package ccache to speed up compilation. If you made minor changes only that code will be compiled, the rest will be taken from the ccache. If your own distro is missing, feel free to add it here.

IPFire

These packages will be required:

pakfire install -y git make

IPFire can't build the toolchain, so you will have to use the precompiled version.
After git checkout and source download you also need to download the toolchain.

Fedora (Core) & CentOS

These packages will be required:

yum install git gcc byacc make wget binutils bison patch texinfo gcc-c++ glibc-static which autoconf automake

OpenSuSE

These packages will be required and can be installed via yast:

git, gcc, make, patch, bzip2, bison

Debian

These packages will be required:

Install these packages with:

apt-get install git-core gcc g++ manpages-pl make patch bzip2 byacc python-urlgrabber bison gawk texinfo  autoconf automake

or with:

aptitude install git-core gcc g++ manpages-pl make patch bzip2 byacc python-urlgrabber bison gawk texinfo autoconf automake

Ubuntu

There is a Symlink "/bin/sh" that points to "/bin/dash". This will cause an error if you compile glibc. Please change "/bin/sh" to "/bin/bash".

Ubuntu 11.04 needs some additional symlinks to asm header and glibc:

ln -s /usr/include/asm-generic /usr/include/asm
ln -s /usr/lib/i386-linux-gnu/libc.so /usr/lib/libc.so

These packages will be required:

Install these packages with:

apt-get install git-core g++ manpages-pl patch byacc make python-urlgrabber autoconf automake

or with:

aptitude install git-core g++ manpages-pl patch byacc make python-urlgrabber autoconf automake

Arch Linux

These packages will be required:

pacman -S git gcc make patch urlgrabber bison gawk texinfo

How To Build IPFire

This process may take several hours...

Step 1: Grabbing the source

First of all, you have to check out the source code. Read our git howto for instructions.

Next, grab the source code tarballs of every upstream package:

./make.sh downloadsrc

Step 2: Precompiled toolchain

In order to speed up compilation, you can download the first stage of the toolchain. This is recommended to do.

./make.sh gettoolchain

Step 3: Building

The build process automatically uses all available CPUs on the system to speed up the build as much as possible.

Start the build with:

./make.sh build

Now just wait until it's finished. That's all.

Benchmarks

In 2020 with a desktop PC (Intel Core i5 6400, 32GB of RAM), the build time has been:

System Version / Core Update 1.Build 2.Build
Kali 2019.4 XFCE 2.23 / 139 8h14m31s 3h03m02s
Kali 2020.1 XFCE 2.25 / 142 8h06m44s 2h57m05s

Note that between the first and second build there only has been a ./make.sh clean just to test ccache.

Edit Page ‐ Yes, you can edit!

Older Revisions • March 31 at 2:44 pm • Terry