Project

General

Profile

Actions

Bug #2382

closed

Build error in helper/ndn-global-routing-helper.cpp

Added by Junxiao Shi almost 10 years ago. Updated almost 10 years ago.

Status:
Closed
Priority:
Urgent
Assignee:
-
Category:
heper
Target version:
Start date:
01/14/2015
Due date:
% Done:

0%

Estimated time:

Description

Platform: Ubuntu 12.04 64-bit with Boost 1.48

ndn-cxx version: a90ba482597d899fe638993f257ec83e4eca4524

ns-3 version: fc42a8acb9d3763dd89ea826dafdeaabb2f21963

ndnSIM version: ab933c620a929135eb261fd36201cb0f1dd7c401

configure command: ./waf configure --disable-python --enable-tests --enable-examples

[1233/2532] cxx: src/ndnSIM/helper/ndn-link-control-helper.cpp -> build/src/ndnSIM/helper/ndn-link-control-helper.cpp.1.o
../src/ndnSIM/helper/ndn-global-routing-helper.cpp: In static member function ‘static void ns3::ndn::GlobalRoutingHelper::CalculateRoutes(bool)’:
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:257:18: error: ‘<::’ cannot begin a template-argument list [-fpermissive]
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:257:18: note: ‘<:’ is an alternate spelling for ‘[’. Insert whitespace between ‘<’ and ‘::’
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:257:18: note: (if you use ‘-fpermissive’ G++ will accept your code)
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:263:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/ndnSIM/helper/ndn-global-routing-helper.cpp: In static member function ‘static void ns3::ndn::GlobalRoutingHelper::CalculateAllPossibleRoutes(bool)’:
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:322:18: error: ‘<::’ cannot begin a template-argument list [-fpermissive]
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:322:18: note: ‘<:’ is an alternate spelling for ‘[’. Insert whitespace between ‘<’ and ‘::’
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:328:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:393:99: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
In file included from /usr/include/c++/4.6/functional:56:0,
                 from /usr/local/include/ndn-cxx/common.hpp:55,
                 from /usr/local/include/ndn-cxx/interest.hpp:27,
                 from ./ns3/ndnSIM/model/ndn-common.hpp:28,
                 from ../src/ndnSIM/helper/ndn-global-routing-helper.hpp:23,
                 from ../src/ndnSIM/helper/ndn-global-routing-helper.cpp:26:
/usr/include/c++/4.6/tuple: In constructor ‘std::_Head_base<_Idx, _Head, false>::_Head_base(_UHead&&) [with _UHead = int, long unsigned int _Idx = 0ul, _Head = std::shared_ptr<nfd::Face>]’:
/usr/include/c++/4.6/tuple:168:38:   instantiated from ‘std::_Tuple_impl<_Idx, _Head, _Tail ...>::_Tuple_impl(_UHead&&, _UTail&& ...) [with _UHead = int, _UTail = {int, double}, long unsigned int _Idx = 0ul, _Head = std::shared_ptr<nfd::Face>, _Tail = {short unsigned int, double}]’
/usr/include/c++/4.6/tuple:247:54:   instantiated from ‘std::tuple< <template-parameter-1-1> >::tuple(_UElements&& ...) [with _UElements = {int, int, double}, <template-parameter-2-2> = void, _Elements = {std::shared_ptr<nfd::Face>, short unsigned int, double}]’
../src/ndnSIM/helper/boost-graph-ndn-global-routing-helper.hpp:185:68:   instantiated from here
/usr/include/c++/4.6/tuple:101:42: error: no matching function for call to ‘std::shared_ptr<nfd::Face>::shared_ptr(int)’
/usr/include/c++/4.6/tuple:101:42: note: candidates are:
/usr/include/c++/4.6/bits/shared_ptr.h:315:2: note: template<class _Alloc, class ... _Args> std::shared_ptr::shared_ptr(std::_Sp_make_shared_tag, const _Alloc&, _Args&& ...)
/usr/include/c++/4.6/bits/shared_ptr.h:266:17: note: constexpr std::shared_ptr<_Tp>::shared_ptr(std::nullptr_t) [with _Tp = nfd::Face, std::nullptr_t = std::nullptr_t]
/usr/include/c++/4.6/bits/shared_ptr.h:266:17: note:   no known conversion for argument 1 from ‘int’ to ‘std::nullptr_t’
/usr/include/c++/4.6/bits/shared_ptr.h:258:2: note: template<class _Tp1, class _Del> std::shared_ptr::shared_ptr(std::unique_ptr<_Up, _Ep>&&)
/usr/include/c++/4.6/bits/shared_ptr.h:253:2: note: template<class _Tp1> std::shared_ptr::shared_ptr(std::auto_ptr<_Tp1>&&)
/usr/include/c++/4.6/bits/shared_ptr.h:248:11: note: template<class _Tp1> std::shared_ptr::shared_ptr(const std::weak_ptr<_Tp1>&)
/usr/include/c++/4.6/bits/shared_ptr.h:236:2: note: template<class _Tp1, class> std::shared_ptr::shared_ptr(std::shared_ptr<_Tp1>&&)
/usr/include/c++/4.6/bits/shared_ptr.h:226:7: note: std::shared_ptr<_Tp>::shared_ptr(std::shared_ptr<_Tp>&&) [with _Tp = nfd::Face, std::shared_ptr<_Tp> = std::shared_ptr<nfd::Face>]
/usr/include/c++/4.6/bits/shared_ptr.h:226:7: note:   no known conversion for argument 1 from ‘int’ to ‘std::shared_ptr<nfd::Face>&&’
/usr/include/c++/4.6/bits/shared_ptr.h:218:2: note: template<class _Tp1, class> std::shared_ptr::shared_ptr(const std::shared_ptr<_Tp1>&)
/usr/include/c++/4.6/bits/shared_ptr.h:206:2: note: template<class _Tp1> std::shared_ptr::shared_ptr(const std::shared_ptr<_Tp1>&, _Tp*)
/usr/include/c++/4.6/bits/shared_ptr.h:184:2: note: template<class _Deleter, class _Alloc> std::shared_ptr::shared_ptr(std::nullptr_t, _Deleter, _Alloc)
/usr/include/c++/4.6/bits/shared_ptr.h:165:2: note: template<class _Tp1, class _Deleter, class _Alloc> std::shared_ptr::shared_ptr(_Tp1*, _Deleter, _Alloc)
/usr/include/c++/4.6/bits/shared_ptr.h:146:2: note: template<class _Deleter> std::shared_ptr::shared_ptr(std::nullptr_t, _Deleter)
/usr/include/c++/4.6/bits/shared_ptr.h:129:2: note: template<class _Tp1, class _Deleter> std::shared_ptr::shared_ptr(_Tp1*, _Deleter)
/usr/include/c++/4.6/bits/shared_ptr.h:112:11: note: template<class _Tp1> std::shared_ptr::shared_ptr(_Tp1*)
/usr/include/c++/4.6/bits/shared_ptr.h:103:7: note: std::shared_ptr<_Tp>::shared_ptr(const std::shared_ptr<_Tp>&) [with _Tp = nfd::Face, std::shared_ptr<_Tp> = std::shared_ptr<nfd::Face>]
/usr/include/c++/4.6/bits/shared_ptr.h:103:7: note:   no known conversion for argument 1 from ‘int’ to ‘const std::shared_ptr<nfd::Face>&’
/usr/include/c++/4.6/bits/shared_ptr.h:100:17: note: constexpr std::shared_ptr<_Tp>::shared_ptr() [with _Tp = nfd::Face]
/usr/include/c++/4.6/bits/shared_ptr.h:100:17: note:   candidate expects 0 arguments, 1 provided
In file included from ./ns3/simple-ref-count.h:29:0,
                 from ./ns3/attribute.h:26,
                 from ./ns3/nstime.h:24,
                 from ./ns3/ndnSIM/model/ndn-common.hpp:23,
                 from ../src/ndnSIM/helper/ndn-global-routing-helper.hpp:23,
                 from ../src/ndnSIM/helper/ndn-global-routing-helper.cpp:26:
/usr/include/c++/4.6/limits: In static member function ‘static constexpr _Tp std::numeric_limits<_Tp>::max() [with _Tp = std::tuple<std::shared_ptr<nfd::Face>, unsigned int, double>]’:
/usr/include/boost/graph/dijkstra_shortest_paths.hpp:424:59:   instantiated from ‘void boost::detail::dijkstra_dispatch2(const VertexListGraph&, typename boost::graph_traits<VertexListGraph>::vertex_descriptor, DistanceMap, WeightMap, IndexMap, const Params&) [with VertexListGraph = boost::NdnGlobalRouterGraph, DistanceMap = boost::reference_wrapper<boost::DistancesMap>, WeightMap = boost::EdgeWeights, IndexMap = boost::VertexIds, Params = boost::bgl_named_params<boost::WeightCombine, boost::distance_combine_t, boost::bgl_named_params<boost::WeightCompare, boost::distance_compare_t, boost::bgl_named_params<std::tuple<std::shared_ptr<nfd::Face>, short unsigned int, double>, boost::distance_zero_t, boost::bgl_named_params<std::tuple<std::shared_ptr<nfd::Face>, short unsigned int, double>, boost::distance_inf_t, boost::bgl_named_params<boost::reference_wrapper<boost::DistancesMap>, boost::vertex_distance_t, boost::no_property> > > > >, typename boost::graph_traits<VertexListGraph>::vertex_descriptor = ns3::Ptr<ns3::ndn::GlobalRouter>]’
/usr/include/boost/graph/dijkstra_shortest_paths.hpp:457:7:   instantiated from ‘void boost::detail::dijkstra_dispatch1(const VertexListGraph&, typename boost::graph_traits<VertexListGraph>::vertex_descriptor, DistanceMap, WeightMap, IndexMap, const Params&) [with VertexListGraph = boost::NdnGlobalRouterGraph, DistanceMap = boost::reference_wrapper<boost::DistancesMap>, WeightMap = boost::EdgeWeights, IndexMap = boost::VertexIds, Params = boost::bgl_named_params<boost::WeightCombine, boost::distance_combine_t, boost::bgl_named_params<boost::WeightCompare, boost::distance_compare_t, boost::bgl_named_params<std::tuple<std::shared_ptr<nfd::Face>, short unsigned int, double>, boost::distance_zero_t, boost::bgl_named_params<std::tuple<std::shared_ptr<nfd::Face>, short unsigned int, double>, boost::distance_inf_t, boost::bgl_named_params<boost::reference_wrapper<boost::DistancesMap>, boost::vertex_distance_t, boost::no_property> > > > >, typename boost::graph_traits<VertexListGraph>::vertex_descriptor = ns3::Ptr<ns3::ndn::GlobalRouter>]’
/usr/include/boost/graph/dijkstra_shortest_paths.hpp:475:5:   instantiated from ‘void boost::dijkstra_shortest_paths(const VertexListGraph&, typename boost::graph_traits<IncidenceGraph>::vertex_descriptor, const boost::bgl_named_params<P, T, R>&) [with VertexListGraph = boost::NdnGlobalRouterGraph, Param = boost::WeightCombine, Tag = boost::distance_combine_t, Rest = boost::bgl_named_params<boost::WeightCompare, boost::distance_compare_t, boost::bgl_named_params<std::tuple<std::shared_ptr<nfd::Face>, short unsigned int, double>, boost::distance_zero_t, boost::bgl_named_params<std::tuple<std::shared_ptr<nfd::Face>, short unsigned int, double>, boost::distance_inf_t, boost::bgl_named_params<boost::reference_wrapper<boost::DistancesMap>, boost::vertex_distance_t, boost::no_property> > > >, typename boost::graph_traits<IncidenceGraph>::vertex_descriptor = ns3::Ptr<ns3::ndn::GlobalRouter>]’
../src/ndnSIM/helper/ndn-global-routing-helper.cpp:249:72:   instantiated from here
/usr/include/c++/4.6/limits:313:48: error: no matching function for call to ‘std::tuple<std::shared_ptr<nfd::Face>, unsigned int, double>::tuple(int)’
/usr/include/c++/4.6/limits:313:48: note: candidates are:
/usr/include/c++/4.6/tuple:264:9: note: template<class ... _UElements, class> std::tuple::tuple(std::tuple<_Args1 ...>&&)
/usr/include/c++/4.6/tuple:257:9: note: template<class ... _UElements, class> std::tuple::tuple(const std::tuple<_Args1 ...>&)
/usr/include/c++/4.6/tuple:251:7: note: std::tuple< <template-parameter-1-1> >::tuple(std::tuple< <template-parameter-1-1> >&&) [with _Elements = {std::shared_ptr<nfd::Face>, unsigned int, double}, std::tuple< <template-parameter-1-1> > = std::tuple<std::shared_ptr<nfd::Face>, unsigned int, double>]
/usr/include/c++/4.6/tuple:251:7: note:   no known conversion for argument 1 from ‘int’ to ‘std::tuple<std::shared_ptr<nfd::Face>, unsigned int, double>&&’
/usr/include/c++/4.6/tuple:249:17: note: constexpr std::tuple< <template-parameter-1-1> >::tuple(const std::tuple< <template-parameter-1-1> >&) [with _Elements = {std::shared_ptr<nfd::Face>, unsigned int, double}, std::tuple< <template-parameter-1-1> > = std::tuple<std::shared_ptr<nfd::Face>, unsigned int, double>]
/usr/include/c++/4.6/tuple:249:17: note:   no known conversion for argument 1 from ‘int’ to ‘const std::tuple<std::shared_ptr<nfd::Face>, unsigned int, double>&’
/usr/include/c++/4.6/tuple:246:9: note: template<class ... _UElements, class> std::tuple::tuple(_UElements&& ...)
/usr/include/c++/4.6/tuple:239:17: note: constexpr std::tuple< <template-parameter-1-1> >::tuple(const _Elements& ...) [with _Elements = {std::shared_ptr<nfd::Face>, unsigned int, double}]
/usr/include/c++/4.6/tuple:239:17: note:   candidate expects 3 arguments, 1 provided
/usr/include/c++/4.6/tuple:235:17: note: constexpr std::tuple< <template-parameter-1-1> >::tuple() [with _Elements = {std::shared_ptr<nfd::Face>, unsigned int, double}]
/usr/include/c++/4.6/tuple:235:17: note:   candidate expects 0 arguments, 1 provided
 -> task in 'ns3-ndnSIM' failed (exit status 1): 
    {task 48026640: cxx ndn-global-routing-helper.cpp -> ndn-global-routing-helper.cpp.1.o}
['/usr/bin/g++', '-std=c++0x', '-O0', '-ggdb', '-g3', '-Wall', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-fPIC', '-pthread', '-Isrc/ndnSIM', '-I../src/ndnSIM', '-Isrc/ndnSIM/NFD', '-I../src/ndnSIM/NFD', '-Isrc/ndnSIM/NFD/daemon', '-I../src/ndnSIM/NFD/daemon', '-Isrc/ndnSIM/NFD/core', '-I../src/ndnSIM/NFD/core', '-I.', '-I..', '-I/usr/local/include', '-I/usr/include', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_NDN_CXX=1', '-DHAVE_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '../src/ndnSIM/helper/ndn-global-routing-helper.cpp', '-c', '-o', 'src/ndnSIM/helper/ndn-global-routing-helper.cpp.1.o']
Actions #1

Updated by Spyros Mastorakis almost 10 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF