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

OSX Groovy Rviz runtime error: librviz symbol not found

asked 2013-05-31 03:08:59 -0600

Mike Shomin gravatar image

Finally got through the Groovy install in OSX 10.7. No compile errors for rviz. At runtime:

rosrun rviz rviz
[ INFO] [1370005319.743413000]: rviz version 1.9.29
[ INFO] [1370005319.743491000]: compiled against OGRE version 1.7.4 (Cthugha)
dyld: lazy symbol binding failed: Symbol not found: _GetCurrentProcess
  Referenced from: /opt/ros/groovy/lib/librviz.dylib
  Expected in: /opt/ros/groovy/lib/librviz.dylib

dyld: Symbol not found: _GetCurrentProcess
  Referenced from: /opt/ros/groovy/lib/librviz.dylib
  Expected in: /opt/ros/groovy/lib/librviz.dylib

Trace/BPT trap: 5
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
1

answered 2013-05-31 15:48:00 -0600

Mike Shomin gravatar image

Ok, got it to work. I had to explicitly link librviz against the Cocoa libraries. I changed

target_link_libraries(${PROJECT_NAME}
  ${Boost_LIBRARIES}
  ${catkin_LIBRARIES}
  ${OGRE_LIBRARIES}
  ${OPENGL_LIBRARIES}
  ${QT_LIBRARIES}
  assimp
  yaml-cpp
)

in CMakeLists (in the rviz directory) to:

target_link_libraries(${PROJECT_NAME}
  ${Boost_LIBRARIES}
  ${catkin_LIBRARIES}
  ${OGRE_LIBRARIES}
  ${OPENGL_LIBRARIES}
  ${QT_LIBRARIES}
  ${rviz_ADDITIONAL_LIBRARIES}
  assimp
  yaml-cpp
)

William had defined the cocoa libraries as rviz_ADDITIONAL_LIBRARIES in the CMakeLists 2 layers up. I didn't think this should be necessary, but I just tried it and it worked. I may re-investigate to see if it's something that isn't my fault. If so, I'll submit a patch.

edit flag offensive delete link more
0

answered 2013-05-31 07:25:50 -0600

William gravatar image

It looks like rviz compiled against a different copy of librviz.dylib, than the one being dynamically loaded at /opt/ros/groovy/lib/librviz.dylib.

What is the output of rospack find rviz and how did you install/build groovy from source, did you intentionally install it to /opt/ros/groovy or did you have an older version in /opt/ros/groovy and you are running it from a local installation?

More generically, that error means the executable rviz is looking for the _GetCurrentProcess symbol in the librviz.dylib dynamic library, but it is not in there. That symbol comes from the OS X Cocoa framework, which you have to link against at build time or you get a linkedit error. That should be fixed in rviz currently, see:

https://github.com/ros-visualization/rviz/pull/563/files#L0R26

That makes me think that you might have different versions of rviz the executable and librviz.dylib the library.

edit flag offensive delete link more

Comments

Hi William, I did explicitly install groovy to /opt/ros/groovy, and from what I can tell, I put both my rviz executable and librviz there at the same time. I don't know what other version of librviz this would be linking against. I had fuerte installed, but I don't think there are any remnants.

Mike Shomin gravatar image Mike Shomin  ( 2013-05-31 14:14:20 -0600 )edit

When I run image_view in my devel_isolated folder, it works without at hitch (and as far as I can tell, it makes the same call to GetCurrentProcess and compiles againsts librviz... I think). The Rviz I'm running is definitely the one I compiled with the full groovy install.

Mike Shomin gravatar image Mike Shomin  ( 2013-05-31 14:24:37 -0600 )edit

I just recompiled librviz and rviz. Same result. I also confirmed that I have the changes pointed to for tlinking against the Cocoa Framework. Also moved the /opt/... librviz dylib, so now I get: Symbol not found .../ros_catkin_ws/devel_isolated/rviz/lib/librviz.dylib

Mike Shomin gravatar image Mike Shomin  ( 2013-05-31 14:41:00 -0600 )edit

Output of the catkin_make: http://pastebin.com/5N9pfjAd

Mike Shomin gravatar image Mike Shomin  ( 2013-05-31 14:56:17 -0600 )edit

The pastebin doesn't contain the building of rviz, just the configuration of CMake. It looks like you didn't actually rebuild it. I don't really have a clue why this is happening, I'll try to reproduce it later.

William gravatar image William  ( 2013-05-31 15:22:15 -0600 )edit

I built it, I just didn't include that in the pastebin, didn't think it'd be helpful. Here's the whole shebang: http://pastebin.com/JAS4KdiH

Mike Shomin gravatar image Mike Shomin  ( 2013-05-31 15:32:19 -0600 )edit

With regard to your first question, after making and installation, "rospack find rviz" yields "/opt/ros/groovy/share/rviz"

Mike Shomin gravatar image Mike Shomin  ( 2013-05-31 15:34:06 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-05-31 03:08:59 -0600

Seen: 412 times

Last updated: May 31 '13