Project

General

Profile

Installation » History » Version 14

ptrkrysik, 07/09/2018 06:18 AM
Installation - list of methods

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
* [[Installation#Compilation-and-installation-with-use-of-Pybombs|Compilation and installation with use of Pybombs]]
7
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 4 ptrkrysik
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 1 ptrkrysik
14 6 ptrkrysik
h2. Debbian-based distributions (Debian Testing, Ubuntu 16.04+, Kali Rolling Edition) 
15 1 ptrkrysik
16 5 ptrkrysik
Install all needed prerequisites with following command:
17 1 ptrkrysik
18 3 ptrkrysik
<pre>
19 9 ptrkrysik
sudo apt-get update && sudo apt-get install -y \
20 1 ptrkrysik
    cmake \
21
    autoconf \
22
    libtool \
23
    pkg-config \
24
    build-essential \
25
    python-docutils \
26
    libcppunit-dev \
27
    swig \
28
    doxygen \
29
    liblog4cpp5-dev \
30
    python-scipy \
31
    gnuradio-dev \
32
    gr-osmosdr \
33
    libosmocore-dev
34 3 ptrkrysik
</pre>
35 1 ptrkrysik
36
Currently on Debian Testing and Kali Rolling execution of following command is needed:
37 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>
38 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.
39 5 ptrkrysik
40
<pre>
41
git clone https://git.osmocom.org/gr-gsm
42
cd gr-gsm
43
mkdir build
44
cd build
45
cmake ..
46
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
47
make
48
sudo make install
49
sudo ldconfig
50
</pre>
51
52
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.
53
54
h2. Fedora 26
55
56 9 ptrkrysik
Install all needed prerequisites with following command invoked with root's rights:
57 5 ptrkrysik
<pre>dnf install -y \
58
    gcc-c++ \
59
    make \
60
    cmake \
61
    pkgconfig \
62
    boost-devel \
63
    gnuradio-devel \
64
    libosmocore-devel \
65
    gr-osmosdr \
66
    swig \
67
    doxygen \
68
    python2-docutils \
69 8 ptrkrysik
    cppunit-devel
70 5 ptrkrysik
</pre>
71 1 ptrkrysik
72
Then download the *gr-gsm*'s source and build it with following commands:
73 3 ptrkrysik
<pre>
74 1 ptrkrysik
git clone https://git.osmocom.org/gr-gsm
75 4 ptrkrysik
cd gr-gsm
76
mkdir build
77
cd build
78
cmake ..
79 1 ptrkrysik
mkdir $HOME/.grc_gnuradio/ $HOME/.gnuradio/
80
make
81
</pre>
82
83 9 ptrkrysik
and as root:
84
<pre>
85
make install
86
ldconfig
87
</pre>
88
89 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.
90
91
92
h1. Installation from packages on Debian Testing and Ubuntu 18.04+
93 9 ptrkrysik
94
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:
95 10 ptrkrysik
<pre>sudo apt-get install</pre>
96
97
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":
98
<pre>
99
wget http://git.osmocom.org/gr-gsm/plain/apps/grgsm_livemon.grc
100
grcc -d . grgsm_livemon.grc
101
mv grgsm_livemon.py grgsm_livemon
102
</pre>
103
Then move the grgsm_livemon file into a directory in the search path, i.e. /usr/local/bin.
104 11 ptrkrysik
105
h1. Compilation and installation with use of Pybombs
106
107 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):
108 11 ptrkrysik
* head of *GNU Radio*'s master branch not compiling due to ongoing development,
109
* issues in *pybombs* resulting from intensive changes in the project,
110 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).
111 13 ptrkrysik
112
For installation of pybombs you will need git. On Debian based distributions you can get it with:
113
<pre>
114
sudo apt-get install git python-pip
115
</pre>
116
Then install *pybombs* with following command:
117
<pre>
118
sudo pip install PyBOMBS
119
</pre>
120
121
Then configure installation prefix:
122
<pre>
123
pybombs auto-config
124
pybombs recipes add-defaults
125
sudo pybombs prefix init /usr/local -a default_prx -R gnuradio-default
126
sudo pybombs config default_prefix default_prx
127
</pre>
128
129
**Then build and install *gr-gsm* with following command**:
130
<pre>
131
sudo pybombs install gr-gsm
132
</pre>
133
134
Pybombs will take care of downloading all of required libraries and for installation of *GNU Radio* and building *gr-gsm*.
135
136
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.
137
138
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:
139
<pre>
140
sudo ldconfig
141
</pre>
Add picture from clipboard (Maximum size: 48.8 MB)