Installing GNU Radio with Cygwin
The easiest way to install GNU Radio on Windows is to use the Cygwin (http://www.cygwin.com) environment. Once Cygwin and the required utilities and third-party libraries are installed, installation of GNU Radio is almost as easy on Windows as it is on Linux.
To install GNU Radio with Cygwin you need to:
- Install the Cygwin environment
- Install the required utilities and third-party libraries
- Build and install GNU Radio
- Install the driver for the USRP (if you have a USRP)
Installing Cygwin
Installing Cygwin is easy, but there are a few details to worry about; see getting started with Cygwin.
Installing Utilities and Third-Party Libraries
Utilities and third-party libraries are of two types: those that are available as Cygwin packages and those that must be downloaded and/or built separately.
Installing Cygwin packages
You will need the following Cygwin packages to build GNU Radio. For instructions on installing Cygwin packages see getting started with Cygwin:
- autoconf
- automake1.10 (or automake1.9)
- binutils 20060817-1 (see hints, tips, known problems, and solutions for Windows)
- boost-devel (boost 1.35 or later required for svn install; see below)
- cppunit (1.12.0 or later required)
- gcc-g++ (version 3.4.4-2 or later preferred)
- libtool (version 2.2 or later; see hints, tips, known problems, and solutions for Windows)
- make
- patch
- pkg-config
- python (instructions below assume you have python 2.5)
- swig (Note: GNU Radio requires version 1.3.31 or higher of swig; until this version is available as a package, you will need to build your own from source; see hints, tips, known problems, and solutions for Windows.)
In order to use a USRP you will also need:
- guile
- libusb-win32
If you want to install from SVN you will need:
- subversion
Other libraries and utilities
Some of the libraries and utilities required by GNU Radio are not available as Cygwin packages. These packages must be installed manually:
- FFTW: the Cygwin package does not include single precision; see installing FFTW
- wxPython: not required for all applications, but extremely useful; see installing wxPython
- NumPy (Numerical Python): a package of numerical extensions for python; see installing NumPy
- swig: you need version 1.3.31 or higher; see hints, tips, known problems, and solutions for Windows
If you need simultaneous capture and play of audio from your sound card or have difficulties with the basic audio support, you may want:
- PortAudio: see installing PortAudio
If you have a USRP you will also need:
- SDCC (Small Device C Compiler); see installing SDCC on Windows
Building and Installing a GNU Radio Release
GNU Radio can be built either from a release tarball (more stable) or from the latest code in the svn repository (latest features). This section describes how to build from the release tarball. Additional considerations when building from the svn repository are described later.
Downloading the Release Source Code
Download the latest release of the GNU Radio source code from ftp://ftp.gnu.org/gnu/gnuradio/gnuradio-3.1.3.tar.gz to a convenient working directory and unpack it with
$ tar zxf gnuradio-3.1.3.tar.gz
to produce the directory gnuradio-3.1.3.
Preparing to Build
You must specify where to find the pkg-config configuration files:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
Building a Minimal GNU Radio System
GNU Radio is a large system with many options. The simplest build procedure configures and builds all the modules that it can, but you can customize your installation (and maybe save some time) by specifying appropriate options. For a first test, it is helpful to build a minimal GNU Radio. This is done with the commands:
$ cd gnuradio-3.1.3 $ ./configure --with-boost-include-dir=/usr/include/boost-1_33_1 --disable-all-components --enable-omnithread --enable-gnuradio-core --enable-gr-audio-oss
(assuming that boost is installed in the directory indicated). This disables all components except those explicity enabled, namely omnithread, gnuradio-core, and gr-audio-oss. To build and install these components use the commands:
$ make $ make check $ make install
You may get warning messages, but unless one of these commands stops with an error message you should have a working installation of GNU Radio. If you do get errors be sure to check hints, tips, known problems, and solutions for Windows. If an older version of GNU Radio was installed previously, you should remove it with make uninstall before you get to make check.
To use GNU Radio you need to tell Python where to find it:
$ export PYTHONPATH=/usr/local/lib/python2.5/site-packages
You can save yourself some trouble by adding this line to your ~/.bash_profile file.
To actually make GNU Radio do something, try:
$ cd gnuradio-3.1.3/gnuradio-examples/python/audio $ python dial_tone.py
This should produce a dialtone through your speakers. If Python gives you an error message, there is a problem with your installation of GNU Radio. If you get no error messages but no sound, check to see that your speakers are turned on, your volume is turned up, and that the "Wave" source is enabled in your audio control panel. Use Ctrl-C to stop the dialtone. If dial_tone.py stops by itself without producing sound or gives a Windows error pop-up, your version of Cygwin may be out of date (see hints, tips, known problems, and solutions for Windows).
With this minimal GNU Radio system you can capture signals from your sound card, read signals from a file, or generate signals; process signals; and play signals on your sound card or save them to a file. Note that you cannot simultaneously capture and play signals using the same sound card with gr-audio-oss.
Building a Full GNU Radio System
Building a full GNU Radio system is simpler but takes longer:
$ cd gnuradio-3.1.3 $ ./configure --with-boost-include-dir=/usr/include/boost-1_33_1
This enables all components for which the required libraries and utilities are available. To build and install these components use the commands:
$ make $ make check $ make install
Unless one of these steps fails due to an error, you should have a working GNU Radio installation. If one of the steps fails, you may be able to disable the component that failed. Use ./configure --help to see how the components are named. Look for the "--enable-..." options and add the corresponding "--disable-..." option to your ./configure command and repeat the above steps. If an old version of GNU Radio is installed, you should remove it with make uninstall before doing make check.
Building and Installing GNU Radio from the SVN Repository
If you want the latest features and are willing to deal with code that is still in development, you can check out the latest code from the subversion (svn) repository:
$ svn co http://gnuradio.org/svn/gnuradio/trunk gnuradio
Be sure to use the Cygwin version of subversion (available from Cygwin setup); other versions of svn for Windows may produce files with an extra CR (^M) character at the end of each line.
The procedure for building the svn version is like that given above for building the release version, but because the svn version is constantly changing, there may be extra requirements a need for patches. Note that the lists of requirements and patches may become out of date at any time.
Extra requirements:
- boost 1.35 or later; see hints, tips, known problems, and solutions for Windows
The following patches are needed:
- no patches are needed as of 25 Aug 2008
To apply a patch, follow the link to the listing of the patch file and download it to your gnuradio directory using the Original Format link at the bottom of the page. Then use the command
$ patch -p0 -b -i file.patch
(replacing file.patch with the name of the patch file) to apply the patch.
After applying any patches and before running ./configure you must initialize the build with
$ ./bootstrap
and you must set the necessary environment variables:
$ export PKG_CONFIG_PATH=/usr/local/lib/pkgconfig
The remainder of the build process is the same as for the release version except that boost should be found automatically in /usr/local/include:
$ ./configure $ make $ make check $ make install
Be sure that no older version of GNU Radio is installed when running make check. Expect make check to fail in test_inband.exe with "uncaught exception of type mbe_mblock_failed" errors; see ticket:191 for details.
Installing the Driver for the USRP
If you have a USRP you will need to install the driver for it; see installing the USRP driver for Windows.
Where to Go From Here
Now that your GNU Radio system is installed, it is time to start exploring. The best way to learn about GNU Radio is to study and modify the examples in the various subdirectories of gnuradio-3.1.3/gnuradio-examples/python and gnuradio-3.1.3/gnuradio/gr-utils/src/python. Be sure PYTHONPATH is set as described above.
Attachments
- makefiles6975.patch (1.5 kB) -
patch for makefiles in svn revision 6975
, added by dward on 11/18/07 13:13:33. - makefiles-3.1.2.patch (1.6 kB) -
fix interlibrary dependencies for 3.1.2
, added by dward on 03/26/08 16:03:25. - makefiles8512.patch (1.4 kB) -
makefile patch for building svn revision 8512
, added by dward on 05/29/08 10:53:57. - viterbi-metrics.patch (0.6 kB) -
avoid duplicate definition of log2 in viterbi/metrics.c
, added by dward on 05/29/08 10:55:00.
