From owner-freebsd-hackers@freebsd.org Wed Jun 15 01:36:55 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 73318B72536 for ; Wed, 15 Jun 2016 01:36:55 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: from mail-qg0-x233.google.com (mail-qg0-x233.google.com [IPv6:2607:f8b0:400d:c04::233]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 37FE82838 for ; Wed, 15 Jun 2016 01:36:54 +0000 (UTC) (envelope-from otacilio.neto@bsd.com.br) Received: by mail-qg0-x233.google.com with SMTP id k6so4380264qgk.1 for ; Tue, 14 Jun 2016 18:36:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsd.com.br; s=capeta; h=subject:to:references:from:message-id:date:user-agent:mime-version :in-reply-to:content-transfer-encoding; bh=U/AE/Dt+9TUOqNJMuykbc6Gt5RyIlfQqf04Rq3WaAjM=; b=I8xrFoVBDM68Ye79sv8c+0AFpDe+u9SdJ49JMrx9/iU5fghXrFyZl3ZVuLD/hoelPh XAqJpjt4Tv6s42c731Fq60+VFfO9LvKuY9TYoy03bmC9py4myE2tROF01JCLFntSei5v MqtBzFSOr2zi4BHnOzIatbFFbHu+qhESBd+sk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-transfer-encoding; bh=U/AE/Dt+9TUOqNJMuykbc6Gt5RyIlfQqf04Rq3WaAjM=; b=DDWyCjL+q/4ql5W4TAwdld/hpwwvgoHzodAn/xqgRM+kpAnDCw/itPl5+8V0Nl/r1K PZoDSrrP4Wpgta5oK44P8RqWL10Jfvj0GATKnSgFlpWwaXxORKz57yY8LtfHcpL7pNZP +6MOXzszYvs7LfvgSkGBB+TQQjxahd+7nyZG6udMp6FJIQ/GnyOVnTLGnBBXnXxwpD9n Q1D5FZRHX5IAzV32GjEG1RsF8O5kbO9PlCRw44cJW4HMhK81EvBarwJBxP5ZXPpJ1Zld +7be0taYp3N99rH+22jd4Q+tX/Yh0XsdUG+uJY/ydTmCcrgP4CMSuTqOzs3cyy7hWDtt d3Gw== X-Gm-Message-State: ALyK8tIDUZnRYG4xbVCRW7f96jrSw/916kaOVB8z7FbgvRzlacUXYdH6dnHnIKNwbobodA== X-Received: by 10.140.19.97 with SMTP id 88mr22307028qgg.55.1465954613742; Tue, 14 Jun 2016 18:36:53 -0700 (PDT) Received: from [192.168.0.18] ([187.60.94.34]) by smtp.googlemail.com with ESMTPSA id f94sm8920849qtb.18.2016.06.14.18.36.52 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 14 Jun 2016 18:36:53 -0700 (PDT) Subject: Re: /usr/include/c++/v1/map:837:5: error: static_assert failed "Allocator::value_type must be same type as value_type" To: ADAM David Alan Martin , freebsd-hackers@freebsd.org References: <57603DF3.5000400@gmail.com> From: =?UTF-8?B?T3RhY8OtbGlv?= Message-ID: <58aaad08-3cc9-6e57-1c14-01c833958ba5@bsd.com.br> Date: Tue, 14 Jun 2016 22:36:39 -0300 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:45.0) Gecko/20100101 Thunderbird/45.1.1 MIME-Version: 1.0 In-Reply-To: <57603DF3.5000400@gmail.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 15 Jun 2016 01:36:55 -0000 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> 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::value), ^ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ /usr/ports/graphics/orbslam2/work/ORB_SLAM2-132d92f/src/LoopClosing.cc:436:21: note: in instantiation of template class 'std::__1::map, Eigen::aligned_allocator > >' 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, Eigen::aligned_allocator > >') 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)