Error when building Linux
using python3.9 in Linux:
Configuring for python 3.9...
-- Found OpenMP_C: -fopenmp
-- Found OpenMP_CXX: -fopenmp
-- Found OpenMP: TRUE
-- A library with LAPACK API found.
-- Found AMD library: /usr/lib/x86_64-linux-gnu/libamd.so
-- Found AMD header in: /usr/include/suitesparse
-- Found CAMD library: /usr/lib/x86_64-linux-gnu/libcamd.so
-- Found CAMD header in: /usr/include/suitesparse
-- Found COLAMD library: /usr/lib/x86_64-linux-gnu/libcolamd.so
-- Found COLAMD header in: /usr/include/suitesparse
-- Found CCOLAMD library: /usr/lib/x86_64-linux-gnu/libccolamd.so
-- Found CCOLAMD header in: /usr/include/suitesparse
-- Found CHOLMOD library: /usr/lib/x86_64-linux-gnu/libcholmod.so
-- Found CHOLMOD header in: /usr/include/suitesparse
-- Found CXSPARSE library: /usr/lib/x86_64-linux-gnu/libcxsparse.so
-- Found SuiteSparseQR library: /usr/lib/x86_64-linux-gnu/libspqr.so
-- Found SuiteSparseQR header in: /usr/include/suitesparse
-- Found Intel Thread Building Blocks (TBB) library: /usr/lib/x86_64-linux-gnu/libtbb.so, assuming SuiteSparseQR was compiled with TBB.
-- Found Intel Thread Building Blocks (TBB) Malloc library: /usr/lib/x86_64-linux-gnu/libtbbmalloc.so
-- Found SuiteSparse_config library: /usr/lib/x86_64-linux-gnu/libsuitesparseconfig.so
-- Found SuiteSparse_config header in: /usr/include/suitesparse
-- Adding librt: /usr/lib/x86_64-linux-gnu/librt.so to SuiteSparse_config libraries (required on Linux & Unix [not OSX] if SuiteSparse is compiled with timing).
-- Did not find METIS library (optional SuiteSparse dependency)
CMake Warning at CMakeLists.txt:58 (find_package):
By not providing "FindCeres.cmake" in CMAKE_MODULE_PATH this project has
asked CMake to find a package configuration file provided by "Ceres", but
CMake did not find one.
Could not find a package configuration file provided by "Ceres" with any of the following names:
CeresConfig.cmake
ceres-config.cmake
Add the installation prefix of "Ceres" to CMAKE_PREFIX_PATH or set "Ceres_DIR" to a directory containing one of the above files. If "Ceres" provides a separate development package or SDK, be sure it has been installed.
-- No preference for use of exported gflags CMake configuration set, and no hints for include/library directories provided. Defaulting to preferring an installed/exported gflags CMake configuration if available.
-- Found installed version of gflags: /usr/lib/x86_64-linux-gnu/cmake/gflags
-- Detected gflags version: 2.2.2
-- Found OpenCV: /usr (found version "4.2.0")
-- Found OpenCV: /usr (found version "4.2.0") found components: core imgproc calib3d imgcodecs
-- pybind11 v2.2.4
-- Configuring done
-- Generating done
-- Build files have been written to: /home/ubuntu/projects/OpenSfM/cmake_build
Compiling extension...
[ 3%] Built target gtest
[ 7%] Built target akaze
[ 36%] Built target vl
[ 40%] Built target foundation
[ 42%] Built target test_main
[ 43%] Built target dense
[ 45%] Built target geo
[ 45%] Building CXX object bundle/CMakeFiles/bundle.dir/src/bundle_adjuster.cc.o
[ 48%] Built target features
[ 49%] Building CXX object geometry/CMakeFiles/geometry.dir/src/triangulation.cc.o
[ 50%] Building CXX object geometry/CMakeFiles/geometry.dir/src/relative_pose.cc.o
[ 52%] Built target foundation_test
[ 54%] Built target dense_test
[ 56%] Built target pydense
[ 57%] Built target geo_test
[ 59%] Built target pygeo
[ 60%] Built target pyfeatures
In file included from /usr/local/include/ceres/rotation.h:53,
from /home/ubuntu/projects/OpenSfM/opensfm/src/geometry/relative_pose.h:3,
from /home/ubuntu/projects/OpenSfM/opensfm/src/geometry/src/relative_pose.cc:1:
/usr/local/include/ceres/internal/euler_angles.h:84:45: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:84:65: error: expected primary-expression before ‘,’ token
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:84:67: error: ‘constexpr’ static data member ‘Odd’ must have an initializer
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~
/usr/local/include/ceres/internal/euler_angles.h:84:67: error: expected ‘;’ at end of member declaration
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:84:70: error: expected unqualified-id before ‘>’ token
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:86:12: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:86:41: error: expected primary-expression before ‘,’ token
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:86:43: error: ‘constexpr’ static data member ‘ProperEuler’ must have an initializer
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~~~
/usr/local/include/ceres/internal/euler_angles.h:86:43: error: expected ‘;’ at end of member declaration
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:86:54: error: expected unqualified-id before ‘>’ token
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:88:12: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:88:41: error: expected primary-expression before ‘,’ token
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:88:43: error: ‘constexpr’ static data member ‘Intrinsic’ must have an initializer
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
/usr/local/include/ceres/internal/euler_angles.h:88:43: error: expected ‘;’ at end of member declaration
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:88:52: error: expected unqualified-id before ‘>’ token
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^
In file included from /usr/local/include/ceres/rotation.h:53,
from /home/ubuntu/projects/OpenSfM/opensfm/src/geometry/src/triangulation.cc:2:
/usr/local/include/ceres/internal/euler_angles.h:84:45: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:84:65: error: expected primary-expression before ‘,’ token
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:84:67: error: ‘constexpr’ static data member ‘Odd’ must have an initializer
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~
/usr/local/include/ceres/internal/euler_angles.h:84:67: error: expected ‘;’ at end of member declaration
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:84:70: error: expected unqualified-id before ‘>’ token
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:86:12: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:86:41: error: expected primary-expression before ‘,’ token
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:86:43: error: ‘constexpr’ static data member ‘ProperEuler’ must have an initializer
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~~~
/usr/local/include/ceres/internal/euler_angles.h:86:43: error: expected ‘;’ at end of member declaration
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:86:54: error: expected unqualified-id before ‘>’ token
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:88:12: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:88:41: error: expected primary-expression before ‘,’ token
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:88:43: error: ‘constexpr’ static data member ‘Intrinsic’ must have an initializer
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
/usr/local/include/ceres/internal/euler_angles.h:88:43: error: expected ‘;’ at end of member declaration
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:88:52: error: expected unqualified-id before ‘>’ token
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^
In file included from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/data/pose.h:4,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/data/bias.h:4,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/bundle_adjuster.h:3,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:1:
/home/ubuntu/projects/OpenSfM/opensfm/src/geometry/pose.h: In constructor ‘geometry::Pose::Pose(const Vec3d&, const Vec3d&)’:
/home/ubuntu/projects/OpenSfM/opensfm/src/geometry/pose.h:20:11: warning: variable ‘T_cw’ set but not used [-Wunused-but-set-variable]
20 | Mat4d T_cw = Mat4d::Identity();
| ^~~~
In file included from /usr/local/include/ceres/ceres.h:65,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/error/error_utils.h:8,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/error/position_functors.h:3,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/data/bias.h:5,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/bundle_adjuster.h:3,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:1:
/usr/local/include/ceres/product_manifold.h: At global scope:
/usr/local/include/ceres/product_manifold.h:315:59: error: expected constructor, destructor, or type conversion before ‘;’ token
315 | -> ProductManifold<Manifold0, Manifold1, Manifolds...>;
| ^
In file included from /usr/local/include/ceres/rotation.h:53,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/error/error_utils.h:9,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/error/position_functors.h:3,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/data/bias.h:5,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/bundle_adjuster.h:3,
from /home/ubuntu/projects/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:1:
/usr/local/include/ceres/internal/euler_angles.h:84:45: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:84:65: error: expected primary-expression before ‘,’ token
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:84:67: error: ‘constexpr’ static data member ‘Odd’ must have an initializer
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~
/usr/local/include/ceres/internal/euler_angles.h:84:67: error: expected ‘;’ at end of member declaration
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:84:70: error: expected unqualified-id before ‘>’ token
84 | static constexpr bool kIsParityOdd = std::is_same_v<ParityType, Odd>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:86:12: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:86:41: error: expected primary-expression before ‘,’ token
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:86:43: error: ‘constexpr’ static data member ‘ProperEuler’ must have an initializer
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~~~
/usr/local/include/ceres/internal/euler_angles.h:86:43: error: expected ‘;’ at end of member declaration
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^~~~~~~~~~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:86:54: error: expected unqualified-id before ‘>’ token
86 | std::is_same_v<AngleConventionType, ProperEuler>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:88:12: error: ‘is_same_v’ is not a member of ‘std’; did you mean ‘is_same’?
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
| is_same
/usr/local/include/ceres/internal/euler_angles.h:88:41: error: expected primary-expression before ‘,’ token
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^
/usr/local/include/ceres/internal/euler_angles.h:88:43: error: ‘constexpr’ static data member ‘Intrinsic’ must have an initializer
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
/usr/local/include/ceres/internal/euler_angles.h:88:43: error: expected ‘;’ at end of member declaration
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^~~~~~~~~
| ;
/usr/local/include/ceres/internal/euler_angles.h:88:52: error: expected unqualified-id before ‘>’ token
88 | std::is_same_v<FrameConventionType, Intrinsic>;
| ^
/home/ubuntu/projects/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc: In member function ‘void bundle::BundleAdjuster::Run()’:
/home/ubuntu/projects/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:578:25: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vectorgeometry::Camera::Parameters::size_type’ {aka ‘long unsigned int’} [-Wsign-compare]
578 | for (int i = 0; i < types.size() && index < 0; ++i) {
| ~~^~~~~~~~~~~~~~
/home/ubuntu/projects/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:694:23: warning: comparison of integer expressions of different signedness: ‘int’ and ‘std::vector
Hello, I had the same problem and solved it by using Ceres version 2.0.0 (399cda7.) At some point I read in another issue thread that Ceres 2.1.0 wants to use methods from C++17 but OpenSfM only allows methods from C++14. I have no idea about it and can't explain it further, but that's how it worked for me.
Increasing the memory allocation for Docker fixed this issue for me