Ask Your Question
2

rosmake fails on OS X

asked 2013-02-27 17:42:29 -0600

Noldorin gravatar image

updated 2013-03-03 07:17:48 -0600

Running rosmake -a as per http://www.ros.org/wiki/groovy/Installation/OSX/Homebrew/Source fails on OS X 10.8.2. Previous steps succeeded find.

Most of the errors seemed to be concerned with this Python module urandom... These have been fixed now. The remaining errors concern x86_64/i386 symbols not being found?

Here's the full log:

http://pastie.org/pastes/6368348/text

Any ideas, folks?

edit retag flag offensive close merge delete

Comments

Guys, does anyone know how to solve this?

Noldorin gravatar imageNoldorin ( 2013-03-12 05:18:49 -0600 )edit

@Noldorin There are three separate errors in that log. I'll try to answer them each, but in the future you should try to narrow the question down.

William gravatar imageWilliam ( 2013-03-12 06:24:41 -0600 )edit

@William: Okay, fair enough; I did just think they were somewhat related, but maybe not... Thanks, look forward to your response.

Noldorin gravatar imageNoldorin ( 2013-03-12 06:26:06 -0600 )edit

3 Answers

Sort by ยป oldest newest most voted
3

answered 2013-03-12 06:47:42 -0600

William gravatar image

updated 2013-03-12 06:53:33 -0600

The first error is with nodelet_tutorial_math:

