GNU Radio / OS X

Recently, I had a hard time compiling the GNU Radio next branch on macOS. The main problem is that next switched to QT5, which uses QWT6 for plotting. Unfortunately, QWT6 is not yet available in Homebrew, but has to be installed manually.

Compillation is rather straight forward, but there are several pitfalls:

  • GNU Radio searches for a package config file for QWT6. This is not created by default and has to be configured in qwtconfig.pri.
  • QWT installs itself as a framework, which is a special type of shared library on macOS. This doesn’t work for GNU Radio as it uses the QWT_LIBRARIES variable in cmake, which is not set for a framework. That means you will have to edit the package config file and replace the framework config with a corresponding shared library configuration. (This also requires adapting libdir and includedir.)
# old
Libs: -F${libdir} -framework qwt
# new
Libs: -L${libdir} -lqwt
  • GNU Radios cmake config does not support setting the library with -lqwt and adding its path to the shared library search path with the -L switch. Instead, I had to add the full path to the library with
Libs: -L${libdir} -l${libdir}/qwt
  • The last problem was that QWT did not set its install name to its full path. While there is a configuration option especially for that, it did not work for me. I had to manually change the library name with
install_name_tool -id '/Users/basti/usr/.../qwt' qwt

Hope it helps.