Project

General

Profile

Installation » History » Version 28

Version 27 (ptrkrysik, 02/15/2020 06:29 PM) → Version 28/29 (ptrkrysik, 02/15/2020 07:05 PM)

h1. Installation

There are many ways to install *gr-gsm*:
* [[Installation#Manual-compilation-and-installation|Manual compilation and installation]]
* [[Installation#Installation-from-packages-on-Debian-Testing-and-Ubuntu-1804|Installation from distribution's packages]]
* [[Installation#Compilation-and-installation-with-use-of-Pybombs|Compilation and installation with use of Pybombs installation manager]]

h1. Manual compilation and installation

Currently manual method of installation is considered to be the easiest way to get newest version of *gr-gsm* up and running. The *gr-gsm* repository contains automatic tests of manual installation in form of "dockerfiles":http://git.osmocom.org/gr-gsm/tree/tests/dockerfiles that are built and executed by "Travis CI":https://travis-ci.org/ptrkrysik/gr-gsm/builds continuous integration service. Travis CI informs if particular revision of *gr-gsm* builds and passes tests on a set of GNU/Linux distributions. History of the results can be checked on "the *gr-gsm*'s Travis CI page":https://travis-ci.org/ptrkrysik/gr-gsm/builds.

The instructions presented here are a version of "dockerfiles":http://git.osmocom.org/gr-gsm/tree/tests/dockerfiles with stripped instructions specific to docker and without running unit tests. This wiki might at some moment be behind installation procedures contained in the "dockerfiles":http://git.osmocom.org/gr-gsm/tree/tests/dockerfiles so in case of installation problems it is a good idea to look in there.

In general to install *gr-gsm* installation of folowing dependencies is required:
* *GNU Radio* with header files
* development tools: git, cmake, autoconf, libtool, pkg-config, g++, gcc, make, libc6 with headers, libcppunit with headers, swig, doxygen, liblog4cpp with headers, python-scipy
* gr-osmosdr
* libosmocore with header files

After installing them download the *gr-gsm*'s source and build it with following commands:
<pre>
git clone https://git.osmocom.org/gr-gsm
cd gr-gsm
git checkout maint-3.7
mkdir build
cd build
cmake ..
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
make
</pre>

and as root:
<pre>
make install
ldconfig
</pre>

To speedup compilation instead of "make" you can use parallel build <pre>make -j $nproc</pre> where "$nproc" is number of CPU cores. The "mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/" line is there because without it parallel build sometimes fails.

Self-contained installation instructions for particular distributions that are tested with use of Travis CI are presented below.

h2. Debbian-based distributions (Debian Testing, Ubuntu 16.04+, Kali Rolling Edition)

Install all needed prerequisites with following command ('sudo' is needed on Ubuntu based distributions, on other distributions it should be omitted and commands starting with 'sudo' should be executed with superuser rights):

<pre>
sudo apt-get update && \
sudo apt-get install -y \
cmake \
autoconf \
libtool \
pkg-config \
build-essential \
python-docutils \
libcppunit-dev \
swig \
doxygen \
liblog4cpp5-dev \
python-scipy \
python-gtk2 \
gnuradio-dev \
gr-osmosdr \
libosmocore-dev
</pre>

Then download the gr-gsm's source and build it with following commands:
<pre>
git clone https://git.osmocom.org/gr-gsm
cd gr-gsm
git checkout maint-3.7
mkdir build
cd build
cmake ..
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
make
sudo make install
sudo ldconfig
</pre>

To speedup compilation instead of "make" you can use parallel build <pre>make -j $nproc</pre> where "$nproc" is number of CPU cores. The "mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/" line is there because without it parallel build sometimes fails.

h2. Fedora 26

Install all needed prerequisites with following command invoked with root's rights:
<pre>dnf install -y \
gcc-c++ \
make \
cmake \
pkgconfig \
boost-devel \
gnuradio-devel \
libosmocore-devel \
gr-osmosdr \
swig \
doxygen \
python2-docutils \
cppunit-devel
</pre>

Then download the *gr-gsm*'s source and build it with following commands:
<pre>
git clone https://git.osmocom.org/gr-gsm
cd gr-gsm
mkdir build
cd build
cmake ..
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
make
</pre>

and as root:
<pre>
make install
ldconfig
</pre>

To speedup compilation instead of "make" you can use parallel build <pre>make -j $nproc</pre> where "$nproc" is number of CPU cores. The "mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/" line is there because without it parallel build sometimes fails.

h1. Installation from packages on Debian Testing and Ubuntu 18.04+

Thanks to work of Petter Reinholdtsen *gr-gsm* has packages for Debian Testing that were subsequently included in Ubuntu starting from 18.04. On these systems *gr-gsm* can be installed by simply doing:
<pre>sudo apt-get install gr-gsm</pre>

As of *gr-gsm*'s version 0.41.2 grgsm_livemon application doesn't work because of change of PyQT version in current Debian Testing and Ubuntu 18.04. In order to use this program you can generate new version out of "grgsm_livemon.grc":
<pre>
wget http://git.osmocom.org/gr-gsm/plain/apps/grgsm_livemon.grc
grcc -d . grgsm_livemon.grc
mv grgsm_livemon.py grgsm_livemon
</pre>
Then move the grgsm_livemon file into a directory in the search path, i.e. /usr/local/bin.

h1. Compilation and installation with use of Pybombs

*The This part needs update because of pybombs installation is broken because mainline gr-gsm is not compatible with GNU Radio 3.8 yet.*



*Pybombs* is *GNU Radio* project's installation manager that installs *GNU Radio* and related projects, *gr-gsm* included. In times when distributions provided too old *GNU Radio*, *pybombs* offered the most straightforward way of installing *gr-gsm* as it automagically compiles newest *GNU Radio* and all other *gr-gsm*'s prerequisites. *Pybombs* is doing quite complex work of figuring out what too install from packages of distribution and what to compile. Failures to install *gr-gsm* with use of *pybombs* were quite widespread among *gr-gsm* users due to many reasons. Some of them (in addition to general issues of *gr-gsm* installation):
* head of *GNU Radio*'s master branch not compiling due to ongoing development,
* issues in *pybombs* resulting from intensive changes in the project,
* small set of distributions on which *pybombs* is regularly tested (i.e. never ending problems on Kali Linux that is distribution of choice for many of *gr-gsm*'s users due to some unknown reason).

For installation of pybombs you will need git. On Debian based distributions you can get it with:
<pre>
sudo apt-get install git python-pip
</pre>
Then install *pybombs* with following command:
<pre>
sudo pip install PyBOMBS
</pre>

Then configure installation prefix (here ~/gr_prefix directory is used - it can be changed to any other path, 'myprefix' is the name of the prefix and it also can be changed):
<pre>
pybombs auto-config
pybombs recipes add-defaults
#the line below is workaround for this issue: https://github.com/gnuradio/gr-recipes/issues/173
cp ~/.pybombs/recipes/gr-recipes/gnuradio37.lwr ~/.pybombs/recipes/gr-recipes/gnuradio.lwr
pybombs prefix init ~/gr_prefix -a myprefix -R gnuradio-default gnuradio-stable
</pre>

**Then build and install *gr-gsm* in 'myprefix' with following command**:
<pre>
pybombs -p myprefix install gr-gsm
</pre>

Pybombs will take care of downloading all of required libraries and for installation of *GNU Radio* and building *gr-gsm*.

It is required to have approximately 3.5GB of free space in the prefix directory as everything will be built in there.

In order to use gr-gsm installed in the prefix, environment variables (PATH, PYTHONPATH, LD_LIBRARY_PATH, LIBRARY_PATH) need to be set with following command (for bash):
source ~/gr_prefix/setupenv.sh

To get the environment variables loaded on every launching of a bash terminal add 'source ~/gr_prefix/setupenv.sh' command at the end of a '.bashrc' file:
echo 'source ~/gr_prefix/setupenv.sh' >> ~/.bashrc
Add picture from clipboard (Maximum size: 48.8 MB)