rosserial_arduino compiling problems on OS X [closed]

asked 2012-01-03 01:48:47 -0600

mkoval gravatar image

updated 2012-04-17 15:06:36 -0600

Kevin gravatar image

I've installed rosserial on Lion 10.7.2 and am having problems getting it to work with the rosserial_arduino CMake architecture. I get the following error when cross-compiling any C++ files:

avr-g++: error: x86_64: No such file or directory
avr-g++: error: unrecognized option '-arch'

This is happening because some host flags are being passed to avr-g++. Here is the command in the CMake-generated Makefile:

avr-g++    -O3  -ffunction-sections -fdata-sections -fno-tree-loop-optimize -fno-move-loop-invariants -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk -I/Users/mkoval/ros/navi_stack/navi_jackal/src/ros_lib    -o CMakeFiles/navi_jackal.dir/Users/mkoval/ros/rosserial/rosserial_arduino/cmake_scripts/cc_support.cpp.o -c /Users/mkoval/ros/rosserial/rosserial_arduino/cmake_scripts/cc_support.cpp

Note the two Apple GCC specific flags -arch x86_64 -isysroot /Developer/SDKs/MacOSX10.7.sdk. These aren't in any of the rosserial_arduino CMake files and I can't figure out what is adding them to CMAKE_CXX_FLAGS.

Can anyone who is more familiar with CMake point me in the right direction?

edit retag flag offensive reopen merge delete

Closed for the following reason question is not relevant or outdated by tfoote
close date 2013-09-09 14:44:44