Project

General

Profile

Installation » History » Version 15

ptrkrysik, 07/09/2018 06:31 AM

1 14 ptrkrysik
h1. Installation
2
3
There are many ways to install *gr-gsm*:
4
* [[Installation#Manual-compilation-and-installation|Manual compilation and installation]]
5
* [[Installation#Installation-from-packages-on-Debian-Testing-and-Ubuntu-1804|Installation from distribution's packages]]
6 15 ptrkrysik
* [[Installation#Compilation-and-installation-with-use-of-Pybombs|Compilation and installation with use of Pybombs installation manager]]
7 14 ptrkrysik
8 2 ptrkrysik
h1. Manual compilation and installation
9 1 ptrkrysik
10 4 ptrkrysik
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":https://github.com/ptrkrysik/gr-gsm/tree/development/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.
11 1 ptrkrysik
12
The instructions presented here are a version of dockerfiles:https://github.com/ptrkrysik/gr-gsm/tree/development/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:https://github.com/ptrkrysik/gr-gsm/tree/development/tests/dockerfiles so in case of installation problems it is a good idea to look in there.
13 15 ptrkrysik
14
In general to install *gr-gsm* installation of folowing dependencies is required:
15
* *GNU Radio* with header files
16
* development tools: cmake, autoconf, libtool, pkg-config, g++, gcc, make, libc6 with headers, libcppunit with headers, swig, doxygen, liblog4cpp with headers, python-scipy
17
* gr-osmosdr
18
* libosmocore with header files
19
20
Then download the *gr-gsm*'s source and build it with following commands:
21
<pre>
22
git clone https://git.osmocom.org/gr-gsm
23
cd gr-gsm
24
mkdir build
25
cd build
26
cmake ..
27
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
28
make
29
</pre>
30
31
and as root:
32
<pre>
33
make install
34
ldconfig
35
</pre>
36
37
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.
38
39
Self-contained installation instructions for particular distributions that are tested with use of Travis CI are presented below.
40
41 1 ptrkrysik
42 6 ptrkrysik
h2. Debbian-based distributions (Debian Testing, Ubuntu 16.04+, Kali Rolling Edition) 
43 1 ptrkrysik
44 5 ptrkrysik
Install all needed prerequisites with following command:
45 1 ptrkrysik
46 3 ptrkrysik
<pre>
47 9 ptrkrysik
sudo apt-get update && sudo apt-get install -y \
48 1 ptrkrysik
    cmake \
49
    autoconf \
50
    libtool \
51
    pkg-config \
52
    build-essential \
53
    python-docutils \
54
    libcppunit-dev \
55
    swig \
56
    doxygen \
57
    liblog4cpp5-dev \
58
    python-scipy \
59
    gnuradio-dev \
60
    gr-osmosdr \
61
    libosmocore-dev
62 3 ptrkrysik
</pre>
63 1 ptrkrysik
64
Currently on Debian Testing and Kali Rolling execution of following command is needed:
65 3 ptrkrysik
<pre> sudo ln -sf /usr/lib/x86_64-linux-gnu/libvolk.so.1.3.1 /usr/lib/x86_64-linux-gnu/libvolk.so.1.3 </pre>
66 1 ptrkrysik
It is a workaround due to an "issue":https://github.com/ptrkrysik/gr-gsm/pull/378#issuecomment-379587145 with faulty libvolk installation on these systems at the moment.
67 5 ptrkrysik
68
<pre>
69
git clone https://git.osmocom.org/gr-gsm
70
cd gr-gsm
71
mkdir build
72
cd build
73
cmake ..
74
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
75
make
76
sudo make install
77
sudo ldconfig
78
</pre>
79
80
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.
81
82
h2. Fedora 26
83
84 9 ptrkrysik
Install all needed prerequisites with following command invoked with root's rights:
85 5 ptrkrysik
<pre>dnf install -y \
86
    gcc-c++ \
87
    make \
88
    cmake \
89
    pkgconfig \
90
    boost-devel \
91
    gnuradio-devel \
92
    libosmocore-devel \
93
    gr-osmosdr \
94
    swig \
95
    doxygen \
96
    python2-docutils \
97 8 ptrkrysik
    cppunit-devel
98 5 ptrkrysik
</pre>
99 1 ptrkrysik
100
Then download the *gr-gsm*'s source and build it with following commands:
101 3 ptrkrysik
<pre>
102 1 ptrkrysik
git clone https://git.osmocom.org/gr-gsm
103 4 ptrkrysik
cd gr-gsm
104
mkdir build
105
cd build
106
cmake ..
107 1 ptrkrysik
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
108
make
109
</pre>
110
111 9 ptrkrysik
and as root:
112
<pre>
113
make install
114
ldconfig
115
</pre>
116
117 1 ptrkrysik
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.
118
119
120
h1. Installation from packages on Debian Testing and Ubuntu 18.04+
121 9 ptrkrysik
122
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:
123 10 ptrkrysik
<pre>sudo apt-get install</pre>
124
125
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":
126
<pre>
127
wget http://git.osmocom.org/gr-gsm/plain/apps/grgsm_livemon.grc
128
grcc -d . grgsm_livemon.grc
129
mv grgsm_livemon.py grgsm_livemon
130
</pre>
131
Then move the grgsm_livemon file into a directory in the search path, i.e. /usr/local/bin.
132 11 ptrkrysik
133
h1. Compilation and installation with use of Pybombs
134
135 13 ptrkrysik
*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):
136 11 ptrkrysik
* head of *GNU Radio*'s master branch not compiling due to ongoing development,
137
* issues in *pybombs* resulting from intensive changes in the project,
138 1 ptrkrysik
* 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).
139 13 ptrkrysik
140
For installation of pybombs you will need git. On Debian based distributions you can get it with:
141
<pre>
142
sudo apt-get install git python-pip
143
</pre>
144
Then install *pybombs* with following command:
145
<pre>
146
sudo pip install PyBOMBS
147
</pre>
148
149
Then configure installation prefix:
150
<pre>
151
pybombs auto-config
152
pybombs recipes add-defaults
153
sudo pybombs prefix init /usr/local -a default_prx -R gnuradio-default
154
sudo pybombs config default_prefix default_prx
155
</pre>
156
157
**Then build and install *gr-gsm* with following command**:
158
<pre>
159
sudo pybombs install gr-gsm
160
</pre>
161
162
Pybombs will take care of downloading all of required libraries and for installation of *GNU Radio* and building *gr-gsm*.
163
164
It is required to have approximately 3.5GB of free space in /usr/local/src directory as everything will be built in there. If there is no enough space you can configure pybombs to use other directory as installation prefix.
165
166
At this moment many operating systems might not know where to look for new libgrgsm library. In order to update cache of links to new libraries run:
167
<pre>
168
sudo ldconfig
169
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)