User Tools

Site Tools


Build system setup

  1. Assuming a GNU/Linux environment, otherwise see alternative guides
  2. Install git, to conveniently download the source code, and your distro's default build tools metapackage to do the cross-compilation process
  3. Some feeds might not available over git but only via subversion (short: svn) or mercurial. If you want to obtain their source-code, you need to install svn and mercurial as well
  4. Install other prerequisite packages, as indicated in the table and examples below
  5. Set (or unset) proper environment variables:
    • SED should not be set, otherwise run unset SED before compiling
    • GREP_OPTIONS should not have --initial-tab or other options affecting its output


This table contains the package name for each build prerequisite in different GNU/Linux and Unix like distributions.

Prerequisite Debian SUSE Red Hat macOS (via MacPorts) Fedora Arch Gentoo
asciidoc asciidoc asciidoc asciidoc asciidoc asciidoc asciidoc app-text/asciidoc
GNU Bash bash bash bash bash bash bash app-shells/bash
GNU Binutils binutils binutils binutils binutils binutils binutils sys-devel/binutils
bzip2 bzip2 bzip2 bzip2 bzip2 bzip2 bzip2 app-arch/bzip2
flex flexflex flex flex flex flex sys-devel/flex
git git-core git-core git git-core git git dev-vcs/git
GNU C++ Compiler g++ gcc-c++ gcc-c++ ? gcc-c++ gcc sys-devel/gcc
GNU C Compiler gcc gcc gcc ? gcc gcc sys-devel/gcc
GNU Time ? ? ? ? ? ? sys-process/time
getopt util-linux util-linux util-linux getopt util-linux util-linux sys-apps/util-linux
GNU awk gawk gawk gawk gawk gawk gawk sys-apps/gawk
help2man help2man ? ? ? ? ? ?
intltool-update intltool intltool intltool intltool intltool intltool dev-util/intltool
libelf-dev libelf-dev ? ? ? ? ? ?
libz, libz-dev zlib1g-dev zlib-devel zlib-devel zlib zlib-devel zlib sys-libs/zlib
make make make make gmake make make sys-devel/make
ncurses libncurses5-dev ncurses-devel ncurses-devel ncurses ncurses-devel ncurses sys-libs/ncurses
openssl/ssl.h libssl-dev libopenssl-devel openssl-devel openssl openssl-devel openssl dev-libs/openssl
patch patch patch patch patchutils patch patch sys-devel/patch
perl-ExtUtils-MakeMaker perl-modules perl-ExtUtils-MakeMaker perl-ExtUtils-MakeMaker p5-extutils-makemaker perl-ExtUtils-MakeMaker perl-extutils-makemaker virtual/perl-ExtUtils-MakeMaker
perl-Thread-Queue ? ? ? ? perl-Thread-Queue ? ?
python2-dev python2-dev python-devel ? python2 python-devel python2 dev-lang/python:2
unzip unzip unzip unzip unzip unzip unzip app-arch/unzip
GNU Wget wget wget wget wget wget wget net-misc/wget
xgettext gettext gettext-tools gettext gettext gettext gettext sys-devel/gettext
xsltproc xsltproc libxslt-tools ? libxslt libxslt libxslt dev-libs/libxslt
zlib, zlib-static zlib1g-dev zlib-devel-static zlib-devel zlib-devel zlib-devel,zlib-static zlib sys-libs/zlib (USE=static-libs)

Package prerequisites

Unfortunately not all dependencies are checked by make config, especially for packages. You may encounter compile errors because you need a specific library in your system, and the only way is to search the missing library from the compiler error log and see what package contains it in your own distro.

The following table is a partial list of such dependencies:

Package Prerequisite Debian SUSE Red Hat macOS Fedora Arch Gentoo
boost bjam / boost-jam libboost1.55-dev boost-jam boost dev-util/boost-build
intltool [Perl] XML::Parser libxml-parser-perl perl-XML-Parser perl-XML-Parser intltool dev-perl/XML-Parser
libftdi libusb-config libusb-dev libusb-devel libusb dev-libs/libusb-compat
lilo as86,ld86 bin86 dev86 bin86 sys-devel/bin86
lilo bcc bcc dev86 aur/bcc sys-devel/dev86
lilo uudecode sharutils sharutils sharutils app-arch/sharutils
juajit x86 g++ libs on amd64 hosts g++-multilib
classpath javac, gcj openjdk-7-jdk java-1.7.0-openjdk-devel jdk7-openjdk dev-java/oracle-jdk-bin, sys-devel/gcc[gcj], and one (or both) of dev-java/icedtea-bin:7 and dev-java/icedtea:7
mac80211 b43-fwcutter b43-fwcutter b43-fwcutter net-wireless/b43-fwcutter
jamvm zip zip app-arch/zip

Linux distributions

Distribution-specific instructions.


apk add asciidoc bash bc binutils bzip2 cdrkit coreutils diffutils \
findutils flex g++ gawk gcc gettext git grep intltool libxslt \
linux-headers make ncurses-dev patch perl python2-dev python3-dev \
rsync tar unzip util-linux wget zlib-dev


pacman -S --needed bash bc bin86 binutils bzip2 cdrkit core/which \
diffutils fastjar findutils flex gawk gcc gettext git intltool \
libusb libxslt make ncurses openssl patch perl-extutils-makemaker \
pkgconf python3 rsync sharutils time unzip util-linux wget zlib

CentOS / Fedora

sudo dnf --skip-broken install bash-completion bzip2 gcc gcc-c++ git \
make ncurses-devel patch perl-Data-Dumper perl-Thread-Queue python2 \
rsync tar unzip wget perl-base perl-File-Compare perl-File-Copy \
perl-FindBin diffutils which

Debian / Ubuntu

sudo apt update
sudo apt install build-essential ccache ecj fastjar file g++ gawk \
gettext git java-propose-classpath libelf-dev libncurses5-dev \
libncursesw5-dev libssl-dev python python2.7-dev python3 unzip wget \
python3-distutils python3-setuptools rsync subversion swig time \
xsltproc zlib1g-dev 


echo \
app-arch/{bzip2,sharutils,unzip,zip} sys-process/time \
app-text/asciidoc \
dev-libs/{libusb-compat,libxslt,openssl} dev-util/intltool \
dev-vcs/{git,mercurial} net-misc/{rsync,wget} \
sys-apps/util-linux sys-devel/{bc,bin86,dev86} \
sys-libs/{ncurses,zlib} virtual/perl-ExtUtils-MakeMaker \
| sed "s/\s/\n/g" \
| sort \
| sudo tee /etc/portage/sets/openwrt-prerequisites \
&& sudo emerge -DuvNa "@openwrt-prerequisites"


sudo zypper install --no-recommends asciidoc bash bc binutils bzip2 \
fastjar flex gawk gcc gcc-c++ gettext-tools git git-core intltool \
libopenssl-devel libxslt-tools make mercurial ncurses-devel patch \
perl-ExtUtils-MakeMaker python-devel rsync sdcc unzip util-linux \
wget zlib-devel
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/guide-developer/build-system/install-buildsystem.txt · Last modified: 2020/11/22 15:56 by vgaetera