Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make Error 20.04 #27

Open
pauldeee opened this issue Jun 17, 2022 · 1 comment
Open

Make Error 20.04 #27

pauldeee opened this issue Jun 17, 2022 · 1 comment

Comments

@pauldeee
Copy link

Hi all,

cmake info:

-- The CXX compiler identification is GNU 9.4.0
-- Check for working CXX compiler: /usr/bin/c++
-- Check for working CXX compiler: /usr/bin/c++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Search Dependency: Eigen3
-- Found Eigen3: /usr/include/eigen3 (Required is at least version "2.91.0") 
-- Search Dependency: Sophus
-- Search Dependency: Cholmod
-- Found CHOLMOD: /usr/include/suitesparse  
-- Search Dependency: SPQR
-- Found SPQR: /usr/include/suitesparse  
-- Build module: core
-- Build module: linear
-- Build module: nonlinear
-- Build module: utils
-- Build module: geometry
-- Build module: slam
-- Build module: linear/cholmod
-- Build module: linear/spqr
-- Library: build shared library
-- Install 3rd-party module: eigen3
-- Add all unit tests, exclude:  ;testCUDASolver
-- Add all C++ examples, exclude:  
-- git submodule update: pybind11
-- Found PythonInterp: /usr/bin/python3.8 (found version "3.8.10") 
-- Found PythonLibs: /usr/lib/x86_64-linux-gnu/libpython3.8.so
-- Performing Test HAS_CPP14_FLAG
-- Performing Test HAS_CPP14_FLAG - Success
-- pybind11 v2.3.dev1
-- ===============================================================
--                 Configurations for miniSAM                     
--  
--   Library type                Shared
--   Install path                /usr/local
--  
--   Compiler type               GNU
--   Compiler version            9.4.0
--   Built type                  Release
--   C++ compilation flags        -std=c++11 -Wall -Werror -Wextra -O3 -DNDEBUG
--  
--   Multi-threading             No
--   Internal profiling          No
--  
--   Eigen                       3.3.7 (/usr/include/eigen3)
--   Sophus                      Yes (/usr/local/share/sophus/cmake)
--   Cholmod                     Yes (/usr/include/suitesparse)
--   SPQR                        Yes (/usr/include/suitesparse)
--   CUDA cuSOLVER               No
--  
--   Python package              Yes
--   Python version              3.8
--   Python executable           /usr/bin/python3.8
--  
-- Configuring done
-- Generating done

Attempting to build this on Ubuntu 20.04 I end up with this error:

[  1%] Building CXX object minisam/CMakeFiles/minisam.dir/nonlinear/DoglegOptimizer.cpp.o
/home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp: In member function ‘minisam::NonlinearOptimizationStatus minisam::DoglegOptimizer::tryRadius_(const minisam::FactorGraph&, minisam::Variables&, const VectorXd&, const VectorXd&, double, double)’:
/home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp:140:75: error: implicitly-declared ‘minisam::Variables& minisam::Variables::operator=(const minisam::Variables&)’ is deprecated [-Werror=deprecated-copy]
  140 |       values_update = values.retract(dx_dl, h_sparsity_cache_.var_ordering);
      |                                                                           ^
In file included from /home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp:11:
/home/paul/libs/minisam/minisam/core/Variables.h:33:3: note: because ‘minisam::Variables’ has user-provided ‘minisam::Variables::Variables(const minisam::Variables&)’
   33 |   Variables(const Variables& variables);
      |   ^~~~~~~~~
/home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp:142:75: error: implicitly-declared ‘minisam::Variables& minisam::Variables::operator=(const minisam::Variables&)’ is deprecated [-Werror=deprecated-copy]
  142 |       values_update = values.retract(dx_dl, j_sparsity_cache_.var_ordering);
      |                                                                           ^
In file included from /home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp:11:
/home/paul/libs/minisam/minisam/core/Variables.h:33:3: note: because ‘minisam::Variables’ has user-provided ‘minisam::Variables::Variables(const minisam::Variables&)’
   33 |   Variables(const Variables& variables);
      |   ^~~~~~~~~
/home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp:208:16: error: implicitly-declared ‘minisam::Variables& minisam::Variables::operator=(const minisam::Variables&)’ is deprecated [-Werror=deprecated-copy]
  208 |       values = values_update;
      |                ^~~~~~~~~~~~~
In file included from /home/paul/libs/minisam/minisam/nonlinear/DoglegOptimizer.cpp:11:
/home/paul/libs/minisam/minisam/core/Variables.h:33:3: note: because ‘minisam::Variables’ has user-provided ‘minisam::Variables::Variables(const minisam::Variables&)’
   33 |   Variables(const Variables& variables);
      |   ^~~~~~~~~
cc1plus: all warnings being treated as errors
make[2]: *** [minisam/CMakeFiles/minisam.dir/build.make:232: minisam/CMakeFiles/minisam.dir/nonlinear/DoglegOptimizer.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:234: minisam/CMakeFiles/minisam.dir/all] Error 2
make: *** [Makefile:141: all] Error 2

Any ideas for how to resolve this?

@oysteikh
Copy link

Try removing the -Werror flag from line 63 in CMakeLists.txt. Had the same issue and this resolved it for me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants