moveit / moveit_ros

THIS REPO HAS MOVED TO https://github.com/ros-planning/moveit
69 stars 118 forks source link

[perception] Find GL library on OS X #664

Closed wkentaro closed 8 years ago

rhaschke commented 8 years ago

Setting hard-coded paths isn't a good idea. Why does

find_package(OpenGL REQUIRED)
find_package(GLEW REQUIRED)
find_package(GLUT REQUIRED)

succeed, but doesn't set the appropriate variables? Please check the cmake files of OpenGL / GLUT and fix them instead.

wkentaro commented 8 years ago

@rhaschke Thank you for the quick reply. I have worked around and reached the solution as the commit. To build this package on OS X (10.11), it is necessary to find X11.

Reasons

% locate libglut
/opt/X11/lib/libglut.3.dylib
/opt/X11/lib/libglut.dylib
% locate GL/glut.h
/Developer/NVIDIA/CUDA-7.5/extras/CUPTI/include/GL/glut.h
/Developer/NVIDIA/CUDA-7.5/samples/common/inc/GL/glut.h
/opt/X11/include/GL/glut.h
rhaschke commented 8 years ago

I see. However, as this is obviously a bug upstream (in package OpenGL or glut), can I ask you to try another thing: As rviz uses the same find_package(OpenGL) without any APPLE-specific settings, could you please try to build rviz and report on the results there?

wkentaro commented 8 years ago

Sorry for late reply. It seems that GL/glut.h is not used in rviz.

v4hn commented 8 years ago

Maybe I'm missing something, but using link_directories is discouraged in ROS (catkin_lint complains). Now this request added a new link_directories just recently.

Is there no official way to add folders of dynamic libraries to the search path in OS X? Do we have to provide these link_directories commands to support apple? Just last week I removed some of them from moveit_core.