ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

MacPorts & ROS

asked 2012-07-02 08:27:49 -0500

mano gravatar image

updated 2014-04-20 14:09:21 -0500

ngrennan gravatar image

I tried to install ROS on a fresh OS X with Homebrew (, but it didn't worked correctly... So i switched back to MacPorts. After installing different ports, i tried to build ROS. It did not work. I had to add -I/opt/local/include to CMAKE_CXX_FLAGS and now it would compile but there are linker failures?¿?

ld: warning: ignoring file /opt/local/lib/libboost_signals-mt.dylib, file was built for unsupported file format which is not the architecture being linked (i386)

When i run make with VERBOSE=1, this are the last line of output

Linking CXX executable ../../bin/rxconsole cd /Users/emkei/ros-underlay/build/rx/rxtools && /opt/local/bin/cmake -E cmake_link_script CMakeFiles/rxconsole.dir/link.txt --verbose=1 /usr/bin/c++ -I/opt/local/include -I/opt/local/include/wx-2.8 -Wl,-search_paths_first -Wl,-headerpad_max_install_names CMakeFiles/rxconsole.dir/src/rxconsole/rxconsole.cpp.o -o ../../bin/rxconsole -L/opt/local/lib ../../lib/librxtools.dylib ../../lib/librosconsole.dylib ../../lib/libroscpp.dylib ../../lib/librostime.dylib ../../lib/libroscpp_serialization.dylib ../../lib/libxmlrpcpp.dylib ../../lib/libroslib.dylib ../../lib/librosconsole.dylib /opt/local/lib/liblog4cxx.dylib ../../lib/librostime.dylib /opt/local/lib/libboost_date_time-mt.dylib ../../lib/libroscpp_serialization.dylib ../../lib/librospack.dylib /opt/local/lib/libboost_filesystem-mt.dylib /opt/local/lib/libboost_system-mt.dylib /opt/local/lib/libboost_program_options-mt.dylib -L/opt/local/lib -arch i386 -framework IOKit -framework Carbon -framework Cocoa -framework System -framework QuickTime -framework OpenGL -framework AGL -lwx_macu_richtext-2.8 -lwx_macu_aui-2.8 -lwx_macu_xrc-2.8 -lwx_macu_qa-2.8 -lwx_macu_html-2.8 -lwx_macu_adv-2.8 -lwx_macu_core-2.8 -lwx_base_carbonu_xml-2.8 -lwx_base_carbonu_net-2.8 -lwx_base_carbonu-2.8 /opt/local/lib/libboost_thread-mt.dylib /opt/local/lib/libboost_regex-mt.dylib /opt/local/lib/libboost_signals-mt.dylib ld: warning: ignoring file CMakeFiles/rxconsole.dir/src/rxconsole/rxconsole.cpp.o, file was built for unsupported file format which is not the architecture being linked (i386) ... AND SO ON ... Undefined symbols for architecture i386: "_main", referenced from: start in crt1.10.6.o ld: symbol(s) not found for architecture i386 clang: error: linker command failed with exit code 1 (use -v to see invocation) make[2]: * [bin/rxconsole] Error 1 make[1]: [rx/rxtools/CMakeFiles/rxconsole.dir/all] Error 2 make: ** [all] Error 2

Why want cmake link with flag -arch i386? Is there a reason for this?

(The port boost was not compiled as universal.)

edit retag flag offensive close merge delete

3 Answers

Sort by » oldest newest most voted

answered 2012-07-02 08:36:10 -0500

kwc gravatar image

ROS Fuerte is not officially supported on MacPorts, and, if you attempt to install things like 'rx', you're gonna have a bad time.

You're best bet for support is to stick with Homebrew, or you're going to have to be willing to fight out the compile errors with MacPorts and will also have to remove things like rx that cause mixed linking issues because wx doesn't have a proper 64-bit port.

edit flag offensive delete link more

answered 2012-07-19 07:34:28 -0500

mano gravatar image

wxPython 2.9 from works fine (64 Bit-Version).

Instead of clang i used llvm-gcc cause there is a problem with clang and wxWidgets (see!topic/wx-users/klVz92qxDD8).

edit flag offensive delete link more

answered 2012-07-02 08:53:54 -0500

mano gravatar image

MacPorts has more packages as Homebrew and i do use MacPorts for several years. So i don't like to switch...

I install boost with universal support and try again...

my-imac:build emkei$ file /opt/local/lib/libwx_

/opt/local/lib/libwx_base_carbonu- Mach-O dynamically linked shared library i386 AND SO ON /opt/local/lib/libwx_macu_xrc-2.8.dylib: Mach-O dynamically linked shared library i386

edit flag offensive delete link more



Please don't use answers as comments, as it clutters up the ROS answers community. Unlike a forum, ROS answers is a Stack Overflow-like community which follows a questions and answers format. Thanks for helping to keep the community tidy.

mjcarroll gravatar image mjcarroll  ( 2012-07-02 12:16:23 -0500 )edit

Additionally, I think that if MacPorts is something that you are interested in, it will probably be something that you have to develop yourself, as it seems that the direction of the community is towards Homebrew. If you pursue Macports, I'm sure someone in the community would appreciate your work.

mjcarroll gravatar image mjcarroll  ( 2012-07-02 12:20:14 -0500 )edit

Question Tools


Asked: 2012-07-02 08:27:49 -0500

Seen: 15,268 times

Last updated: Jul 19 '12