{-------------------------------------------------------------------------------
  -- Configuring done
  -- Generating done
  -- Build files have been written to: /Users/alex/ros_ws/common_tutorials/nodelet_tutorial_math/build
  cd build && make -j -l8
  Scanning dependencies of target rospack_genmsg_libexe
  [  0%] Built target rospack_genmsg_libexe
  Scanning dependencies of target rosbuild_precompile
  [  0%] Built target rosbuild_precompile
  Scanning dependencies of target nodelet_math
  [100%] Building CXX object CMakeFiles/nodelet_math.dir/src/plus.cpp.o
  Linking CXX shared library ../lib/libnodelet_math.dylib
  clang: warning: argument unused during compilation: '-pthread'
  Undefined symbols for architecture x86_64:
    "class_loader::class_loader_private::AbstractMetaObjectBase::addOwningClassLoader(class_loader::ClassLoader*)", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::AbstractMetaObjectBase::setAssociatedLibraryPath(std::string)", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::AbstractMetaObjectBase::AbstractMetaObjectBase(std::string const&, std::string const&)", referenced from:
        class_loader::class_loader_private::AbstractMetaObject<nodelet::Nodelet>::AbstractMetaObject(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::AbstractMetaObjectBase::~AbstractMetaObjectBase()", referenced from:
        class_loader::class_loader_private::AbstractMetaObject<nodelet::Nodelet>::AbstractMetaObject(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::getFactoryMapForBaseClass(std::string const&)", referenced from:
        std::map<std::string, class_loader::class_loader_private::AbstractMetaObjectBase*, std::less<std::string>, std::allocator<std::pair<std::string const, class_loader::class_loader_private::AbstractMetaObjectBase*> > >& class_loader::class_loader_private::getFactoryMapForBaseClass<nodelet::Nodelet>() in plus.cpp.o
    "class_loader::class_loader_private::getCurrentlyActiveClassLoader()", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::getCurrentlyLoadingLibraryName()", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::getPluginBaseToFactoryMapMapMutex()", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
    "class_loader::class_loader_private::hasANonPurePluginLibraryBeenOpened(bool)", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
    "console_bridge::log(char const*, int, console_bridge::LogLevel, char const*, ...)", referenced from:
        void class_loader::class_loader_private::registerPlugin<nodelet_tutorial_math::Plus, nodelet::Nodelet>(std::string const&, std::string const&) in plus.cpp.o
        __GLOBAL__I_a in plus.cpp.o
  ld: symbol(s) not found for architecture x86_64
  clang: error: linker command failed with exit code 1 (use -v to see invocation)
  make[3]: *** [../lib/libnodelet_math.dylib] Error 1
  make[2]: *** [CMakeFiles/nodelet_math.dir/all] Error 2
  make[1]: *** [all] Error 2
-------------------------------------------------------------------------------}
[ rosmake ] Output from build of package nodelet_tutorial_math written to:
[ rosmake ]    /Users/alex/.ros/rosmake/rosmake_output-20130302-173409/nodelet_tutorial_math/build_output.log
[rosmake-5] Finished <<< nodelet_tutorial_math [FAIL] [ 41.04 seconds ]

It appears that it is not linking against class_loader correctly.

I created a ticket:

https://github.com/ros/common_tutorials/issues/3


Next is orocos_kdl, which appears to be missing a link against CppUnit:

{-------------------------------------------------------------------------------
        FramesTest::suite() in framestest.cpp.o
    "CppUnit::TextTestRunner::result() const", referenced from:
        _main in test-runner.cpp.o
    "CppUnit::TestSuiteBuilderContextBase::getTestNameFor(std::string const&) const", referenced from:
        FramesTest::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&) in framestest.cpp.o
    "CppUnit::TestSuiteBuilderContextBase::makeTestFixture() const", referenced from:
        FramesTest::addTestsToSuite(CppUnit::TestSuiteBuilderContextBase&) in framestest.cpp.o
    "CppUnit::Test::findTestPath(CppUnit::Test ...
(more)
edit flag offensive delete link more

Comments

Thanks for this, William. I appreciate your filing those bug reports too! As to the orocos_kdl issue, indeed I have cppunit installed, and running that command individually doesn't help unfortunately. It sounds either like an issue with the code, or one with the CLang compiler on OS X...

Noldorin gravatar imageNoldorin ( 2013-03-12 14:40:17 -0600 )edit

I believe I fixed the bug in "visualization_tutorials" (by adding the word "const"). If that doesn't make it work, please re-open the bug on github. Thanks!

hersh gravatar imagehersh ( 2013-03-13 07:01:34 -0600 )edit

Thanks @hersh. That's great. Perhaps some instructions should be put on the OS X installation wiki page now, so people can patch it appropiately. :)

Noldorin gravatar imageNoldorin ( 2013-03-13 08:27:28 -0600 )edit
1

answered 2013-03-27 01:28:56 -0600

jensenb gravatar image

I managed to fix the first missing symbols problem with nodelet_tutorial_math by adding a dependency to class_loader in common_tutorials/nodelet_tutorial_math/manifest.xml with the line

<depend package="class_loader"/>

I am sure if the correct thing to do, but at least the package now links successfully for me under 10.8.3.

edit flag offensive delete link more
1

answered 2013-02-27 21:01:21 -0600

KruseT gravatar image

updated 2013-03-01 02:08:19 -0600

Make sure rospkg and rosdep are up-to-date, and that no old versions of them remain.

You can find out the version used by caling rospkg--version, and if there are old files, this call should tell you where they lie:

python -c 'import rospkg; print(rospkg.__file__)'

UPDATE: version 0.10.4 is okay.

Can you also try: python -c 'import rosdep2; print(rosdep2.__file__)'

This is the folder where a rospack.py or rospack.pyc is searched for, but apparently not found. I don't have MacOS, so I cannot tell whether the location is right.

Maybe also look at this answer: http://answers.ros.org/question/53110/rviz-runtime-error-in-groovy-at-mac-os-xhomebrew/

edit flag offensive delete link more

Comments

That python command prints a single line; /usr/local/lib/python2.7/site-packages/rospkg/__init__.pyc. As for rosdep --version, it returns 0.10.14. That is all okay, surely? What could it be?

Noldorin gravatar imageNoldorin ( 2013-02-28 02:30:45 -0600 )edit

Googling the Python error relating to importing urandom reveals it seems to be something to do with virtualenv (or virtual environments in general). I'm not aware Catkin/CMake uses anything like this, however?

Noldorin gravatar imageNoldorin ( 2013-02-28 12:10:11 -0600 )edit

Okay, the urandom errors are sorted now. I'm just left with a bunch of errors concerning CMake/OSX: <http://pastie.org/pastes/6357394/text>.

Noldorin gravatar imageNoldorin ( 2013-02-28 12:16:22 -0600 )edit

@KruseT: For python -c 'import rosdep2; print(rosdep2.__file__)', I get /usr/local/lib/python2.7/site-packages/rosdep2/__init__.pyc... which also seems okay. no? I will have a look at that answer, thanks.

Noldorin gravatar imageNoldorin ( 2013-03-01 05:29:07 -0600 )edit
1

@Noldorin That location is correct, there is only one way to install rosdep/rospkg on OS X, via pip. So the ubuntu pip/debian conflict is not an issue on OS X.

William gravatar imageWilliam ( 2013-03-01 05:37:10 -0600 )edit

Ah right, fair enough. By the way, temporarily unlinking brew does at least eliminate the urandom errors.

Noldorin gravatar imageNoldorin ( 2013-03-01 05:39:36 -0600 )edit

Can you maybe change your question and post an updated log, ideally just the relevant part? It seems to me that the rospack error only occurs after different errors, maybe in a context with a flawed env (which should also be fixed, but does not cuase your breakage).

KruseT gravatar imageKruseT ( 2013-03-02 12:49:34 -0600 )edit

@KruseT: The errors are exactly the same, I checked. Just with the python ones gone now...

Noldorin gravatar imageNoldorin ( 2013-03-02 13:06:46 -0600 )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

2 followers

Stats

Asked: 2013-02-27 17:42:29 -0600

Seen: 479 times

Last updated: Mar 27 '13