Building GnuRadio and the RTL-SDR Tools

This is the procedure I used for building GnuRadio and the RTL-SDR libraries, published in case it might be useful.  I prefer to build GnuRadio in its own tree at /opt/gnuradio, so if you follow these instructions verbatim you will need to source the /opt/gnuradio/setupenv script described below before each use.  This adds the GR directories to the path.  Alternatively you should be able to omit the -DCMAKE_INSTALL_PREFIX switches to have it install at /usr/local.

Various dependencies will show up during cmake configuration of GR. These need to be installed from the repos in addition to the follow steps. At least the following will be needed (and possibly more). Tested on Linux Mint 12 (Ubuntu 11.10):

  • swig
  • libcppunit-dev
  • volk
  • python-dev
  • python-cheetah
  • libboost1.48-all-dev
  • libsdl-dev
  • libusb-1.0-0-dev
  • doxygen
  • libfftw3-dev
  • python-wxgtk2.8
  • libwxgtk2.8-dev
  • libqt4-dev
  • libqwt5-qt4-dev
  • python-numpy
  • python-lxml

Packages required:

  • gnuradio-3.6.5
  • git://git.osmocom.org/rtl-sdr.git
  • git://git.osmocom.org/gr-osmosdr

Build Gnuradio:

$ cd gnuradio-3.6.5
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gnuradio ..
$ make
$ sudo make install

Add to path (create the following as /opt/gnuradio/setupenv):

export PATH=/opt/gnuradio/bin:$PATH
export LD_LIBRARY_PATH=/opt/gnuradio/lib:$LD_LIBRARY_PATH
export PKG_CONFIG_PATH=/opt/gnuradio/lib/pkgconfig:$PKG_CONFIG_PATH
export PYTHONPATH=/opt/gnuradio/lib/python2.7/dist-packages:$PYTHONPATH

Source to current shell:

$ source /opt/gnuradio/setupenv

Build rtl-sdr:

NOTE: Need to be on the gr3.6 branch now (git checkout gr3.6).

$ cd rtl-sdr
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gnuradio ..
$ make
$ sudo make install

Build gr-iqbal (git clone git://git.osmocom.org/gr-iqbal.git):

NOTE: Need to be on the gr3.6 branch (git checkout gr3.6):

$ cd gr-iqbal
$ git submodule update
$ git submodule init
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gnuradio ..
$ make
$ sudo make install

Build gr-osmosdr:

$ cd gr-osmosdr
$ mkdir build && cd build
$ cmake -DCMAKE_INSTALL_PREFIX=/opt/gnuradio \
  -DGNURADIO_CORE_INCLUDE_DIRS=/opt/gnuradio/include/gnuradio .. -Wno-dev
$ make
$ sudo make install

 

 

Leave a Reply

Your email address will not be published. Required fields are marked *