Menu

HowTo build

Olaf Westrik Eric Oberlander

It should be possible to build IPCop on any (recent) Linux distribution. A kernel version greater or equal to 2.6.5 is required! There are 2 ways to build IPCop, with or without a prepackaged toolchain. The advantages of using a prepackaged toolchain are: less requirements on the building machine environment and timesaving.

See 1 below for exact package version requirements to build the toolchain.

Please observe that there is currently no cross-compilation support, i.e. if you want to build IPCop for Sparc you will need a Sparc machine.

Examples below are from Debian Lenny but build environment is not limited to Debian.

Prepare building environment

As of SVN [r842] it is no longer necessary to build IPCop as root. You will need sudo installed. You need to copy in /etc/sudoers (using visudo is recommended) the lines indicated on first ./make.sh build. See 2 below how to build as root, please note that it strongly recommended to build as non-root!

These are the minimum packages required when a prepackaged toolchain is available.

apt-get install build-essential realpath sudo

More packages are needed to build the toolchain (see later), realpath and build-essential are debian specific. On other distributions, build-essential could be have other names like development packages (gcc, libc headers, make,...). On opensuse-11.3 for example, it is required to install

zypper install bison gcc make texinfo

Retrieve IPCop sources

Sources are available from SVN). This is the recommended way as it is easier to follow changes on the source tree. You will need the subversion package, install on Debian Lenny using (see [4] for other distros):

apt-get install subversion

Then checkout the current sources with:

svn checkout http://svn.code.sf.net/p/ipcop/svn/ipcop/trunk

If you want to checkout a specific revision, for instance the 2.1.8 release, include the revision number:

svn checkout --revision 7814 http://svn.code.sf.net/p/ipcop/svn/ipcop/trunk

Or, as each version of IPCop is tagged (release-2.1.8 in this case) so you could also export the tag:

svn export http://svn.code.sf.net/p/ipcop/svn/ipcop/tags/release-2.1.8

To work out the revision number of a particular release, use this example command to get the information:

svn log -v --stop-on-copy http://svn.code.sf.net/p/ipcop/svn/ipcop/tags/release-2.1.5

See the Subversion manual for more information on svn. Change into the trunk directory, you should now see various directories (config, doc, html, etc.) and make.sh script :

cd trunk
ls

Retrieve other sources

Load all files from all the different sources on the Internet

./make.sh prefetch

Should some files not be available or have moved to a different URL, 'make.sh' will report an error. You might try a Google search and download files manually into the cache directory.

Build IPCop using a prebuilt toolchain

To save 30% time on building, it is possible to use a prebuilt toolchain (42 MiB). Retrieve using:

./make.sh gettoolchain

Using the prebuilt toolchain also helps if your distro is old or very new, and is not capable of creating the IPCop building environment.


1: Package versions required to build the toolchain

Package Version
bash 2.05a
binutils 2.12
bison 1.875
bzip2 1.0.2
coreutils 5.0
diffutils 2.8
findutils 4.1.20
gawk 3.1.5
gcc 3.0.1
glibc 2.2.5
grep 2.5
gzip 1.2.4
linux kernel 2.6.5
make 3.79.1
patch 2.5.4
sed 3.0.2
tar 1.14
texinfo 4.8

2: Build as root

You will need to write these values in a .config file at ./make.sh directory level.

# Default value
NICE=10

# How many concurrent jobs to run (NOTE: Don't use too high a value, or packages may have timing issues.
# At least openssh fails if this is too high.  It's safe to set this to number of CPUs + 1)
PARALLELISM=3

# How many times should prefetch try to download a package. Don't set to too high a value and hammer sites
MAX_RETRIES=3

# Make distcc optional, by default don't use it.
# To be efficient, distcc need that network is more efficient than local cpu
# Gain is usually small unless cpu are not fast
USE_DISTCC=no

# Should we skip creation of USB images
# This saves time if you only want to use PXE or CD installation
SKIP_USB_IMAGES=yes

# If you **absolutely** want to build ipcop as root,STRONGLY DISCOURAGED
ALLOW_ROOT_TO_BUILD=yes

Related

Commit: [r842]

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.