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.

Thursday, July 21, 2011

Using PowerPC applications in Lion with VMWare Fusion

Just a reminder if you're going to upgrade: 10.7 doesn't include Rosetta so it no longer supports running PowerPC applications. This includes Adobe CS2.

You can get around this with VMWare Fusion if you have that:
  • Create a new virtual machine for Mac OS X server (choose 64 bit if your computer supports it)
  • In the finder, right-click this newly created virtual machine and choose Open With...->VMDK Mounter
  • Use Carbon Copy Cloner to clone your current hard drive to this. You probably want to exclude unnecessary files to speed this up. I excluded my Downloads and Documents folder, ~/Library/Caches, and any applications that I don't need to run on this image
  • VMWare will only run an OSX server guest. To fake this, open Terminal and "sudo  touch System/Library/CoreServices/ServerVersion.plist"
Then you should be able to open your Mac OSX image like any other. Make sure to install the VMWare tools. I had to re-authorize Photoshop, but other than that it seems to be working great. Well, as great as a 6-year old program going through virtualization and binary translation could ever hope to run.

Debating between spending $200 on the educational version of CS5.5 or switching to Aperture for $80, but this will at least tide me over in the short term

Set MacFusion to use Fuse4X

So MacFuse is horribly out of date (last released in 2008) and I can't get it to work on Lion at all. Fuse4X was recently forked off of MacFuse and seems to be working much better.

However, I love MacFusion's menu-bar access to my favorite servers and refuse to give this up. Time to modify MacFusion to support Fuse4X

First, install Fuse4X and the sshfs plugin. Try manually mounting an ssh file system to make sure it works:

mkdir /tmp/mountpoint
sshfs server:directory /tmp/mountpoint
ls /tmp/mountpoint

Once this works, find out where sshfs is located and replace the copy of sshfs in MacFusion with this one:
which sshfs
mv /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static.bak

ln -s [sshfs_location] /Applications/Macfusion.app/Contents/PlugIns/sshfs.mfplugin/Contents/Resources/sshfs-static

As always, your mileage may vary but this worked for me.