Wednesday, November 27, 2013

Installing gr-air-modes on Mac

Don't really have much time to write this up, but installing gr-air-modes is a bit tricky and took me a few hours. To the best of my recollection:


  • Use Macports to install gnuradio
  • Download the source from https://github.com/bistromath/gr-air-modes
  • During the make it complains about not being able to find the pmt libraries
I fixed this by adding the following lines to cmake/Modules/FindGnuradioRuntime.cmake after the other find_library command


  FIND_LIBRARY(
    GNURADIO_PMT_LIBRARIES
    NAMES gnuradio-pmt
    HINTS $ENV{GNURADIO_RUNTIME_DIR}/lib
          ${PC_GNURADIO_RUNTIME_LIBDIR}
          ${CMAKE_INSTALL_PREFIX}/lib/
          ${CMAKE_INSTALL_PREFIX}/lib64/
    PATHS /usr/local/lib
          /usr/local/lib64
          /usr/lib
          /usr/lib64

    )

and then adding GNURADIO_PMT_LIBRARIES to the MARK_AS_ADVANCED list

Then add ${GNURADIO_PMT_LIBRARIES} to target_link_libraries in lib/CMakeLists.txt


  • Compiling and installing now works, but we get a "Fatal Python error: PyThreadState_Get: no current thread" when running modes_rx


Change the cmake command to

cmake -DPYTHON_LIBRARY=/opt/local/Library/Frameworks/Python.framework/Versions/2.7/lib/libpython2.7.dylib ../


Now it should work.