Building GNU Radio on Mac OS X

From MyLabWiki
Revision as of 16:24, 31 July 2011 by Alex (Talk | contribs)

Jump to: navigation, search

This page describes how to build gnuradio-core, gnuradio-audio , gr-fcd and gr-uhd on Mac OS X 10.6.8 without using macports or any other ports. The objective is to create a GNU Radio application that bundles all non-standard libraries, including GNU Radio and UHD.

I created this procedure while developing gqrx.


We are going to work in the


directory, where we create following subdirectories:

  • build – This is where we install tools and libraries that are only necessary for the build process (pkg-config and libtool).
  • runtime – This is where we install the tools and libraries that are needed for both build and runtime.
  • deps – This is where I put and build all the dependencies. You can use whatever you want since this is basically just a scratch folder.
  • source – This is where I keep the GNU Radio and UHD sources.

Building the dependencies

Following packages need to be built before we can build GNU Radio:

gr-fcd has no additional requirements. Note that on Mac OS X gr-fcd does not use libusb.

In addition to the above, UHD requires:

We are going to install all dependencies into one target directory:


We can build both dynamic and static libraries and choose later whether we want to do static or dynamic linking in the application.


Libtool is necessary for the bootstrap process, i.e. if we are building GNU Radio from git

 tar xvfz libtool-2.4.tar.gz
 cd libtool-2.4
 ./configure --prefix=/Users/alexc/gnuradio/build
 make install
 export PATH=$PATH:/Users/alexc/gnuradio/build/bin


Get pkg-config-0.25, which is the last version that includes glib (0.26 wont compile).

 tar xvfz pkg-config-0.25.tar.gz
 cd pkg-config-0.25
 ./configure  --prefix=/Users/alexc/gnuradio/build
 make install
 export PKG_CONFIG_PATH=$PKG_CONFIG_PATH:/Users/alexc/gnuradio/build/lib/pkgconfig


 tar xvfz cppunit-1.12.1.tar.gz
 cd cppunit-1.12.1
 ./configure --prefix=/Users/alexc/gnuradio/build
 make install


The following will build all boost libraries which isn't really necessary since we only need a few libraries.

 tar xvfz boost_1_47_0.tar.gz
 cd boost_1_47_0
 ./ --prefix=/Users/alexc/gnuradio/runtime
 ./b2 install
 (will appear to hang for a while)

This will build both static and dynamic libraries and install them under prefix (together with the headers).


 tar xvfz fftw-3.3.tar.gz
 cd fftw-3.3 
 ./configure --enable-float --enable-shared --prefix=/Users/alexc/gnuradio/runtime
 make install
 cp /Users/alexc/gnuradio/runtime/lib/pkgconfig/fftw3f.pc /Users/alexc/gnuradio/build/lib/pkgconfig/


 tar xvfz gsl-1.9.tar.gz
 cd gsl-1.9
 ./configure --prefix=/Users/alexc/gnuradio/runtime
 make install
 cp /Users/alexc/gnuradio/runtime/lib/pkgconfig/gsl.pc /Users/alexc/gnuradio/build/lib/pkgconfig/


To be added...


To be added...

Building UHD

To be added...

Building GNU Radio

  • Ensure that PATH and PKG_CONFIG_PATH are set as instructed above.
  • Get GNU Radio from git.

Note: This is without UHD

 cd v3.4.0-113-gc491449c
 ./configure --enable-gnuradio-core --enable-gr-audio \
             --with-boost=/Users/alexc/gnuradio/runtime/include \
             --with-boost-libdit=/Users/alexc/gnuradio/runtime/lib \

Building gr-fcd

To be added...'

Building and bundling the application

In order to compile an application the compiler needs to know two things:

  1. The location of the headers
  2. The location of the libraries