Ask Your Question
1

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 (https://github.com/mxcl/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
4

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
1

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

mano gravatar image

wxPython 2.9 from http://wxpython.org/ works fine (64 Bit-Version).

Instead of clang i used llvm-gcc cause there is a problem with clang and wxWidgets (see https://groups.google.com/forum/?fromgroups#!topic/wx-users/klVz92qxDD8).

edit flag offensive delete link more
0

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-2.8.0.8.0.dylib: 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

Comments

1

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
2

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

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

Stats

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

Seen: 14,907 times

Last updated: Jul 19 '12