catkin_make error "Invoking "make -j8 -l8" failed"
Hello good people, I am relatively new to ROS,
I am trying to compile my workspace with a cloned repository from
(https://github.com/aniskoubaa/ros_essentials_cpp/tree/ros-noetic)
When I invoke catkin_make
I keep getting an error
~/catkin_ws$ catkin_make
...
[ 91%] Built target scan_subscriber_cpp
[ 94%] Built target add_two_ints_client
[ 97%] Built target add_two_ints_server
/usr/bin/ld: warning: libopencv_imgcodecs.so.4.2, needed by /usr/lib/x86_64-linux-gnu/libopencv_highgui.so.4.2.0, may conflict with libopencv_imgcodecs.so.4.5
/usr/bin/ld: warning: libopencv_imgproc.so.4.5, needed by /usr/local/lib/libopencv_imgcodecs.so.4.5.1, may conflict with libopencv_imgproc.so.4.2
/usr/bin/ld: warning: libIlmImf-2_2.so.22, needed by /usr/local/lib/libopencv_imgcodecs.so.4.5.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: warning: libopencv_core.so.4.5, needed by /usr/local/lib/libopencv_imgcodecs.so.4.5.1, may conflict with libopencv_core.so.4.2
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::ChannelList::insert(char const*, Imf_2_2::Channel const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::hasChromaticities(Imf_2_2::Header const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::readPixels(int, int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::channels() const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::InputFile(char const*, int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::FrameBuffer::insert(char const*, Imf_2_2::Slice const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::chromaticities(Imf_2_2::Header const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::globalThreadCount()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::header() const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::writePixels(int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Channel::Channel(Imf_2_2::PixelType, int, int, bool)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::FrameBuffer::begin()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Slice::Slice(Imf_2_2::PixelType, char*, unsigned long, unsigned long, int, int, double, bool, bool)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::dataWindow() const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::channels()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::~Header()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::OutputFile(char const*, Imf_2_2::Header const&, int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::ChannelList::findChannel(char const*) const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::FrameBuffer::end()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::Header(int, int, float, Imath_2_2::Vec2<float> const&, float, Imf_2_2::LineOrder, Imf_2_2::Compression)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Chromaticities::Chromaticities(Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::~OutputFile()'
collect2: error: ld returned 1 exit status
make[2]: *** [ros_essentials_cpp/CMakeFiles/read_video_cpp.dir/build.make:175: /home/furkan/catkin_ws/devel/lib/ros_essentials_cpp/read_video_cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:1896: ros_essentials_cpp/CMakeFiles/read_video_cpp.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
/usr/bin/ld: warning: libopencv_imgcodecs.so.4.2, needed by /opt/ros/noetic/lib/libcv_bridge.so, may conflict with libopencv_imgcodecs.so.4.5
/usr/bin/ld: warning: libopencv_imgproc.so.4.5, needed by /usr/local/lib/libopencv_imgcodecs.so.4.5.1, may conflict with libopencv_imgproc.so.4.2
/usr/bin/ld: warning: libIlmImf-2_2.so.22, needed by /usr/local/lib/libopencv_imgcodecs.so.4.5.1, not found (try using -rpath or -rpath-link)
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::ChannelList::insert(char const*, Imf_2_2::Channel const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::hasChromaticities(Imf_2_2::Header const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::readPixels(int, int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::channels() const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::chromaticities(Imf_2_2::Header const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::FrameBuffer::begin()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Slice::Slice(Imf_2_2::PixelType, char*, unsigned long, unsigned long, int, int, double, bool, bool)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::dataWindow() const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::Header(int, int, float, Imath_2_2::Vec2<float> const&, float, Imf_2_2::LineOrder, Imf_2_2::Compression)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::channels()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::OutputFile(char const*, Imf_2_2::Header const&, int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::ChannelList::findChannel(char const*) const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::~OutputFile()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::InputFile(char const*, int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::FrameBuffer::insert(char const*, Imf_2_2::Slice const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::globalThreadCount()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::InputFile::header() const'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::writePixels(int)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Channel::Channel(Imf_2_2::PixelType, int, int, bool)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::OutputFile::setFrameBuffer(Imf_2_2::FrameBuffer const&)'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Header::~Header()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::FrameBuffer::end()'
/usr/bin/ld: /usr/local/lib/libopencv_imgcodecs.so.4.5.1: undefined reference to `Imf_2_2::Chromaticities::Chromaticities(Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&, Imath_2_2::Vec2<float> const&)'
collect2: error: ld returned 1 exit status
make[2]: *** [ros_essentials_cpp/CMakeFiles/image_pub_sub_cpp.dir/build.make:175: /home/furkan/catkin_ws/devel/lib/ros_essentials_cpp/image_pub_sub_cpp] Error 1
make[1]: *** [CMakeFiles/Makefile2:2071: ros_essentials_cpp/CMakeFiles/image_pub_sub_cpp.dir/all] Error 2
make: *** [Makefile:141: all] Error 2
Invoking "make -j8 -l8" failed
Is there a solution to this particular problem?
Asked by FurkanEdizkan on 2021-01-10 19:08:48 UTC
Comments
Please update this question and provide the full error message. As you've written the question it's impossible to determine what might be wrong.
Asked by jarvisschultz on 2021-01-11 12:09:57 UTC
I edited and added the full message to the question sir, thank you
Asked by FurkanEdizkan on 2021-01-11 15:42:04 UTC
Looks like you installed libopencv 4.5 (maybe compiled from source?) You need to uninstall or hide it.
Asked by Orhan on 2021-01-11 16:33:31 UTC
Yes i think you are right sir, I had opencv installed before so it probably not working properly for this case. I am trying to remove it fully but it seems it is rather a long process I still find opencv files even after purge. After if it works i will post a solution if any other person face same issue.
Asked by FurkanEdizkan on 2021-01-13 07:36:26 UTC