aboutsummaryrefslogtreecommitdiffstats
path: root/docs/doxygen/other/build_guide.dox.in
blob: aa4f190acd85c0aa7fbff844d2b2dfdf300d9e07 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
# Copyright (C) 2017 Free Software Foundation, Inc.
#
# Permission is granted to copy, distribute and/or modify this document
# under the terms of the GNU Free Documentation License, Version 1.3
# or any later version published by the Free Software Foundation;
# with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
# A copy of the license is included in the section entitled "GNU
# Free Documentation License".

        /*! \page build_guide Build Instructions and Information

\section dependencies Dependencies

The list of GNU Radio dependencies and the minimum required versions,
if any, to build the various GNU Radio components.

Most of these components do not need to be individually compiled or
installed. Instead, rely on your operating system's package manager or
binary installation process (the <b>apt-get</b> or \b apt system in Debian and
Ubuntu, <b>yum</b> or \b dnf in RedHat and Fedora, etc.). GNU Radio tries to keep an
up-to-date build guide for the majority of the supported operating
systems on gnuradio.org
(https://wiki.gnuradio.org/index.php/BuildGuide).

Not all dependencies are required for all components, and not all
components are required for a given installation. The list of required
components is determined by what the user requires from GNU Radio. If,
for example, you do not use any UHD-based hardware, do not worry
about building gr-uhd.

Before trying to build these from source, please try your system's
installation tool (apt-get, pkg_install, YaST, yum, urpmi, etc.)
first. Most recent systems have these packages available.

\subsection dep_global Global Dependencies

\li git                                        http://git-scm.com/downloads
\li cmake       (>= @GR_CMAKE_MIN_VERSION@)    http://www.cmake.org/cmake/resources/software.html
\li boost       (>= @GR_BOOST_MIN_VERSION@)    http://www.boost.org/users/download/
\li mako        (>= @GR_MAKO_MIN_VERSION@)     http://www.makotemplates.org/download.html
\li log4cpp     (>= 1.0)                       http://log4cpp.sourceforge.net/

A C/C++ compiler is also required. These are known to work:

\li gcc/g++     (>= @GCC_MIN_VERSION@)         https://gcc.gnu.org/install/download.html
\li clang/clang++ (>= @CLANG_MIN_VERSION@)     http://releases.llvm.org/download.html
\li Microsoft Visual Studio (>= @MSVC_MIN_VERSION@)

Other compilers may work, but are not supported.

\subsection dep_python Python Wrappers
\li python      (>= @GR_PYTHON_MIN_VERSION@)   http://www.python.org/download/
\li swig        (>= @GR_SWIG_MIN_VERSION@)     http://www.swig.org/download.html
\li numpy       (>= 1.1.0)                     http://sourceforge.net/projects/numpy/files/NumPy/

\subsection dep_docs docs: Building the documentation
\li doxygen     (>= 1.5)     http://www.stack.nl/~dimitri/doxygen/download.html

\subsection dep_grc grc: The GNU Radio Companion
\li Cheetah     (>= 2.0)     http://www.cheetahtemplate.org/
\li pygtk       (>= 2.10)    http://www.pygtk.org/downloads.html

\subsection dep_fft gr-fft: Fast Frequency Transform
\li fftw3f      (>= 3.0.1)   http://www.fftw.org/download.html

\subsection dep_zeromq gr-zeromq: ZeroMQ Network layer
\li ZeroMQ      (>= 3.2.5)       http://www.zeromq.org/
\li cppzmq      (>= git 6c17af2) https://github.com/zeromq/cppzmq

cppzmq is included (undocumentedly) in the debian and Ubuntu libzmq3-dev packages.

\subsection dep_wavelet gr-wavelet: Collection of wavelet blocks
\li gsl         (>= 1.10)    http://gnuwin32.sourceforge.net/packages/gsl.htm

\subsection dep_gr_qtgui gr-qtgui: The QT-based Graphical User Interface
\li qt5         (>= 5.0.0)   http://qt.nokia.com/downloads/
\li qwt         (>= 5.2.0)   http://sourceforge.net/projects/qwt/
\li pyqt        (>= 4.10.0)  http://www.riverbankcomputing.co.uk/software/pyqt/download

\li python-lxml (>= 1.3.6)   http://lxml.de/

\subsection dep_gr_audio gr-audio: Audio Subsystems (system/OS dependent)
\li audio-alsa  (>= 0.9)     http://www.alsa-project.org
\li audio-jack  (>= 0.8)     http://jackaudio.org/
\li portaudio   (>= 19)      http://www.portaudio.com/
\li audio-oss   (>= 1.0)     http://www.opensound.com/oss.html
\li audio-osx
\li audio-windows

<b>Optional</b>

It is not necessary to satisfy all of these dependencies; just the
one(s) that are right for your system. On Linux, don't expect
audio-osx and audio-windows to be either satisfied or built.

\subsection dep_uhd uhd: The Ettus USRP Hardware Driver Interface
\li uhd         (>= 3.5.5)   https://www.ettus.com/downloads

\subsection dep_gr_fdc gr-fcd: The FunCube Dongle hardware interface (only if you want to use one)
\li libUSB(x)   (version platform-dependent)   http://www.libusb.info/

\subsection dep_gr_video_sdl gr-video-sdl: PAL and NTSC display (rarely used)
\li SDL	        (>= 1.2.0)   http://www.libsdl.org/download-1.2.php

\ref page_ctrlport may use various backends to perform the RPC
process, and each is its own dependency.

Currently, ControlPort only supports the Apache Thrift backend.

\li thrift       (>= 0.9.2)   https://thrift.apache.org/

To have nice formula formatting in doxygen, you'll need LaTeX; for python docs, sphinx:

\li latex        (>= 2.0)     http://www.latex-project.org/
\li sphinx       (>= 1.2.2)   http://www.sphinx-doc.org/

\section build_gr_cmake Building GNU Radio

GNU Radio is built using the CMake build system
(http://www.cmake.org/). The standard build method is as follows:

\code
$ mkdir $(builddir)
$ cd $(builddir)
$ cmake [OPTIONS] $(srcdir)
$ make
$ make test
$ sudo make install
\endcode

The \$(builddir) is the directory in which the code is built. This
<b>cannot</b> be the same path as where the source code resides. Often,
\$(builddir) is \$(srcdir)/build.

\section cmake_options CMake Options

Options can be used to specify where to find various library or
include file dependencies that are not automatically being found
(-DCMAKE_PREFIX_PATH) or set the install prefix
(-DCMAKE_INSTALL_PREFIX=(dir)).

Components can also be enabled and disabled through the options. For a
component named *gr-comp*, the option to disable would look like:
-DENABLE_GR_COMP=off. The "off" could also be "false" or "no", and
cmake is not case sensitive about these options. Similarly, "true",
"on", or "yes" will turn this component on. All components are enabled
by default so long as their dependencies are met.

An example is -DENABLE_PYTHON=False turns off building any Python or
Swigging components. The result will be the GNU Radio libraries and
C++ programs/applications/examples. No Python or GRC files will be
built or installed.

The -DENABLE_DEFAULT=False can be used to disable all
components. Individual components can then be selectively turned back
on. For example, just buidling the VOLK library can be
done with this:

\code
cmake -DENABLE_DEFAULT=Off -DENABLE_VOLK=True <srcdir>
\endcode


The build type allows you to specify the build as a debug or release
version. Each type sets different flags for different purposes. To set
the build type, use:

\code
-DCMAKE_BUILD_TYPE=<type>
\endcode

The available build types and the C/C++ flags they set are:

\li None: No flags; define them yourself
\li Release: -O3
\li Debug: -O2 -g
\li RelWithDebInfo: -O3 -g
\li MinSizeRel: -Os
\li NoOptWithASM: -O0 -g -save-temps
\li O2WithASM: -O2 -g -save-temps
\li O3WithASM: -O3 -g -save-temps

If not specified, the "Release" mode is the default.


\subsection cmake_other Collection of CMake Flags

\li CMAKE_BUILD_TYPE: Build profile type defined above. Default is "release".
\li CMAKE_INSTALL_PREFIX: Installation prefix path. Default is "/usr/local".
\li ENABLE_PYTHON: Turn Python bindings on/off. Default is True.
\li ENABLE_GR_<component>: Turn any top-level component on/off. Default is True for all.
\li ENABLE_GR_CTRLPORT: Turn Building ControlPort. Default is True
\li ENABLE_PERFORMANCE_COUNTERS: Turn performance counters on/off in runtime. Default is True.
\li ENABLE_ORC: tells VOLK enable/disable use of Orc. Default is True.
\li ENABLE_STATIC_LIBS: build static library files. Default is False.
\li CMAKE_TOOLCHAIN_FILE: A toolchain file to setup the CMake environment for cross-compiling.

Here are some other potentially helpful CMake flags. These are to help you specifically locate certain dependencies. While the CMake scripts themselves should generally find these for us, we can use these to help direct CMake to specific locations if we have installed a different version elsewhere on the system that CMake doesn't know about.

\li QWT_LIBRARIES: shared library to use for Qwt (in the form \<path\>/libqwt.so).
\li QWT_INCLUDE_DIRS: path to Qwt include files (e.g., /usr/include/qwt).
\li PYTHON_EXECUTABLE: Location of the 'python' binary you want to use (e.g., /usr/bin/python2.7).
\li PYTHON_INCLUDE_PATH: path to Python include files (e.g., /usr/include/python2.7).
\li PYTHON_LIBRARY: Python's shared library location (e.g., /usr/lib/python2.7.so.1).
\li Boost_INCLUDE_DIR: location of the 'boost' header file directory (e.g., /usr/include).
\li Boost_LIBRARY_DIRS: location of the libboost-xxx.so files (e.g., /usr/lib)


Other dependencies will have similar settings like these to properly locate them.


\subsection build_gr_cmake_e100 Building for the E100

To build GNU Radio on the Ettus Research E100 embedded platforms,
CMake has to know that the processors uses the NEON extensions. Use
the

\code
cmake -DCMAKE_CXX_FLAGS:STRING="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g" \
      -DCMAKE_C_FLAGS:STRING="-mcpu=cortex-a8 -mfpu=neon -mfloat-abi=softfp -g" \
       <gr_source_dir>
\endcode

*/