BuildGuide: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Replaced content with "Page removed- all of this info is now in InstallingGR")
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
= Building GNU Radio manually from source =
Page removed- all of this info is now in [[InstallingGR]]
 
This article assumes you are not using the [[InstallingGR#Using-the-build-gnuradio-script|build-gnuradio]] script which runs you through the build process automatically, and do not wish to install from a [[InstallingGR#Using-pre-compiled-binaries|binary installation package]]. If you don't exactly know if this is correct for you, refer to the [[InstallingGR|install guide]] first.
 
For the impatient: Clone the gnuradio repo and run the standard cmake build chain (<code>cmake ..</code>, <code>make</code>, <code>make install</code>). On most distros, this does the trick.
 
== I. Meet dependencies ==
 
First, ensure that you've fulfilled the dependencies specified in the top-level: http://gnuradio.org/doc/doxygen/build_guide.html.
 
Most GNU/Linux systems come with our dependencies already packaged. You may need to install them off of your install CD/DVD or over the net. See below for Operating System specific notes.
 
=== Boost Dependency ===
 
We only absolutely ''require'' Boost 1.35 for GNU Radio to operate, but we recommend 1.47 or greater. There is a race-condition bug in earlier versions that can cause a flowgraph to lock up during a '''stop''' or '''unlock''' operation (see issue #477). If you are having this problem, check your Boost version and update accordingly.
 
== II. Get the source code ==
 
To build and install GNU Radio, you may either download a [[Download|release tarball]], or you may use the git client software to check out code from our git repository. Please refer to the [[Download|download page]] for pointers on where to get the code.
 
To get a handle on what's going on, clone the repository (if you haven't already), then run &quot;qgit&quot; or one of the other git viewers on it. It will show you all of the branching and merging, diffs, etc.
 
== III. Start the build process ==
 
To compile, there are 5 steps. Start by cd'ing to the gnuradio directory, then complete the following commands (this works on most Linux-based or -related distros):
 
<pre>
$ mkdir build
$ cd build
$ cmake ../
$ make &amp;&amp; make test
$ sudo make install
</pre>
This will perform all configuration checks and select for build, test, and installation all components that pass.<br />
The autotools build chain (using bootstrap, configure etc.) was replaced by CMake, in case you were wondering.
 
=== Common configuration options ===
 
The previous commands might work out of the box, but perhaps you have to tell cmake more information to make it work.<br />
Here's the most common switches:
 
* <code>-DENABLE_GR_XXX=ON</code> This enables (or disables for =OFF) the GNU Radio component named XXX. You might not need all of them, and this way, you can compile quicker.
* <code>-DCMAKE_INSTALL_PREFIX=XXX</code> Install your stuff to XXX.
* <code>-DQWT_INCLUDE_DIRS=/usr/include/qwt5</code> On some distros, cmake has trouble finding QWT. This solves it.
* <code>-DCMAKE_BUILD_TYPE=Debug</code> This causes gcc to add debug symbols to all binaries. Useful for debugging (otherwise, it decreases efficiency!)
 
If you use a cmake GUI, such ccmake or cmake-gui, it will prompt you with all the options (no need to learn them by heart).
 
=== Dealing with Old Build Problems ===
 
1) Uninstall gnuradio (from the build directory):
 
<pre>$ sudo make uninstall</pre>
If you don't have the build dir for the current build, you have to manually remove all GNU Radio related files from your install prefix (usually /usr/local/).
 
2) If you got the code through git, restore the original git files from any added files during an old build:
 
<pre>$ git clean -d -x -f</pre>
Then you can configure, make, etc. Careful: this really nukes any changes you made.
 
=== Generating GNU Radio Documentation ===
 
By default, gnuradio will automatically build documentation if '''doxygen''' and '''xmlto''' programs are installed prior to installing gnuradio, so make sure they are installed in your system. Doxygen is used to build the gnuradio C++ API documentation. The generated documents can be found and browsed at docs/doxygen/html/index.html. The xmlto is used to convert the extra documentation xml files (found in usrp, gr-trellis,..etc folders) to html files.
 
To generate the Python docs, you also need '''sphinx'''.
 
== IV. Operating System Specific Instructions ==
 
This section links to guides which go into more specific detail for a given operating system, outlining how to fulfill the build prerequisites, any non-standard build steps that must be taken, and general configuration issues. If a given operating system has binary installation packages or another automated way to build GNU Radio, it will be listed here.
 
* Linux
 
* [[ArchInstall|Arch]]
 
* [[DebianInstall|Debian]]
 
* [[FedoraInstall|Fedora]]
 
* [[GentooInstall|Gentoo]]
 
* [[MandrivaInstall|Mandriva]]
 
* [[SuseInstall|SuSE]]
 
* [[UbuntuInstall|Ubuntu]]
 
* [[MacInstall|Mac OS X]]
* [[NetBSDInstall|NetBSD]] (likely also appropriate for DragonflyBSD and helpful for OpenBSD)
* [[FreeBSDInstall|FreeBSD]]
* [[WindowsInstall|Windows]]
 
== Installation on the Play Station 3 ==
 
* [[PS3FC8Install|Fedora 8 (recommended)]]
* [[PS3FC7Install|Fedora 7]]
* [[PS3FC6Install|Fedora 6]]
 
== USRP FPGA Firmware ==
 
To compile the verilog source code for the fpga firmware for the usrp you need Altera Quartus II Web Edition. '''This is only needed if you change the verilog code''', since the distribution contains pre-compiled versions of this firmware.
 
[[QuartusUnderLinux|How to run Quartus II under Linux]]
 
== Current Known Build Problems ==
 
[https://github.com/gnuradio/gnuradio/issues Open build issues]

Latest revision as of 17:07, 19 May 2019

Page removed- all of this info is now in InstallingGR