Invoking "make -j8 -l8" failed
this issue is old for me, I can't fix it my question here before Invoking "make -j8 -l8" failed
my experience is a zero in ccp and not good in ROS
.......
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: expected ‘(’ before ‘UnderlyingType’
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: ‘UnderlyingType’ was not declared in this scope
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: expected type-specifier before ‘UnderlyingType’
CV_ENUM_FLAGS(DrawMatchesFlags)
^
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: expected ‘>’ before ‘UnderlyingType’
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: expected ‘(’ before ‘UnderlyingType’
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: expected ‘)’ before ‘;’ token
CV_ENUM_FLAGS(DrawMatchesFlags)
^
/usr/local/include/opencv4/opencv2/features2d.hpp:1214:1: error: expected ‘)’ before ‘;’ token
In file included from /usr/local/include/opencv4/opencv2/calib3d.hpp:48:0,
from /usr/local/include/opencv4/opencv2/calib3d/calib3d.hpp:48,
from /opt/ros/indigo/include/image_geometry/pinhole_camera_model.h:7,
from /home/redhwan/turtlebot/src/turtlebot_apps/turtlebot_actions/src/find_fiducial_pose.cpp:40:
/usr/local/include/opencv4/opencv2/features2d.hpp: At global scope:
/usr/local/include/opencv4/opencv2/features2d.hpp:1232:92: error: ‘DrawMatchesFlags’ is not a class or namespace
const Scalar& color=Scalar::all(-1), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT );
^
/usr/local/include/opencv4/opencv2/features2d.hpp:1260:111: error: ‘DrawMatchesFlags’ is not a class or namespace
const std::vector<char>& matchesMask=std::vector<char>(), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT );
^
/usr/local/include/opencv4/opencv2/features2d.hpp:1267:139: error: ‘DrawMatchesFlags’ is not a class or namespace
const std::vector<std::vector<char> >& matchesMask=std::vector<std::vector<char> >(), DrawMatchesFlags flags=DrawMatchesFlags::DEFAULT );
^
/usr/local/include/opencv4/opencv2/features2d.hpp:1278:101: error: invalid use of incomplete type ‘struct cv::Ptr<cv::Feature2D>’
const Ptr<FeatureDetector>& fdetector=Ptr<FeatureDetector>() );
^
In file included from /usr/local/include/opencv4/opencv2/core/cvstd.hpp:81:0,
from /usr/local/include/opencv4/opencv2/core/base.hpp:58,
from /usr/local/include/opencv4/opencv2/core.hpp:54,
from /usr/local/include/opencv4/opencv2/core/core.hpp:48,
from /opt/ros/indigo/include/image_geometry/pinhole_camera_model.h:5,
from /home/redhwan/turtlebot/src/turtlebot_apps/turtlebot_actions/src/find_fiducial_pose.cpp:40:
/usr/local/include/opencv4/opencv2/core/cvstd_wrapper.hpp:66:8: error: declaration of ‘struct cv::Ptr<cv::Feature2D>’
struct Ptr : public std::shared_ptr<T>
^
In file included from /usr/local/include/opencv4/opencv2/calib3d.hpp:48:0,
from /usr/local/include/opencv4/opencv2/calib3d/calib3d.hpp:48,
from /opt/ros/indigo/include/image_geometry/pinhole_camera_model.h:7,
from /home/redhwan/turtlebot/src/turtlebot_apps/turtlebot_actions/src/find_fiducial_pose.cpp:40:
/usr/local/include/opencv4/opencv2/features2d.hpp:1441:30: error: field ‘dextractor’ has incomplete type
Ptr<DescriptorExtractor> dextractor;
^
/usr/local/include/opencv4/opencv2/features2d.hpp:1442:28: error: field ‘dmatcher’ has incomplete type
Ptr<DescriptorMatcher> dmatcher;
^
In file included from /usr/local/include/opencv4/opencv2/calib3d/calib3d.hpp:48:0,
from /opt/ros/indigo/include/image_geometry/pinhole_camera_model.h:7,
from /home/redhwan/turtlebot/src/turtlebot_apps/turtlebot_actions/src/find_fiducial_pose.cpp:40 ...
Please add you CMakeLists.txt, it will help probably
Thanks, I added it
That is the wrong
CMakeLists.txt
. You should show the one from the respective package.On the other hand, seeing that you are working on Indigo (to be EOL'd at the end of the month) on Ubuntu 14.04, but using a (custom installed) opencv4 (
/usr/local/include/opencv4
, released november 2018), I highly doubt this can be fixed.opencv2.4
was the default for indigo. I'd suggest to switch to ROS melodic and use the defaultopencv3
...Thank you @mgruhler, I know which the indigo and Ubuntu 14.04 end of the month but I need to finish my project. you mean I can't fix it???
well, when using opencv4 (which is not even the default version of opencv for
melodic
, we have opencv3 >= 3.2 there), I guess you'll have a hard time. And this is very, very specific. You might be able to fix it, but with a lot of manual fiddling and compiling packages from source... I'd not recommend going that route. Sticking to the default opencv version shipped with ROS is what worked for me best. But then again I'm no expert there...