Build from Source » History » Revision 6
- Table of contents
- Build from Source
- Download Sources
- Details and Troubleshooting
- Example: build openbsc
- Example: build script
Build from Source¶
Before you consider building from source, be aware that there are Nightly Builds
available for Debian + Ubuntu platforms. These are recommended for normal users.
Osmocom projects use autoconf/automake.
The general pattern for building is:
cd source-tree autoreconf -fi ./configure make make check make install
./configure step may need further configuration options, and
./configure will tell you which dependencies are still missing, if any.
See below for project specific details and troubleshooting.
make step may be sped up by using multiple CPU cores:
make -j 8
We take care to make our builds parallelizable with
-j, but in case
make -j fails, issuing a simple
make could fix the problem (expecting
this only in libsmpp34).
Which libraries are needed by various Osmocom programs is best resolved during
./configure step described below. This script checks for any missing
dependencies and issues corresponding error messages.
Here is a (probably incomplete) overview of dependencies between Osmocom
|To build ...
|... you also need ...
|libosmocore, libosmo-abis, openbsc (source tree only), L1 headers depending on BTS model
|libosmocore, L1 headers depending on BTS model
|openbsc: osmo-nitb, osmo-bsc, osmo-sgsn, osmo-bsc_nat, osmo-bsc_mgcp
|libosmocore, libosmo-abis, libosmo-netif, libosmo-sccp, libsmpp34
|openbsc: 3G osmo-cscn (branch sysmocom/iu)
|libosmocore, libosmo-abis, libosmo-netif (branch sysmocom/sctp), libosmo-sccp (branch sysmocom/iu), asn1c, libasn1c, osmo-iuh
|libosmocore, libosmo-netif, libosmo-sccp, asn1c, libasn1c
The latest Osmocom sources are available from git at https://git.osmocom.org,
where each project's overview page displays the actual git URL.
The projects' repository URLs generally are of the pattern:
(To contribute, see Submitting Patches)
For example, to verify libosmocore's git repository URL, browse to
https://git.osmocom.org/libosmocore/ and observe the URL shown at the
bottom of the page under Clone:
Then download this URL using the
git clone git://git.osmocom.org/libosmocore
It is also possible to download specific releases' tarballs for each git ref
that is defined. For example, browse to https://git.osmocom.org/libosmocore/,
click on refs on the top and select any branch or tag, e.g. 0.9.0
All of these download instructions hold true for any of the git repositories
Details and Troubleshooting¶
Here is a list of the most common configuration items or pitfalls to be
aware of when building specific Osmocom projects.
On systems like FreeBSD, you need to run
gmake instead of
General ./configure options¶
To provide the installation location, which is /usr/local by default:
If you choose a non-standard location, later builds may fail to find it.
For example, if you built libosmocore with a custom prefix, a subsequent
build of libosmo-abis, which needs libosmocore installed, may fail.
You can tell a build process where to look for libraries to compile against
PKG_CONFIG_PATH environment variable.
Furthermore, when you want to run binaries compiled against libraries
installed in a non-standard location, you will have to use the
LD_LIBRARY_PATH environment variable to successfully load the binary.
make check step typically runs such binaries,
as well as when you would like to run the installed binaries yourself.
mkdir -p $HOME/osmo/src cd $HOME/osmo/src git clone git://git.osmocom.org/libosmocore cd libosmocore autoreconf -fi ./configure --prefix=$HOME/osmo/inst --disable-pcsc make -j5
libpcsclite is not easily available, e.g. when building for a BTS target platform: