OpenSfM
OpenSfM copied to clipboard
Build error: ‘vector’ in namespace ‘std’ does not name a template type
Howdy folks!
When I clone the repo to my Ubuntu 18.04 machine and run "python3 setup.py build" i get the following output with errors:
Configuring for python 3.7...
-- 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)
-- 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.1
-- Found OpenCV: /usr (found version "3.3.1")
-- Found OpenCV: /usr (found version "3.3.1") found components: core imgproc calib3d imgcodecs
-- pybind11 v2.2.4
-- Configuring done
-- Generating done
-- Build files have been written to: /media/taylor/feynman/Software/OpenSfM/cmake_build
Compiling extension...
[ 3%] Built target gtest
[ 8%] Built target akaze
[ 45%] Built target vl
[ 51%] Built target foundation
[ 53%] Built target test_main
Scanning dependencies of target geometry
[ 55%] Built target bundle
[ 59%] Built target features
[ 61%] Built target dense
[ 64%] Built target sfm
[ 65%] Building CXX object geometry/CMakeFiles/geometry.dir/src/camera.cc.o
[ 68%] Built target foundation_test
[ 69%] Building CXX object geometry/CMakeFiles/geometry.dir/src/essential.cc.o
[ 71%] Built target pybundle
[ 72%] Building CXX object geometry/CMakeFiles/geometry.dir/src/absolute_pose.cc.o
[ 74%] Built target pydense
[ 76%] Built target dense_test
[ 78%] Built target pyfeatures
[ 80%] Built target pysfm
[ 82%] Built target sfm_test
In file included from /media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/essential.cc:1:0:
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/../essential.h:99:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 3>> EssentialFivePoints(IT begin, IT end) {
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/../essential.h:164:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 3>> EssentialNPoints(IT begin, IT end) {
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/../essential.h:190:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 3>> EssentialFivePoints(
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/../essential.h:194:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 3>> EssentialNPoints(
^~~~~~
In file included from /media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:1:0:
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h:15:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 4>> AbsolutePoseThreePoints(IT begin, IT end) {
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h: In function ‘Eigen::Matrix<double, 3, 4> AbsolutePoseNPoints(IT, IT)’:
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h:145:10: error: ‘vector’ is not a member of ‘std’
std::vector< std::pair<Eigen::Vector3d, Eigen::Vector3d> > current_points;
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h:145:62: error: expected primary-expression before ‘>’ token
std::vector< std::pair<Eigen::Vector3d, Eigen::Vector3d> > current_points;
^
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h:145:64: error: ‘current_points’ was not declared in this scope
std::vector< std::pair<Eigen::Vector3d, Eigen::Vector3d> > current_points;
^~~~~~~~~~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h: At global scope:
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/absolute_pose.h:174:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 4>> AbsolutePoseThreePoints(
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:19:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 4>> AbsolutePoseThreePoints(
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc: In function ‘Eigen::Matrix<double, 3, 4> geometry::AbsolutePoseNPoints(const Eigen::Matrix<double, -1, 3>&, const Eigen::Matrix<double, -1, 3>&)’:
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:33:8: error: ‘vector’ is not a member of ‘std’
std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d>> samples(bearings.rows());
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:33:57: error: expected primary-expression before ‘>’ token
std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d>> samples(bearings.rows());
^~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:33:60: error: ‘samples’ was not declared in this scope
std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d>> samples(bearings.rows());
^~~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc: In function ‘Eigen::Vector3d geometry::AbsolutePoseNPointsKnownRotation(const Eigen::Matrix<double, -1, 3>&, const Eigen::Matrix<double, -1, 3>&)’:
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:44:8: error: ‘vector’ is not a member of ‘std’
std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d>> samples(bearings.rows());
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:44:57: error: expected primary-expression before ‘>’ token
std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d>> samples(bearings.rows());
^~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/absolute_pose.cc:44:60: error: ‘samples’ was not declared in this scope
std::vector<std::pair<Eigen::Vector3d, Eigen::Vector3d>> samples(bearings.rows());
^~~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/essential.cc:154:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 3>> EssentialFivePoints(
^~~~~~
/media/taylor/feynman/Software/OpenSfM/opensfm/src/geometry/src/essential.cc:168:6: error: ‘vector’ in namespace ‘std’ does not name a template type
std::vector<Eigen::Matrix<double, 3, 3>> EssentialNPoints(
^~~~~~
geometry/CMakeFiles/geometry.dir/build.make:104: recipe for target 'geometry/CMakeFiles/geometry.dir/src/absolute_pose.cc.o' failed
make[2]: *** [geometry/CMakeFiles/geometry.dir/src/absolute_pose.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
geometry/CMakeFiles/geometry.dir/build.make:78: recipe for target 'geometry/CMakeFiles/geometry.dir/src/essential.cc.o' failed
make[2]: *** [geometry/CMakeFiles/geometry.dir/src/essential.cc.o] Error 1
CMakeFiles/Makefile2:700: recipe for target 'geometry/CMakeFiles/geometry.dir/all' failed
make[1]: *** [geometry/CMakeFiles/geometry.dir/all] Error 2
Makefile:97: recipe for target 'all' failed
make: *** [all] Error 2
Traceback (most recent call last):
File "setup.py", line 49, in <module>
build_c_extension()
File "setup.py", line 45, in build_c_extension
subprocess.check_call(['make', '-j4'], cwd='cmake_build')
File "/home/taylor/miniconda3/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2.
If I add
#include <vector>
to the top of the following files, the code compiles fully:
opensfm/src/geometry/absolute_pose.h opensfm/src/geometry/camera.h opensfm/src/geometry/essential.h
Thoughts?
Hi @tlalexander ,
Can you give a try with the current master https://github.com/mapillary/OpenSfM/tree/357fa7ca3d281f1d07ae29e4899580096023a254 ?
Yann
Sure! I am on 20.04 now. I did not build and install ceres-solver or opengv (I think they might still be installed from before). I still got errors which do not seem to be due to either of those packages. I'm sleepy so I may have missed something.
I did a normal git clone recursive, and then did
git checkout 357fa7ca3d281f1d07ae29e4899580096023a254
Here is the build output with errors:
(base) taylor@taylor-desktop:~/Software/OpenSfM$ python3 setup.py build
Configuring for python 3.7...
-- 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).
-- Found METIS library: /usr/lib/libmetis.so.
-- 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/taylor/Software/OpenSfM/cmake_build
Compiling extension...
[ 3%] Built target gtest
[ 7%] Built target akaze
[ 37%] Built target vl
[ 40%] Built target foundation
Scanning dependencies of target test_main
Scanning dependencies of target dense
Scanning dependencies of target bundle
[ 41%] Building CXX object CMakeFiles/test_main.dir/testing_main.cc.o
[ 42%] Building CXX object geometry/CMakeFiles/geometry.dir/src/camera.cc.o
[ 43%] Building CXX object dense/CMakeFiles/dense.dir/src/depthmap.cc.o
[ 44%] Building CXX object bundle/CMakeFiles/bundle.dir/src/bundle_adjuster.cc.o
[ 45%] Linking CXX static library libtest_main.a
[ 45%] Built target test_main
Scanning dependencies of target features
[ 46%] Building CXX object features/CMakeFiles/features.dir/src/akaze_bind.cc.o
In file included from /home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:1:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:34:21: error: ‘vector’ in namespace ‘std’ does not name a template type
34 | const std::vector<Camera::Parameters>& types, const VecXd& values);
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:6:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
5 | #include <unordered_map>
+++ |+#include <vector>
6 |
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:34:27: error: expected ‘,’ or ‘...’ before ‘<’ token
34 | const std::vector<Camera::Parameters>& types, const VecXd& values);
| ^
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:62:8: error: ‘vector’ in namespace ‘std’ does not name a template type
62 | std::vector<Parameters> GetParametersTypes() const;
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:62:3: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
62 | std::vector<Parameters> GetParametersTypes() const;
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:65:8: error: ‘map’ in namespace ‘std’ does not name a template type
65 | std::map<Parameters, double, CompParameters> GetParametersMap() const;
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:6:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
5 | #include <unordered_map>
+++ |+#include <map>
6 |
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:90:8: error: ‘vector’ in namespace ‘std’ does not name a template type
90 | std::vector<Parameters> types_;
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:90:3: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
90 | std::vector<Parameters> types_;
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:7:27: error: ‘vector’ in namespace ‘std’ does not name a template type
7 | const std::vector<Camera::Parameters>& types,
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:2:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
1 | #include <geometry/camera.h>
+++ |+#include <vector>
2 | #include <geometry/camera_functions.h>
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:7:33: error: expected ‘,’ or ‘...’ before ‘<’ token
7 | const std::vector<Camera::Parameters>& types,
| ^
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In constructor ‘Camera::Camera(const ProjectionType&, int)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:9:20: error: class ‘Camera’ does not have any field named ‘types_’
9 | : type_(type), types_(types), values_(values) {}
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:9:27: error: ‘types’ was not declared in this scope; did you mean ‘type_’?
9 | : type_(type), types_(types), values_(values) {}
| ^~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:9:43: error: ‘values’ was not declared in this scope; did you mean ‘values_’?
9 | : type_(type), types_(types), values_(values) {}
| ^~~~~~
| values_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreatePerspectiveCamera(double, double, double)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:14:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
14 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::K2,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateBrownCamera(double, double, const Vec2d&, const VecXd&)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:29:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
29 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::K2,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateFisheyeCamera(double, double, double)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:44:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
44 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::K2,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateFisheyeOpencvCamera(double, double, const Vec2d&, const VecXd&)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:59:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
59 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::K2,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateFisheye62Camera(double, double, const Vec2d&, const VecXd&)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:83:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
83 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::K2,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateDualCamera(double, double, double, double)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:100:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
100 | camera.types_ = {Camera::Parameters::Transition, Camera::Parameters::K1,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateSphericalCamera()’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:110:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
110 | camera.types_ = {Camera::Parameters::None};
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateRadialCamera(double, double, const Vec2d&, const Vec2d&)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:121:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
121 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::K2,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:124:32: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
124 | camera.values_.resize(camera.types_.size());
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In static member function ‘static Camera Camera::CreateSimpleRadialCamera(double, double, const Vec2d&, double)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:135:10: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
135 | camera.types_ = {Camera::Parameters::K1, Camera::Parameters::Focal,
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:138:32: error: ‘class Camera’ has no member named ‘types_’; did you mean ‘type_’?
138 | camera.values_.resize(camera.types_.size());
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: At global scope:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:144:6: error: ‘vector’ in namespace ‘std’ does not name a template type
144 | std::vector<Camera::Parameters> Camera::GetParametersTypes() const {
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:144:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
144 | std::vector<Camera::Parameters> Camera::GetParametersTypes() const {
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:152:6: error: ‘map’ in namespace ‘std’ does not name a template type
152 | std::map<Camera::Parameters, double, Camera::CompParameters>
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:2:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
1 | #include <geometry/camera.h>
+++ |+#include <map>
2 | #include <geometry/camera_functions.h>
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In member function ‘void Camera::SetParameterValue(const Camera::Parameters&, double)’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:163:23: error: ‘types_’ was not declared in this scope; did you mean ‘type_’?
163 | const auto type = types_[i];
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In member function ‘double Camera::GetParameterValue(const Camera::Parameters&) const’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:174:23: error: ‘types_’ was not declared in this scope; did you mean ‘type_’?
174 | const auto type = types_[i];
| ^~~~~~
| type_
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc: In member function ‘Mat3d Camera::GetProjectionMatrix() const’:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/src/camera.cc:216:27: error: ‘GetParametersMap’ was not declared in this scope; did you mean ‘GetParametersValues’?
216 | const auto params_map = GetParametersMap();
| ^~~~~~~~~~~~~~~~
| GetParametersValues
In file included from /home/taylor/Software/OpenSfM/opensfm/src/bundle/src/../bundle_adjuster.h:4,
from /home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:1:
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:34:21: error: ‘vector’ in namespace ‘std’ does not name a template type
34 | const std::vector<Camera::Parameters>& types, const VecXd& values);
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:6:1: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
5 | #include <unordered_map>
+++ |+#include <vector>
6 |
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:34:27: error: expected ‘,’ or ‘...’ before ‘<’ token
34 | const std::vector<Camera::Parameters>& types, const VecXd& values);
| ^
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:62:8: error: ‘vector’ in namespace ‘std’ does not name a template type
62 | std::vector<Parameters> GetParametersTypes() const;
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:62:3: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
62 | std::vector<Parameters> GetParametersTypes() const;
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:65:8: error: ‘map’ in namespace ‘std’ does not name a template type
65 | std::map<Parameters, double, CompParameters> GetParametersMap() const;
| ^~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:6:1: note: ‘std::map’ is defined in header ‘<map>’; did you forget to ‘#include <map>’?
5 | #include <unordered_map>
+++ |+#include <map>
6 |
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:90:8: error: ‘vector’ in namespace ‘std’ does not name a template type
90 | std::vector<Parameters> types_;
| ^~~~~~
/home/taylor/Software/OpenSfM/opensfm/src/geometry/camera.h:90:3: note: ‘std::vector’ is defined in header ‘<vector>’; did you forget to ‘#include <vector>’?
90 | std::vector<Parameters> types_;
| ^~~
make[2]: *** [geometry/CMakeFiles/geometry.dir/build.make:66: geometry/CMakeFiles/geometry.dir/src/camera.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:900: geometry/CMakeFiles/geometry.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 47%] Building CXX object features/CMakeFiles/features.dir/src/hahog.cc.o
/home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc: In member function ‘Camera BundleAdjuster::GetDefaultCameraSigma(const Camera&) const’:
/home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:48:39: error: ‘class Camera’ has no member named ‘GetParametersTypes’; did you mean ‘GetParametersValues’?
48 | for (const auto type : sigma_camera.GetParametersTypes()) {
| ^~~~~~~~~~~~~~~~~~
| GetParametersValues
/home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc: In static member function ‘static void AddCameraPriorlError::Apply(BACamera&, ceres::Problem*)’:
/home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:724:38: error: ‘const class Camera’ has no member named ‘GetParametersTypes’; did you mean ‘GetParametersValues’?
724 | const auto types = camera_object.GetParametersTypes();
| ^~~~~~~~~~~~~~~~~~
| GetParametersValues
/home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc: In member function ‘void BundleAdjuster::Run()’:
/home/taylor/Software/OpenSfM/opensfm/src/bundle/src/bundle_adjuster.cc:770:33: error: ‘const class Camera’ has no member named ‘GetParametersTypes’; did you mean ‘GetParametersValues’?
770 | const auto types = camera.GetParametersTypes();
| ^~~~~~~~~~~~~~~~~~
| GetParametersValues
[ 48%] Linking CXX static library libdense.a
[ 48%] Built target dense
[ 49%] Building CXX object features/CMakeFiles/features.dir/src/matching.cc.o
[ 50%] Linking CXX static library libfeatures.a
[ 50%] Built target features
make[2]: *** [bundle/CMakeFiles/bundle.dir/build.make:66: bundle/CMakeFiles/bundle.dir/src/bundle_adjuster.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:586: bundle/CMakeFiles/bundle.dir/all] Error 2
make: *** [Makefile:98: all] Error 2
Traceback (most recent call last):
File "setup.py", line 47, in <module>
build_c_extension()
File "setup.py", line 43, in build_c_extension
subprocess.check_call(["make", "-j4"], cwd="cmake_build")
File "/home/taylor/miniconda3/lib/python3.7/subprocess.py", line 363, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make', '-j4']' returned non-zero exit status 2.