AIBluefisher / DAGSfM

Distributed and Graph-based Structure from Motion. This project includes the official implementation of our Pattern Recognition 2020 paper: Graph-Based Parallel Large Scale Structure from Motion.
https://aibluefisher.github.io/GraphSfM/
BSD 3-Clause "New" or "Revised" License
405 stars 86 forks source link

compile error #40

Closed coconiox2 closed 3 years ago

coconiox2 commented 3 years ago

I followed your instructions to compile DAGSfM,but I run into some errors.My gcc's version is 5.4.0.Could you help me?

                                       ^

/usr/local/include/ceres/internal/parameter_dims.h:101:20: error: ‘std::integer_sequence’ has not been declared T ptr, std::integer_sequence<int, Indices...>) { ^ /usr/local/include/ceres/internal/parameter_dims.h:101:36: error: expected ‘,’ or ‘...’ before ‘<’ token T ptr, std::integer_sequence<int, Indices...>) { ^ /usr/local/include/ceres/internal/parameter_dims.h: In static member function ‘static std::array<T, ceres::internal::ParameterDims<IsDynamic, Ns>::kNumParameterBlocks> ceres::internal::ParameterDims<IsDynamic, Ns>::GetUnpackedParameters(T)’: /usr/local/include/ceres/internal/parameter_dims.h:94:35: error: ‘Parameters’ was not declared in this scope using Offsets = ExclusiveScan; ^ /usr/local/include/ceres/internal/parameter_dims.h:94:45: error: template argument 1 is invalid using Offsets = ExclusiveScan; ^ /usr/local/include/ceres/internal/parameter_dims.h:95:47: error: there are no arguments to ‘Offsets’ that depend on a template parameter, so a declaration of ‘Offsets’ must be available [-fpermissive] return GetUnpackedParameters(ptr, Offsets()); ^ In file included from /usr/local/include/ceres/internal/autodiff.h:152:0, from /usr/local/include/ceres/autodiff_cost_function.h:130, from /usr/local/include/ceres/ceres.h:37, from /home/hadoop/yq/DAGSfM/src/base/camera_models.h:42, from /home/hadoop/yq/DAGSfM/src/base/database_cache.h:43, from /home/hadoop/yq/DAGSfM/src/sfm/incremental_mapper.h:36, from /home/hadoop/yq/DAGSfM/src/controllers/incremental_mapper_controller.h:39, from /home/hadoop/yq/DAGSfM/src/ui/main_window.h:40, from /home/hadoop/yq/DAGSfM/src/ui/automatic_reconstruction_widget.cc:34: /usr/local/include/ceres/internal/variadic_evaluate.h: At global scope: /usr/local/include/ceres/internal/variadic_evaluate.h:53:39: error: ‘std::integer_sequence’ has not been declared std::integer_sequence<int, Indices...>) { ^ /usr/local/include/ceres/internal/variadic_evaluate.h:53:55: error: expected ‘,’ or ‘...’ before ‘<’ token std::integer_sequence<int, Indices...>) { ^ /usr/local/include/ceres/internal/variadic_evaluate.h:66:39: error: ‘std::integer_sequence’ has not been declared std::integer_sequence) { ^ /usr/local/include/ceres/internal/variadic_evaluate.h:66:55: error: expected ‘,’ or ‘...’ before ‘<’ token std::integer_sequence) { ^ /usr/local/include/ceres/internal/variadic_evaluate.h: In function ‘bool ceres::internal::VariadicEvaluateImpl(const Functor&, const T const, T, const void)’: /usr/local/include/ceres/internal/variadic_evaluate.h:77:12: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type std::make_integer_sequence<int, ParameterDims::kNumParameterBlocks>; ^ /usr/local/include/ceres/internal/variadic_evaluate.h:80:66: error: there are no arguments to ‘ParameterBlockIndices’ that depend on a template parameter, so a declaration of ‘ParameterBlockIndices’ must be available [-fpermissive] functor, input, output, IsDynamic(), ParameterBlockIndices()); ^ In file included from /usr/local/include/ceres/autodiff_cost_function.h:130:0, from /usr/local/include/ceres/ceres.h:37, from /home/hadoop/yq/DAGSfM/src/base/camera_models.h:42, from /home/hadoop/yq/DAGSfM/src/base/database_cache.h:43, from /home/hadoop/yq/DAGSfM/src/sfm/incremental_mapper.h:36, from /home/hadoop/yq/DAGSfM/src/controllers/incremental_mapper_controller.h:39, from /home/hadoop/yq/DAGSfM/src/ui/main_window.h:40, from /home/hadoop/yq/DAGSfM/src/ui/automatic_reconstruction_widget.cc:34: /usr/local/include/ceres/internal/autodiff.h: At global scope: /usr/local/include/ceres/internal/autodiff.h:217:34: error: ‘integer_sequence’ is not a member of ‘std’ struct Make1stOrderPerturbations<std::integer_sequence<int, N, Ns...>, ^ /usr/local/include/ceres/internal/autodiff.h:217:34: error: ‘integer_sequence’ is not a member of ‘std’ /usr/local/include/ceres/internal/autodiff.h:217:69: error: template argument 1 is invalid struct Make1stOrderPerturbations<std::integer_sequence<int, N, Ns...>, ^ /usr/local/include/ceres/internal/autodiff.h:232:34: error: ‘integer_sequence’ is not a member of ‘std’ struct Make1stOrderPerturbations<std::integer_sequence, ^ /usr/local/include/ceres/internal/autodiff.h:232:34: error: ‘integer_sequence’ is not a member of ‘std’ /usr/local/include/ceres/internal/autodiff.h:232:59: error: template argument 1 is invalid struct Make1stOrderPerturbations<std::integer_sequence, ^ /usr/local/include/ceres/internal/autodiff.h:282:26: error: ‘integer_sequence’ is not a member of ‘std’ struct Take1stOrderParts<std::integer_sequence<int, N, Ns...>, ^ /usr/local/include/ceres/internal/autodiff.h:282:26: error: ‘integer_sequence’ is not a member of ‘std’ /usr/local/include/ceres/internal/autodiff.h:282:61: error: template argument 1 is invalid struct Take1stOrderParts<std::integer_sequence<int, N, Ns...>, ^ /usr/local/include/ceres/internal/autodiff.h:298:26: error: ‘integer_sequence’ is not a member of ‘std’ struct Take1stOrderParts<std::integer_sequence, ParameterIdx, Offset> { ^ /usr/local/include/ceres/internal/autodiff.h:298:26: error: ‘integer_sequence’ is not a member of ‘std’ /usr/local/include/ceres/internal/autodiff.h:298:51: error: template argument 1 is invalid struct Take1stOrderParts<std::integer_sequence, ParameterIdx, Offset> { ^ In file included from /usr/local/include/ceres/ceres.h:42:0, from /home/hadoop/yq/DAGSfM/src/base/camera_models.h:42, from /home/hadoop/yq/DAGSfM/src/base/database_cache.h:43, from /home/hadoop/yq/DAGSfM/src/sfm/incremental_mapper.h:36, from /home/hadoop/yq/DAGSfM/src/controllers/incremental_mapper_controller.h:39, from /home/hadoop/yq/DAGSfM/src/ui/main_window.h:40, from /home/hadoop/yq/DAGSfM/src/ui/automatic_reconstruction_widget.cc:34: /usr/local/include/ceres/cost_function_to_functor.h:160:29: error: ‘std::integer_sequence’ has not been declared std::integer_sequence<int, Indices...>) { ^ /usr/local/include/ceres/cost_function_to_functor.h:160:45: error: expected ‘,’ or ‘...’ before ‘<’ token std::integer_sequence<int, Indices...>) { ^ /usr/local/include/ceres/cost_function_to_functor.h: In member function ‘bool ceres::CostFunctionToFunctor<kNumResiduals, Ns>::operator()(const T, Ts ...) const’: /usr/local/include/ceres/cost_function_to_functor.h:147:14: error: ‘make_integer_sequence’ in namespace ‘std’ does not name a template type std::make_integer_sequence<int, ParameterDims::kNumParameterBlocks>; ^ /usr/local/include/ceres/cost_function_to_functor.h:149:49: error: there are no arguments to ‘Indices’ that depend on a template parameter, so a declaration of ‘Indices’ must be available [-fpermissive] GetParameterPointers(params, Indices()); ^ In file included from /usr/local/include/ceres/dynamic_numeric_diff_cost_function.h:44:0, from /usr/local/include/ceres/ceres.h:48, from /home/hadoop/yq/DAGSfM/src/base/camera_models.h:42, from /home/hadoop/yq/DAGSfM/src/base/database_cache.h:43, from /home/hadoop/yq/DAGSfM/src/sfm/incremental_mapper.h:36, from /home/hadoop/yq/DAGSfM/src/controllers/incremental_mapper_controller.h:39, from /home/hadoop/yq/DAGSfM/src/ui/main_window.h:40, from /home/hadoop/yq/DAGSfM/src/ui/automatic_reconstruction_widget.cc:34: /usr/local/include/ceres/internal/numeric_diff.h: At global scope: /usr/local/include/ceres/internal/numeric_diff.h:445:43: error: ‘integer_sequence’ is not a member of ‘std’ std::integer_sequence<int, N, Ns...>, ^ /usr/local/include/ceres/internal/numeric_diff.h:445:43: error: ‘integer_sequence’ is not a member of ‘std’ /usr/local/include/ceres/internal/numeric_diff.h:445:78: error: template argument 2 is invalid std::integer_sequence<int, N, Ns...>, ^

coconiox2 commented 3 years ago

I have changed the version of Ceres-solver to 1.14.0.And my Eigen's version is 3.3.7. But I have some other errors as follows.I 'm not sure if it's because I've already installed Colmap.

CMake Warning (dev) at pba_generated_ProgramCU.cu.o.Release.cmake:81: Syntax Warning in cmake code at column 63

Argument not separated from preceding token by whitespace. This warning is for project developers. Use -Wno-dev to suppress it.

[ 2%] Building C object lib/LSD/CMakeFiles/lsd.dir/lsd.c.o CMake Warning (dev) at sift_gpu_generated_ProgramCU.cu.o.Release.cmake:81: Syntax Warning in cmake code at column 63

Argument not separated from preceding token by whitespace. This warning is for project developers. Use -Wno-dev to suppress it.

nvcc fatal : Stray '"' character CMake Error at pba_generated_ProgramCU.cu.o.Release.cmake:222 (message): Error generating /home/hadoop/yq/DAGSfM/build/lib/PBA/CMakeFiles/pba.dir//./pba_generated_ProgramCU.cu.o

lib/PBA/CMakeFiles/pba.dir/build.make:63: recipe for target 'lib/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o' failed make[2]: [lib/PBA/CMakeFiles/pba.dir/pba_generated_ProgramCU.cu.o] Error 1 CMakeFiles/Makefile2:482: recipe for target 'lib/PBA/CMakeFiles/pba.dir/all' failed make[1]: [lib/PBA/CMakeFiles/pba.dir/all] Error 2 make[1]: *** 正在等待未完成的任务.... nvcc fatal : Stray '"' character CMake Error at sift_gpu_generated_ProgramCU.cu.o.Release.cmake:222 (message): Error generating /home/hadoop/yq/DAGSfM/build/lib/SiftGPU/CMakeFiles/sift_gpu.dir//./sift_gpu_generated_ProgramCU.cu.o

lib/SiftGPU/CMakeFiles/sift_gpu.dir/build.make:63: recipe for target 'lib/SiftGPU/CMakeFiles/sift_gpu.dir/sift_gpu_generated_ProgramCU.cu.o' failed make[2]: [lib/SiftGPU/CMakeFiles/sift_gpu.dir/sift_gpu_generated_ProgramCU.cu.o] Error 1 CMakeFiles/Makefile2:570: recipe for target 'lib/SiftGPU/CMakeFiles/sift_gpu.dir/all' failed make[1]: [lib/SiftGPU/CMakeFiles/sift_gpu.dir/all] Error 2 Scanning dependencies of target colmap

coconiox2 commented 3 years ago

I got it. I changed the cmake's version to 3.5.1 and it works.