Build fails on Ubuntu18.04.
I fresh installed ubuntu18.04, then followed instructions to install all dependencies. I didn't build any dependencies from source - I went with a apt-get versions for example "apt-get install libopencvdev" "apt-get install libeigen3-dev"
I would appreciate any feedback, I find the following output quite un-descriptive.
After running ./build.sh I get:
Configuring and building Thirdparty/DBoW2 ...
mkdir: cannot create directory ‘build’: File exists
-- Configuring done
-- Generating done
-- Build files have been written to: /home/a/ORB_SLAM2/Thirdparty/DBoW2/build
[100%] Built target DBoW2
Configuring and building Thirdparty/g2o ...
mkdir: cannot create directory ‘build’: File exists
-- BUILD TYPE:Release
-- Compiling on Unix
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if):
if given arguments:
"TRUE"
An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE)
CMakeLists.txt:47 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
CMake Warning (dev) at /usr/share/cmake-3.10/Modules/FindOpenMP.cmake:310 (if):
if given arguments:
"TRUE"
An argument named "TRUE" appears in a conditional statement. Policy
CMP0012 is not set: if() recognizes numbers and boolean constants. Run
"cmake --help-policy CMP0012" for policy details. Use the cmake_policy
command to set the policy and suppress this warning.
Call Stack (most recent call first):
/usr/share/cmake-3.10/Modules/FindOpenMP.cmake:425 (_OPENMP_GET_SPEC_DATE)
CMakeLists.txt:47 (FIND_PACKAGE)
This warning is for project developers. Use -Wno-dev to suppress it.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/a/ORB_SLAM2/Thirdparty/g2o/build
[100%] Built target g2o
Uncompress vocabulary ...
Configuring and building ORB_SLAM2 ...
mkdir: cannot create directory ‘build’: File exists
Build type: Release
-- Using flag -std=c++11.
-- Configuring done
-- Generating done
-- Build files have been written to: /home/a/ORB_SLAM2/build
[ 3%] Building CXX object CMakeFiles/ORB_SLAM2.dir/src/System.cc.o
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:74: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
^~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:82: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
^~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:82: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
^~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h: In instantiation of ‘class g2o::BaseVertex<3, Eigen::Matrix<double, 3, 1> >’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_sba.h:40:35: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:72: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h: In instantiation of ‘class g2o::BaseVertex<6, g2o::SE3Quat>’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_six_dof_expmap.h:59:33: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:72: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<2, Eigen::Matrix<double, 2, 1>, g2o::VertexSBAPointXYZ, g2o::VertexSE3Expmap>’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_six_dof_expmap.h:80:35: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<3, Eigen::Matrix<double, 3, 1>, g2o::VertexSBAPointXYZ, g2o::VertexSE3Expmap>’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_six_dof_expmap.h:112:41: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h: In instantiation of ‘class g2o::BaseVertex<7, g2o::Sim3>’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:48:35: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:62:72: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, D, D>, Matrix<double,D,D>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<7, g2o::Sim3, g2o::VertexSim3Expmap, g2o::VertexSim3Expmap>’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:99:27: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h: In instantiation of ‘class g2o::BaseBinaryEdge<2, Eigen::Matrix<double, 2, 1>, g2o::VertexSBAPointXYZ, g2o::VertexSim3Expmap>’:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:130:36: required from here
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:59:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Di, Dj>, Matrix<double, Di, Dj>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
In file included from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:35:0,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_binary_edge.h:60:80: warning: ‘Eigen::AlignedBit’ is deprecated [-Wdeprecated-declarations]
typedef Eigen::Map<Matrix<double, Dj, Di>, Matrix<double, Dj, Di>::Flags & AlignedBit ? Aligned : Unaligned > HessianBlockTransposedType;
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~
In file included from /usr/include/eigen3/Eigen/Core:344:0,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/jacobian_workspace.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/optimizable_graph.h:41,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/../core/base_vertex.h:30,
from /home/a/ORB_SLAM2/Thirdparty/g2o/g2o/types/types_seven_dof_expmap.h:34,
from /home/a/ORB_SLAM2/include/LoopClosing.h:34,
from /home/a/ORB_SLAM2/include/LocalMapping.h:26,
from /home/a/ORB_SLAM2/include/Tracking.h:31,
from /home/a/ORB_SLAM2/include/System.h:29,
from /home/a/ORB_SLAM2/src/System.cc:23:
/usr/include/eigen3/Eigen/src/Core/util/Constants.h:162:37: note: declared here
EIGEN_DEPRECATED const unsigned int AlignedBit = 0x80;
^~~~~~~~~~
/home/a/ORB_SLAM2/src/System.cc: In member function ‘cv::Mat ORB_SLAM2::System::TrackStereo(const cv::Mat&, const cv::Mat&, const double&)’:
/home/a/ORB_SLAM2/src/System.cc:134:17: error: ‘usleep’ was not declared in this scope
usleep(1000);
^~~~~~
/home/a/ORB_SLAM2/src/System.cc:134:17: note: suggested alternative: ‘fseek’
usleep(1000);
^~~~~~
fseek
/home/a/ORB_SLAM2/src/System.cc: In member function ‘cv::Mat ORB_SLAM2::System::TrackRGBD(const cv::Mat&, const cv::Mat&, const double&)’:
/home/a/ORB_SLAM2/src/System.cc:185:17: error: ‘usleep’ was not declared in this scope
usleep(1000);
^~~~~~
/home/a/ORB_SLAM2/src/System.cc:185:17: note: suggested alternative: ‘fseek’
usleep(1000);
^~~~~~
fseek
/home/a/ORB_SLAM2/src/System.cc: In member function ‘cv::Mat ORB_SLAM2::System::TrackMonocular(const cv::Mat&, const double&)’:
/home/a/ORB_SLAM2/src/System.cc:236:17: error: ‘usleep’ was not declared in this scope
usleep(1000);
^~~~~~
/home/a/ORB_SLAM2/src/System.cc:236:17: note: suggested alternative: ‘fseek’
usleep(1000);
^~~~~~
fseek
/home/a/ORB_SLAM2/src/System.cc: In member function ‘void ORB_SLAM2::System::Shutdown()’:
/home/a/ORB_SLAM2/src/System.cc:309:13: error: ‘usleep’ was not declared in this scope
usleep(5000);
^~~~~~
/home/a/ORB_SLAM2/src/System.cc:309:13: note: suggested alternative: ‘fseek’
usleep(5000);
^~~~~~
fseek
/home/a/ORB_SLAM2/src/System.cc:315:9: error: ‘usleep’ was not declared in this scope
usleep(5000);
^~~~~~
/home/a/ORB_SLAM2/src/System.cc:315:9: note: suggested alternative: ‘fseek’
usleep(5000);
^~~~~~
fseek
CMakeFiles/ORB_SLAM2.dir/build.make:62: recipe for target 'CMakeFiles/ORB_SLAM2.dir/src/System.cc.o' failed
make[2]: *** [CMakeFiles/ORB_SLAM2.dir/src/System.cc.o] Error 1
CMakeFiles/Makefile2:252: recipe for target 'CMakeFiles/ORB_SLAM2.dir/all' failed
make[1]: *** [CMakeFiles/ORB_SLAM2.dir/all] Error 2
Makefile:83: recipe for target 'all' failed
make: *** [all] Error 2
Insert the following:
include
in system.h
Thanks @giwrgosg , the solution worked for me on Ubuntu18.04
Thanks for this solution, but by the way, i wander why this error occurs on Ubuntu18.04 while i didn't meet this error compiling on ubuntu16.04~~
Thanks a lot
solution ( add #include
Thanks @giwrgosg !!!!!!
Most helpful comment
Insert the following:
in system.h