[ndnSIM] ndnSIM debugging

Alex Afanasyev alexander.afanasyev at ucla.edu
Wed Apr 10 14:01:22 PDT 2013

Hi Milad,

That was one interesting problem that appeared only using 4.7 compiler.  I have pushed a fix that solved the problem in the same environment that you have (OSX 10.8, g++ 4.7.2), so if you pull, you should be able to run the simulation.  

The fix is not 100% compliant with the old C++ standard (using extern template), but there should not be a problem with gcc that supported this syntax for a long time, and I also tested with clang compiler and it worked. 

If anybody is using another compiler, can you please test that the compilation is working?  Thanks.


I cannot fully recommend using macport's version of gcc compiler (I'm assuming you're using it).  It seem to work now, but I was having strange error messages related to incompatibility of libstdc++ in the past.   Personally, I prefer using clang (clang++), which comes with OSX's xcode:

# configure for debug mode with tests and examples

CC=clang CXX=clang++ CXXFLAGS="-g -O0 -Wall -Qunused-arguments -Wno-unused-variable -Wno-unneeded-internal-declaration -Wno-unused-private-field" ./waf configure --enable-tests --enable-examples

# configure for optimized mode without tests or examples

CC=clang CXX=clang++ CXXFLAGS="-g -O3 -Wall -Qunused-arguments -Wno-unused-variable -Wno-unneeded-internal-declaration -Wno-unused-private-field" ./waf configure -d optimized

On Apr 10, 2013, at 12:44 PM, Milad Mahdian <mahdian.m at husky.neu.edu> wrote:

> Hi Alex,
> I re-installed ns-3 and ndnSIM and after running the simple-ndn I get the following:
> Waf: Entering directory `/Users/miladmahdian/repos/ns-3-allinone/ns-3.16/ndnSIM/ns-3/build'
> Waf: Leaving directory `/Users/miladmahdian/repos/ns-3-allinone/ns-3.16/ndnSIM/ns-3/build'
> 'build' finished successfully (2.165s)
> msg="Log component "ndn.fw.BestRoute.PerOutFaceLimits" has already been registered once.", file=../src/core/model/log.cc, line=99
> terminate called without an active exception
> Command ['/Users/miladmahdian/repos/ns-3-allinone/ns-3.16/ndnSIM/ns-3/build/src/ndnSIM/examples/ns3-dev-ndn-grid-debug'] terminated with signal SIGIOT. Run it under a debugger to get more information (./waf --run <program> --command-template="gdb --args %s <args>").
> can you help me solve this problem?
> Regards,
> Milad Mahdian
> _______________________________________________
> 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