Compile UHD and GNU Radio

Posted on October 22, 2013 -

It took me almost two days to compile GNU Radio. Here are the problems I met.

I was trying to compile UHD and GNU Radio 3.6.2 on Mac OS X 10.9.

The most serious challenge was that the libraries compiled by clang cannot be linked when using gcc, and vice versa. Now, here we go.

Step 1, install dependencies.

You can find dependencies of gnuradio from http://gnuradio.org/redmine/projects/gnuradio/wiki/CMakeWork. Among these packages, boost and cppunit must be compiled using gcc:

  1. brew install apple-gcc42
  2. brew install boost --use-gcc
  3. brew install cppunit --use-gcc

Others can be installed using homebrew or pip, but qt series. You can not compile qt 4.8.5 currently on Mavericks, which means that you have to download binaries. Therefore, pyqt, qwt, and pyqwt are also required to install manually. The only thing that you need to know is to set the CORRECT PATH when configuring these packages.

Step 2, install UHD.

UHD can be obtained from github. Remember to specify the CORRECT PATH. If you use homebrewed python, always use libraries from homebrewed python. You also need to use gcc as your compiler.

Once you see right components enabled after running cmake .., then just make and make install.

Step 3, install GNU Radio.

Notice the PATH again.

You may encounter a udp failure when make test in OS X. It seems that these code were written with some linux tricks. Fortunately, udp source/sink are not really common.

If you meet any error, please check PATH first, then make sure you used the correct compiler.

P.S. If you wannat compile Gen2 rfid, remember to set gruel's include path in Makefile.common.