Project

General

Profile

Installation » History » Version 28

ptrkrysik, 02/15/2020 07:05 PM

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