Monday, July 13, 2009

Installing Player/Stage on OS X with MacPorts

Back in 2006 I wrote about installing the excellent Player/Stage robot simulator under Linux, and the problems caused by dependencies (i.e. other packages that need to be installed first, before you can then install Player/Stage). Wouldn't it be great, I wrote, if there were a universal installer programme that would sort out all of these dependencies.

I should explain that since that post I've switched from Linux to OS X, running on a MacBook Pro, and have only just got round to installing Player/Stage. I was very pleased to discover that my plea for a universal installer has been answered by the (almost) excellent MacPorts.

I say almost excellent because installation wasn't completely glitch free.

Here's what I had to do to install to Mac OS X 10.5.7 (Leopard)

1. Download and install XCode (MacPorts depends on it)

2. Download and install MacPorts, install details here

3. In a terminal window run MacPorts with
$ sudo port install playerstage-stage playerstage-player

And wait an hour or so - it takes awhile. However, compilation of playerstage-player fails library not found for -ljpeg. To fix this as detailed here:

4. sudo port install python_select && sudo python_select python25

then re-run step 3.

5. But before you can run Player/Stage there's another fix needed, as detailed here.

sudo ln -s /usr/X11/share/X11/rgb.txt /usr/X11R6/lib/X11/rgb.txt

And that's it. Player/Stage installed.

1 comment:

  1. :debug:configure Environment: CPATH='/opt/local/include' CFLAGS='-pipe -O2 -arch x86_64' CPPFLAGS='-I/opt/local/include' CXXFLAGS='-pipe -O2 -arch x86_64' LIBRARY_PATH='/opt/local/lib' MACOSX_DEPLOYMENT_TARGET='10.6' CXX='/usr/bin/g++-4.2' CC_PRINT_OPTIONS_FILE='/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_playerstage-player/work/.CC_PRINT_OPTIONS' F90FLAGS='-pipe -O2 -m64' LDFLAGS='-L/opt/local/lib -arch x86_64' OBJC='/usr/bin/gcc-4.2' FCFLAGS='-pipe -O2 -m64' INSTALL='/usr/bin/install -c' OBJCFLAGS='-pipe -O2 -arch x86_64' FFLAGS='-pipe -O2 -m64' CC_PRINT_OPTIONS='YES' CC='/usr/bin/gcc-4.2'
    :debug:configure Assembled command: 'cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_playerstage-player/work/player-3.0.0" && cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4-mac/bin/qmake -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64"'
    :info:configure sh: cmake: command not found
    :info:configure shell command " cd "/opt/local/var/macports/build/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_playerstage-player/work/player-3.0.0" && cmake -DCMAKE_INSTALL_PREFIX=/opt/local -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_COLOR_MAKEFILE=ON -DCMAKE_BUILD_TYPE=Release -DCMAKE_BUILD_WITH_INSTALL_RPATH=ON -DCMAKE_INSTALL_NAME_DIR=/opt/local/lib -DCMAKE_SYSTEM_PREFIX_PATH="/opt/local;/usr" -DQT_QMAKE_EXECUTABLE=/opt/local/libexec/qt4-mac/bin/qmake -Wno-dev -DCMAKE_OSX_ARCHITECTURES="x86_64" " returned error 127
    :error:configure Target org.macports.configure returned: configure failure: shell command failed
    :debug:configure Backtrace: configure failure: shell command failed
    while executing
    "$procedure $targetname"
    :info:configure Warning: the following items did not execute (for playerstage-player): org.macports.activate org.macports.configure org.macports.destroot org.macports.install
    :notice:configure Log for playerstage-player is at: /opt/local/var/macports/logs/_opt_local_var_macports_sources_rsync.macports.org_release_ports_science_playerstage-player/main.log