[ndnSIM] ndnSIM Digest, Vol 24, Issue 6

Alex Afanasyev alexander.afanasyev at UCLA.EDU
Wed Nov 26 15:39:22 PST 2014



> On Nov 26, 2014, at 2:36 PM, ioannoa <ioannoa at scss.tcd.ie> wrote:
> 
> Hello all,
> 
> I am trying to implement a forwarding protocol but I fell into a few compilation errors, i.e.
> 
> Waf: Entering directory `/home/ioannoa/ndnSIM/ndnSIM-sample-topologies/build'
> [1/2] cxx: scenarios/ndn-annotated-topo-normal.cc -> build/scenarios/ndn-annotated-topo-normal.cc.2.o
> [2/2] cxxprogram: build/scenarios/ndn-annotated-topo-normal.cc.2.o -> build/ndn-annotated-topo-normal
> scenarios/ndn-annotated-topo-normal.cc.2.o: In function `main':
> 
> /home/ioannoa/ndnSIM/ndnSIM-sample-topologies/build/../scenarios/ndn-annotated-topo-normal.cc:97: undefined reference to `ns3::ndn::StackHelper::SetTFib(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
> /home/ioannoa/ndnSIM/ndnSIM-sample-topologies/build/../scenarios/ndn-annotated-topo-normal.cc:98: undefined reference to `ns3::ndn::StackHelper::SetConx(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)'
> collect2: ld returned 1 exit status
> 
> 
> In my simulation file I include the below:
> 
> #include "ns3/ndnSIM/model/fib/ndn-tfib.h"
> #include "ns3/ndnSIM/model/conx/ndn-conx.h"
> 
> where conx is a new folder containing the ndn-conx.h and ndn-conx.cc files. Furthemore, in my StackHelper (.h & .cc) files I have included both headers and defined the corresponding functions for the installation on a node similar to pit, fib etc. Could, please someone point me out what my error may be? My simulation runs fine on my laptop (MAC OS X 10.8) but fails when I try it on Ubuntu 12.04.

Is your ndn-conx.cc file included in ndnSIM's wscript file?  I cannot think of anything else.

Also, double check that you have compiled and installed NS-3 in debug mode and your scenario is configured in debug mode.  Otherwise, you may not be linking to the libraries you think you're linking.


> Also, I get some mistakes if I do not disable python.
> 
> src/ndnSIM/bindings/ns3module.cc: In function ‘int _wrap_PyNs3NdnPitEntry__tp_init__1(PyNs3NdnPitEntry*, PyObject*, PyObject*, PyObject**)’:
> src/ndnSIM/bindings/ns3module.cc:3320:171: error: no matching function for call to ‘ns3::ndn::pit::Entry::Entry(ns3::ndn::Pit&, ns3::Ptr<ns3::ndn::Interest>, ns3::Ptr<ns3::ndn::fib::Entry>)’
> src/ndnSIM/bindings/ns3module.cc:3320:171: note: candidates are:
> ./ns3/ndn-pit-entry.h:73:5: note: ns3::ndn::pit::Entry::Entry(ns3::ndn::Pit&, ns3::Ptr<const ns3::ndn::Interest>, ns3::Ptr<ns3::ndn::tfib::Entry>, bool)
> ./ns3/ndn-pit-entry.h:73:5: note:   candidate expects 4 arguments, 3 provided
> ./ns3/ndn-pit-entry.h:63:3: note: ns3::ndn::pit::Entry::Entry(ns3::ndn::Pit&, ns3::Ptr<const ns3::ndn::Interest>, ns3::Ptr<ns3::ndn::fib::Entry>, bool)
> ./ns3/ndn-pit-entry.h:63:3: note:   candidate expects 4 arguments, 3 provided
> ./ns3/ndn-pit-entry.h:44:7: note: ns3::ndn::pit::Entry::Entry(const ns3::ndn::pit::Entry&)
> ./ns3/ndn-pit-entry.h:44:7: note:   candidate expects 1 argument, 3 provided
> Waf: Leaving directory `/home/ioannoa/ndnSIM/ns-3/build'
> 
> 
> The reason is that I have inserted a new bool field in a pitEntry that specifies whether my entry corresponds to a fib entry or to a tfib entry, (i.e. tfib table holds temporal entries for forwarding).Is modulegen__gcc_LP64.py the corresponding python file that I should change in order to make this work as well?

If this is the only change, then you can simply modify `modulegen__gcc_LP64.py` file.  You need to find the function and update its signature.

If there are more changes, then it is more complicated and error prone: you would need to rescan python bindings with  ./waf --apiscan=ndnSIM.

> 
> Many thanks,
> Andriana.
> _______________________________________________
> ndnSIM mailing list
> ndnSIM at lists.cs.ucla.edu
> http://www.lists.cs.ucla.edu/mailman/listinfo/ndnsim





More information about the ndnSIM mailing list