0
$\begingroup$

Rosanswers logo

Hello everyone ; When I write catkin_make it gives such a warning.

/usr/bin/ld: warning: libopencv_core.so.4.2, needed by /usr/local/lib/libopencv_highgui.so.4.2.0, may conflict with libopencv_core.so.3.2.

I installed opencv with sudo apt and then I installed it from source. How can i fix the warning ?

Thanks.


Originally posted by jahim44229 on ROS Answers with karma: 20 on 2020-02-20

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

In the CMAKE lists txt file you can specify the version your package should use.

In find_package() command specify the version you need:

find_package(OpenCV 4.2.0 REQUIRED)


Originally posted by prefpkg21 with karma: 61 on 2020-02-20

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by jahim44229 on 2020-02-20:
Normally this was the case;

set(OpenCV_DIR /usr/local/lib/cmake/opencv4)

find_package(catkin REQUIRED COMPONENTS

  rospy

  roscpp

  OpenCV

  message_filters

)

When I type OpenCV 4.2.0 , I get an error.(catkin_make error)

Comment by prefpkg21 on 2020-02-20:
add a separate find_package() underneath not as a COMPONENT. Makesure your cmake modules path is set

Comment by jahim44229 on 2020-02-25:
Like this ?

set(OpenCV_DIR /usr/local/lib/cmake/opencv4)

find_package(catkin REQUIRED COMPONENTS

  cv_bridge

  message_filters

  roscpp

  rospy

  sensor_msgs

  std_msgs

)

find_package(OpenCV 4.2.0 REQUIRED)

Comment by jahim44229 on 2020-02-27:
I get the same warning again.

Comment by jahim44229 on 2020-02-27:
How Ros finds OpenCV 3.2. I didn't even write it in the CMakeList.

Comment by wgengland on 2020-03-24:
I' wondering this too.. but in windows!

Comment by Spyros on 2021-03-08:
@jahim44229 I'm facing now the same warning. I'm using opencv 4.5.1 but I found out that cv_bridge recommended version for ros melodic is the 3.2. Check here. Maybe that is why ROS finds 3.2 directly. I'm trying to make my node work fully with 3.2

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.