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 -j8 error #90

Open
charchemist opened this issue Dec 24, 2021 · 2 comments
Open

make -j8 error #90

charchemist opened this issue Dec 24, 2021 · 2 comments

Comments

@charchemist
Copy link

I have noticed there has been the same error that appeared in orb-slam2 compiling, I wonder if there are some relationships between them. Can anybody solve this problem? thx

[ 60%] Building CXX object okvis_ceres/CMakeFiles/okvis_ceres.dir/src/Estimator.cpp.o
In file included from /usr/include/c++/9/map:61,
from /home/jcy/下载/okvis-master/build/include/ceres/ordered_groups.h:34,
from /home/jcy/下载/okvis-master/build/include/ceres/ceres.h:54,
from /home/jcy/下载/okvis-master/okvis_ceres/include/okvis/Estimator.hpp:48,
from /home/jcy/下载/okvis-master/okvis_ceres/src/Estimator.cpp:42:
/usr/include/c++/9/bits/stl_map.h: In instantiation of ‘class std::map<long unsigned int, okvis::MapPoint, std::less, Eigen::aligned_allocatorokvis::MapPoint >’:
/home/jcy/下载/okvis-master/okvis_ceres/include/okvis/Estimator.hpp:563:19: required from here
/usr/include/c++/9/bits/stl_map.h:122:71: _error: static assertion failed: std::map must have the same value_type as its allocator
122 | static_assert(is_same<typename _Alloc::value_type, value_type>::value,
| ^~~~~
_
make[2]: *** [okvis_ceres/CMakeFiles/okvis_ceres.dir/build.make:232:okvis_ceres/CMakeFiles/okvis_ceres.dir/src/Estimator.cpp.o] 错误 1
make[1]: *** [CMakeFiles/Makefile2:559:okvis_ceres/CMakeFiles/okvis_ceres.dir/all] 错误 2
make: *** [Makefile:130:all] 错误 2

@Avi241
Copy link

Avi241 commented Feb 5, 2022

Please try it with g++-6.
https://linuxconfig.org/how-to-switch-between-multiple-gcc-and-g-compiler-versions-on-ubuntu-20-04-lts-focal-fossa for configuration of g++

@EmilioOlivastri
Copy link

You can also solve this changing the typedef definition in the "FrameTypedefs.hpp" file in line 173 from :

  • typedef std::map<uint64_t, MapPoint, std::less<uint64_t>, Eigen::aligned_allocator > PointMap;
    to
  • typedef std::map<uint64_t, MapPoint, std::less<uint64_t>, Eigen::aligned_allocator<std::pair<uint64_t const, MapPoint>> > PointMap;

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

3 participants