Date: Tue, 14 Jun 2016 22:36:39 -0300 From: =?UTF-8?B?T3RhY8OtbGlv?= <otacilio.neto@bsd.com.br> To: ADAM David Alan Martin <adamartin@freebsd.org>, freebsd-hackers@freebsd.org Subject: Re: /usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type" Message-ID: <58aaad08-3cc9-6e57-1c14-01c833958ba5@bsd.com.br> In-Reply-To: <57603DF3.5000400@gmail.com> References: <e4c2cba6-7643-9032-8304-b2fce04c32b6@bsd.com.br> <57603DF3.5000400@gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Em 14/06/2016 14:25, ADAM David Alan Martin escreveu: > Hi, > > > On 06/14/16 00:05, Otacílio wrote: >> I'm getting this error when I try compile the ORB-SLAM2 library. Some >> one can give me a hint about it? >> >> >> /usr/include/c++/v1/map:837:5: error: static_assert failed >> "Allocator::value_type must be same type as value_type" >> static_assert((is_same<typename allocator_type::value_type, >> value_type>::value), > It sounds like the code is using an STL allocator in a way which worked > prior to C++11/14 changes to allocators. Could you post more of the > compiler output? Is this a port in the ports tree? If not, could you > point me at the source of ORB-SLAM2? > >> Thanks a lot. >> >> -Otacílio > Regards, > Dear I have created some ports to compile orbslam2 to FreeBSD. They are not finished until now, but so many work is done and can be very help to someone that wants compile orbslam2 on FreeBSD. I did this ports: graphics/DBoW2 graphics/DLib graphics/Pangolin graphics/libQGLViewer graphics/orbslam2 math/g2o It is necessary that OpenCV be compiled with NONFREE enabled. And I have applied a patch to math/openblas/Makefile. I can send to you this ports if you can help me to solve this problem. I don't have expertise so solve this alone. Bellow is the error message: []'S -Otacílio In file included from /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/src/LoopClosing.cc:21: In file included from /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/include/LoopClosing.h:24: In file included from /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/include/KeyFrame.h:24: In file included from /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/include/MapPoint.h:25: In file included from /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/include/Frame.h:27: In file included from /usr/local/include/DBoW2/BowVector.h:14: /usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type" static_assert((is_same<typename allocator_type::value_type, value_type>::value), ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/src/LoopClosing.cc:436:21: note: in instantiation of template class 'std::__1::map<ORB_SLAM2::KeyFrame *, g2o::Sim3, std::__1::less<ORB_SLAM2::KeyFrame *>, Eigen::aligned_allocator<std::__1::pair<const ORB_SLAM2::KeyFrame *, g2o::Sim3> > >' requested here KeyFrameAndPose CorrectedSim3, NonCorrectedSim3; ^ /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/src/LoopClosing.cc:466:29: error: no viable overloaded operator[] for type 'KeyFrameAndPose' (aka 'map<ORB_SLAM2::KeyFrame *, g2o::Sim3, std::less<KeyFrame *>, Eigen::aligned_allocator<std::pair<const KeyFrame *, g2o::Sim3> > >') NonCorrectedSim3[pKFi]=g2oSiw; ~~~~~~~~~~~~~~~~^~~~~ /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/src/LoopClosing.cc:470:39: error: use of undeclared identifier 'mit'; did you mean 'min'? for(KeyFrameAndPose::iterator mit=CorrectedSim3.begin(), mend=CorrectedSim3.end(); mit!=mend; mit++) ^~~ min /usr/include/c++/v1/algorithm:2562:1: note: 'min' declared here min(const _Tp& __a, const _Tp& __b, _Compare __comp)
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?58aaad08-3cc9-6e57-1c14-01c833958ba5>