Difference between revisions of "YARP on Mac"

From Wiki for iCub and Friends
Jump to: navigation, search
Line 8: Line 8:
 
== Installing Dependencies ==
 
== Installing Dependencies ==
 
Using darwinports to install mac dependencies appears to work most of the time.
 
Using darwinports to install mac dependencies appears to work most of the time.
 +
 +
== SDL Issues (_NSAutoreleaseNoPool() errors) ==
 +
SDL apps on Mac require that a file called something like SDLMain-1.2.13.m (an objective-C file) is compiled into the executable. (SDL overrides your main function, and the SDL main implementation is contained in this .m file.) If you don't compile in this file, you'll get lots of _NSAutoreleaseNoPool() errors when you run SDL-based programs like the iCub simulator.
 +
 +
To fix this for the iCub simulator app, compile in the SDLMain-1.2.13.m file (usually included with the SDL source distribution for mac), then add FILE(GLOB folder_source2 *.m) to the iCubSimulator/CMakeLists.txt and add ${folder_source2} to the ADD_EXECUTABLE line, and add SDLmain.h and SDLMain-1.2.13.m to the iCubSimulator source directory.

Revision as of 15:30, 21 July 2009

Semaphore Issues

If you get errors regarding semaphores when running yarp programs, try this command:

 ulimit -n 4096

(Add this to your startup script, like .bash_profile, to make it happen automatically for each new window.)

Installing Dependencies

Using darwinports to install mac dependencies appears to work most of the time.

SDL Issues (_NSAutoreleaseNoPool() errors)

SDL apps on Mac require that a file called something like SDLMain-1.2.13.m (an objective-C file) is compiled into the executable. (SDL overrides your main function, and the SDL main implementation is contained in this .m file.) If you don't compile in this file, you'll get lots of _NSAutoreleaseNoPool() errors when you run SDL-based programs like the iCub simulator.

To fix this for the iCub simulator app, compile in the SDLMain-1.2.13.m file (usually included with the SDL source distribution for mac), then add FILE(GLOB folder_source2 *.m) to the iCubSimulator/CMakeLists.txt and add ${folder_source2} to the ADD_EXECUTABLE line, and add SDLmain.h and SDLMain-1.2.13.m to the iCubSimulator source directory.