Open ketanatzebu opened 1 year ago
Getting this error while building the ros package,
[ 50%] Building CXX object midas_cpp/CMakeFiles/midas_cpp.dir/src/main.cpp.o [100%] Linking CXX executable midas_cpp /usr/bin/ld: warning: libopencv_imgcodecs.so.4.2, needed by /opt/ros/noetic/lib/libcv_bridge.so, may conflict with libopencv_imgcodecs.so.408 /usr/bin/ld: warning: libopencv_core.so.408, needed by /home/ketan/opencv/build/lib/libopencv_imgcodecs.so.4.8.0, may conflict with libopencv_core.so.4.2 /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in functioncv::Mat::Mat(cv::Size_, int, void, unsigned long)': main.cpp:(.text._ZN2cv3MatC2ENS_5Size_IiEEiPvm[_ZN2cv3MatC5ENS_5Size_IiEEiPvm]+0x155): undefined reference to `cv::error(int, std::string const&, char const, char const, int)' /usr/bin/ld: main.cpp:(.text._ZN2cv3MatC2ENS_5Size_IiEEiPvm[_ZN2cv3MatC5ENS_5Size_IiEEiPvm]+0x194): undefined reference to `cv::error(int, std::string const&, char const, char const, int)' /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in function Midas::imageCb(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)': main.cpp:(.text._ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x40): undefined reference tocv_bridge::toCvCopy(boost::shared_ptr<sensormsgs::Image<std::allocator > const> const&, std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x29eb): undefined reference to `ros::console::initializeLogLocation(ros::console::LogLocation, std::string const&, ros::console::levels::Level)' /usr/bin/ld: main.cpp:(.text._ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x2c67): undefined reference to ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in functionMidas::Midas()': main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x8d): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x1ed): undefined reference toros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x200): undefined reference to ros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x26f): undefined reference toros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x282): undefined reference to ros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x2f1): undefined reference toros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x304): undefined reference to ros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x36b): undefined reference toros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x3b3): undefined reference to ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x3fe): undefined reference toros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x5e6): undefined reference to ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x817): undefined reference toros::NodeHandle::hasParam(std::string const&) const' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x831): undefined reference to ros::NodeHandle::getParam(std::string const&, std::string&) const' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x8d7): undefined reference toimage_transport::ImageTransport::subscribe(std::string const&, unsigned int, boost::function<void (boost::shared_ptr<sensormsgs::Image<std::allocator > const> const&)> const&, boost::shared_ptr const&, image_transport::TransportHints const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0xaa2): undefined reference to image_transport::ImageTransport::advertise(std::string const&, unsigned int, bool)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x12a2): undefined reference toros::param::get(std::string const&, int&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x12ea): undefined reference to ros::param::get(std::string const&, int&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x1332): undefined reference toros::param::get(std::string const&, bool&)' /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in function main': main.cpp:(.text.startup+0x52): undefined reference toros::init(int&, char, std::string const&, unsigned int)' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to TIFFReadRGBATileExt@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFReadRGBAStripExt@LIBTIFF_4.0' collect2: error: ld returned 1 exit status make[2]: ** [midas_cpp/CMakeFiles/midas_cpp.dir/build.make:190: midas_cpp/midas_cpp] Error 1 make[1]: [CMakeFiles/Makefile2:833: midas_cpp/CMakeFiles/midas_cpp.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 Invoking "make -j12 -l12" failed `
[ 50%] Building CXX object midas_cpp/CMakeFiles/midas_cpp.dir/src/main.cpp.o [100%] Linking CXX executable midas_cpp /usr/bin/ld: warning: libopencv_imgcodecs.so.4.2, needed by /opt/ros/noetic/lib/libcv_bridge.so, may conflict with libopencv_imgcodecs.so.408 /usr/bin/ld: warning: libopencv_core.so.408, needed by /home/ketan/opencv/build/lib/libopencv_imgcodecs.so.4.8.0, may conflict with libopencv_core.so.4.2 /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in function
Midas::imageCb(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)': main.cpp:(.text._ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x40): undefined reference to
ros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in function
ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x1ed): undefined reference to
ros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x26f): undefined reference to
ros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x2f1): undefined reference to
ros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x36b): undefined reference to
ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x3fe): undefined reference to
ros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x817): undefined reference to
ros::NodeHandle::getParam(std::string const&, std::string&) const' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x8d7): undefined reference to
image_transport::ImageTransport::advertise(std::string const&, unsigned int, bool)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x12a2): undefined reference to
ros::param::get(std::string const&, int&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x1332): undefined reference to
main': main.cpp:(.text.startup+0x52): undefined reference to
TIFFReadRGBATileExt@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
Getting this error while building the ros package,
[ 50%] Building CXX object midas_cpp/CMakeFiles/midas_cpp.dir/src/main.cpp.o [100%] Linking CXX executable midas_cpp /usr/bin/ld: warning: libopencv_imgcodecs.so.4.2, needed by /opt/ros/noetic/lib/libcv_bridge.so, may conflict with libopencv_imgcodecs.so.408 /usr/bin/ld: warning: libopencv_core.so.408, needed by /home/ketan/opencv/build/lib/libopencv_imgcodecs.so.4.8.0, may conflict with libopencv_core.so.4.2 /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in function
cv::Mat::Mat(cv::Size_Midas::imageCb(boost::shared_ptr<sensor_msgs::Image_<std::allocator<void> > const> const&)': main.cpp:(.text._ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE[_ZN5Midas7imageCbERKN5boost10shared_ptrIKN11sensor_msgs6Image_ISaIvEEEEE]+0x40): undefined reference to
cv_bridge::toCvCopy(boost::shared_ptr<sensormsgs::Image<std::allocatorros::console::initializeLogLocation(ros::console::LogLocation*, std::string const&, ros::console::levels::Level)' /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in function
Midas::Midas()': main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x8d): undefined reference toros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x1ed): undefined reference to
ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x200): undefined reference toros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x26f): undefined reference to
ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x282): undefined reference toros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x2f1): undefined reference to
ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x304): undefined reference toros::param::get(std::string const&, std::string&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x36b): undefined reference to
ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x3b3): undefined reference toros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x3fe): undefined reference to
ros::param::has(std::string const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x5e6): undefined reference toros::NodeHandle::NodeHandle(std::string const&, std::map<std::string, std::string, std::less<std::string>, std::allocator<std::pair<std::string const, std::string> > > const&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x817): undefined reference to
ros::NodeHandle::hasParam(std::string const&) const' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x831): undefined reference toros::NodeHandle::getParam(std::string const&, std::string&) const' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x8d7): undefined reference to
image_transport::ImageTransport::subscribe(std::string const&, unsigned int, boost::function<void (boost::shared_ptr<sensormsgs::Image<std::allocatorimage_transport::ImageTransport::advertise(std::string const&, unsigned int, bool)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x12a2): undefined reference to
ros::param::get(std::string const&, int&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x12ea): undefined reference toros::param::get(std::string const&, int&)' /usr/bin/ld: main.cpp:(.text._ZN5MidasC2Ev[_ZN5MidasC5Ev]+0x1332): undefined reference to
ros::param::get(std::string const&, bool&)' /usr/bin/ld: CMakeFiles/midas_cpp.dir/src/main.cpp.o: in functionmain': main.cpp:(.text.startup+0x52): undefined reference to
ros::init(int&, char, std::string const&, unsigned int)' /usr/bin/ld: /lib/libgdal.so.26: undefined reference toTIFFReadRGBATileExt@LIBTIFF_4.0' /usr/bin/ld: /lib/libgdal.so.26: undefined reference to
TIFFReadRGBAStripExt@LIBTIFF_4.0' collect2: error: ld returned 1 exit status make[2]: ** [midas_cpp/CMakeFiles/midas_cpp.dir/build.make:190: midas_cpp/midas_cpp] Error 1 make[1]: [CMakeFiles/Makefile2:833: midas_cpp/CMakeFiles/midas_cpp.dir/all] Error 2 make: *** [Makefile:141: all] Error 2 Invoking "make -j12 -l12" failed `