Current Windows Status¶
Installing GNU Radio and USRP on Windows is becoming more routine. Please report any success or failures. Patches and enhancements are especially welcome!
Windows Porting Issues¶
Considerable effort has been put into making the GNU Radio code portable among various operating systems, but there are several reasons why it cannot be "simply" compiled and run under Windows:
- The build and install procecures are based on Linux scripts and tools
- Several third-party libraries are used, each with its own, often system-dependent, installation procedure
- Most GNU Radio applications must interface to hardware (e.g., a sound card or USRP) which require system-dependent drivers and installation procedures
- Because GNU Radio is written as an extension to Python, there are potential problems on Windows if different runtime libraries are used for GNU Radio and Python
The following sections show how these issues can be addressed.
GNU Radio is designed to be flexible. It has a number of modules, capabilities, and options that can be enabled or disabled to suit the needs of the user, and the user can add custom blocks or modules to the system.
To support this flexibility, it comes with a set of files and scripts to be used with GNU software build tools (sh, make, autoconf, automake, etc.). These tools use Linux-like commands and filenames that are not normally available on Windows systems.
Fortunately, we are not the first to face this problem, and several solutions exist. These are presented in order of increasing difficulty:
MinGW (http://www.mingw.org/) provides GNU compilers and Window-specific header files for compiling native Windows applications.
MSYS (http://www.mingw.org/msys.shtml) is a companion set of Linux-like commands, shell, and build tools.
MinGW does not include a Linux programming interface; programs should be smaller and faster than with Cygwin (in theory), but will require more Windows-specific code.
MSYS is intended primarily as a build environment, making it more compact than Cygwin.
Because there is no Linux API emulation, GNU Radio built with MinGW should be used with standard Windows versions of Python and the third-party libraries.
MinGW does not provide as much support as Cygwin for installing third-party libraries, but in many cases precompiled binaries are available.
Building on Windows with Native Tools¶
GNU Radio, as of version 3.7, will not build with Visual Studio 2010. Hence, it is recommended to build GNU Radio with MinGW (which has the advantage of being free): Installing GNU Radio with MinGW.
However it has been shown possible to compile GNU Radio 3.6 on Windows using native tools (see http://voltronics.blogspot.com/2013/01/gnu-radio-windows-build-guide.html and https://lists.gnu.org/archive/html/discuss-gnuradio/2013-08/msg00284.html)
More helpful tips on dependency version information has been reported:
Cygwin (http://www.cygwin.com/) is a Linux-like environment for Windows.
It provides the Linux-like shell, file naming, and build tools we need and also makes it easy to install many of the third-party libraries required by GNU Radio. It also provides a Linux programming interface (API); this is not required by GNU Radio, but it lets us use the better-tested Linux versions of some functions.
Because the Linux API uses its own C runtime library, it is best to use Cygwin versions of Python and the third-party libraries when building GNU Radio with Cygwin.
For detailed installation instructions using Cygwin see Installing GNU Radio with Cygwin.
To quote from the https://chocolatey.org/: Chocolatey NuGet is a Machine Package Manager, somewhat like apt-get, but built with Windows in mind.
There are packages for gnuradio (and it's dependencies) available in a separate repository (currently the best known source is: https://github.com/ariovistus/chocolatey-packages)
To install, open an Administrative command line session and run:
iex ((new-object net.webclient).DownloadString('https://chocolatey.org/install.ps1'))
Now you need to install a source which has the recipes for gnuradio and dependants. The easiest method is to clone the chocolately-packages from the github repository listed above (https://github.com/ariovistus/chocolatey-packages), then add the local source from within an Administrative command line session:
choco source add -name gnuradio -source C:\<path-to>\chocolatey-packages
Create the numpy package
Create the gnuradio package
Now install the gnuradio package
choco install gnuradio
Follow the command prompts
How to Get Help¶
- Look here for hints tips known problems and solutions for Windows
- Ask the GNU Radio mailing list (https://lists.gnu.org/mailman/listinfo/discuss-gnuradio); it is read by some very knowledgeable and helpful people
- Bugs (anything that should work but doesn't) should be reported to the GNU Radio bug tracker
Known Windows Build Issues¶
So far, we have workarounds for all reported problems: