YARP on Darwin

From Wiki for iCub and Friends
Jump to: navigation, search

I don't know much about OSX; this is a log of a random YARP install by an OSX newbie. Information about machine from uname -a:

 Darwin foo.bar.edu 8.8.0 Darwin Kernel Version 8.8.0: Fri Sep  8 17:18:57 PDT 2006;
 root:xnu-.../RELEASE_PPC Power Macintosh powerpc

Followed the generic YARP Install Notes for UNIX. Only deviations from these notes (or choices left open in these notes) are listed here.

ACE

  • Fetched http://deuce.doc.wustl.edu/ACE-5.5.tar.gz
  • Used platform_macosx-tiger.GNU for platform_macros.GNU step of ACE installation.
  • Used config-macosx-tiger.h for config.h step of ACE installation.
  • Generic instructions for UNIX worked fine. Got:
 ACE_wrappers/lib/libACE.dylib
 ACE_wrappers/lib/libACE_SSL.dylib
  • I set some variables in my ~/.bash_profile file:
 export ACE_ROOT=$HOME/cvs/ACE_wrappers
 export LD_LIBRARY_PATH=$ACE_ROOT/lib:$LD_LIBRARY_PATH
 export DYLD_LIBRARY_PATH=$ACE_ROOT/lib:$DYLD_LIBRARY_PATH

CMake

 export PATH=$PATH:$HOME/cvs/cmake/bin

YARP

  • Fetched YARP from CVS using anonymous checkout (blank password). This was a slow process.
  • I ran cmake in the YARP directory and it worked fine:
 $ cmake .
 -- Check for working C compiler: /usr/bin/gcc
 -- Check for working C compiler: /usr/bin/gcc -- works
 -- Check size of void*
 -- Check size of void* - done
 -- Check for working CXX compiler: /usr/bin/c++
 -- Check for working CXX compiler: /usr/bin/c++ -- works
 -- Check if the system is big endian
 -- Check if the system is big endian - big endian
 -- Found ACE library: /Users/paulfitz/cvs/ACE_wrappers/lib/libACE.dylib
 -- Found ACE include: /Users/paulfitz/cvs/yarp2/../ACE_wrappers
 -- Configuring done
 -- Generating done
 -- Build files have been written to: /Users/paulfitz/cvs/yarp2
  • I ran make in the YARP directory and it worked fine:
 $ make
 Scanning dependencies of target YARP_OS
 [  1%] Building CXX object src/libYARP_OS/CMakeFiles/YARP_OS.dir/src/Address.o
 [  2%] Building CXX object src/libYARP_OS/CMakeFiles/YARP_OS.dir/src/Bottle.o
 ...
  • Once everything compiled, I tried the YARP regression tests and they worked fine:
 $ make test
 Running tests...
 Start processing tests
 Test project /Users/paulfitz/cvs/real/yarp2
   1/ 30 Testing YARP_OS::AddressTest             Passed
   2/ 30 Testing YARP_OS::BinPortableTest         Passed
   ...
  • The YARP device library is not compiled by default and I needed it so I ran
 ccmake .
  • I pressed "c" to configure, turned on the "CREATE_DEVICE_LIBRARY" option, pressed "c" again, then pressed "g" to generate and quit. Then I ran "make" again.
  • At this pount, in the YARP "bin" directory, there was:
 $ ls bin/
 harness_dev     harness_sig     yarpdev
 harness_os      yarp            yarphear
  • To test the installation I did:
 $ ./bin/yarp check
 yarp: Cannot find name server
 yarp: ==================================================================
 yarp: === Trying to register some ports
 yarp: no connection to nameserver
 yarp: no connection to nameserver, scanning mcast
 yarp: Polling for name server (using multicast), try 1 of max 3
 yarp: Received address text://131.212.41.183:10000
 yarp: ==================================================================
 yarp: === Trying to connect some ports
 yarp: Receiving input from /tmp/port/1 to /tmp/port/2 using tcp
 yarp: Sending output from /tmp/port/1 to /tmp/port/2 using tcp
 Added output connection from "/tmp/port/1" to "/tmp/port/2"
 yarp: ==================================================================
 yarp: === Trying to write some data
 yarp: ==================================================================
 yarp: === Trying to read some data
 yarp: *** Read number 42
 yarp: ==================================================================
 yarp: === Trying to close some ports
 yarp: Removing output from /tmp/port/1 to /tmp/port/2
 yarp: Removing input from /tmp/port/1 to /tmp/port/2
 yarp: *** YARP seems okay!
  • The fact that YARP found a server was a surprise to me, I guess somebody else was running one on the local network somewhere. Anyway, the installation looked good.