Building GNU Radio on Mac OS X
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 make install
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 make install
Building and bundling the application
In order to compile an application the compiler needs to know two things:
- The location of the headers
- The location of the libraries