-
Notifications
You must be signed in to change notification settings - Fork 718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
remove libopencv-dev and find_package(OpenCV) #172
Conversation
This issue is an architectural feature/problem with newer versions of ROS, and affects all ROS packages which provide C/C++ libraries. (You'll run into similar issues if your try to build roscpp in a workspace that is overlaid on /opt/ros) rosbuild used RPATH to guarantee link consistency, but RPATH is not allowed according to the debian packaging guidelines, so the use of RPATH was removed and replaced with the use of the LD_LIBRARY_PATH environment variable. Modifying core ROS libraries to RPATH will negatively affect their ability to be accepted into mainline Debian or Ubuntu in the future, so it probably isn't a good idea. In addition, setting the cmake flag for RPATH globally may affect other packages in the workspace, which is generally not a good idea. |
Many of these packages depend directly on OpenCV by including the OpenCV headers and linking directly against the OpenCV libraries. Removing the explicit dependency on OpenCV is not a good idea; it means that these packages depend on a transient dependency, which is brittle. |
The standard ROS practice for building a package from source is to also build all downstream packages from source in the same workspace. |
@trainman419 pointed at a lot of very good reasons not to accept this PR (thx !). |
Thanks for comments,
One possibility is to provide ros-indigo-cv-bridge2 and ros-indigo-cv-bridge3 and set conflict each other. |
To get ros-indigo-cv-bridge2 and ros-indigo-cv-bridge3 conflict sure, but then we would need image_pipeline, image_common, image_transport and many more to have both versions. And it's an all or nothing situation. |
when we install ros-indigo-image-proc and try to compile cv_bridge against opencv3, image_proc in /opt/ros/indigo try to link cv_bridge in catkin_ws and that is linked against opencv3.
in this PR, we changed
find_package(OpenCV)
in each CMakeLists.txtSET(CMAKE_INSTALL_RPATH_USE_LINK_PATH TRUE)
, so /opt/ros/indigo/lib/libimage_proc.so uses cv_bridge in /opt/ros/indigo, not in catkin_ws, this may need discussion.this pr requires ros-perception/vision_opencv#105