Build error in ns-3.26

121 views
Skip to first unread message

PRITISH NAHAR

unread,
Aug 26, 2017, 11:59:18 AM8/26/17
to ns-3-users
Hi,
I am a new ns3. I am trying to install ns-3.26 using the tutorial available at nsnam.org. However, I am facing an error when I try to build using ./waf. It has got to do something with the ipv4-flow-classifier.cc file. I would be extremely grateful if someone could help me debug the error.
I am sharing the error message here as well as attaching the ipv4-flow-classifier.cc, ipv4-flow-classifier.h, ipv6-flow-classifier.cc, ipv6-flow-classifier.h files.
Waf: Entering directory `/home/pritish/EDU/CAD/ns-allinone-3.26/ns-3.26/build'
[1428/2471] Compiling src/flow-monitor/model/ipv4-flow-classifier.cc
[1674/2471] Compiling src/flow-monitor/model/ipv6-flow-classifier.cc
../src/flow-monitor/model/ipv4-flow-classifier.cc: In member function ‘virtual void ns3::Ipv4FlowClassifier::SerializeToXmlStream(std::ostream&, int) const’:
../src/flow-monitor/model/ipv4-flow-classifier.cc:191:51: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
 #define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
                                                   
   INDENT (indent); os << "<Ipv4FlowClassifier>\n";
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
                                                   
   indent += 2;
   ~~~~~~~~~~~~                                    
   for (std::map<FiveTuple, FlowId>::const_iterator
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
     ~                                              
       INDENT (indent);
       ~~~~~~~~~                                    
../src/flow-monitor/model/ipv4-flow-classifier.cc:199:7: note: in expansion of macro ‘INDENT’
       INDENT (indent);
       ^~~~~~
cc1plus: all warnings being treated as errors

../src/flow-monitor/model/ipv6-flow-classifier.cc: In member function ‘virtual void ns3::Ipv6FlowClassifier::SerializeToXmlStream(std::ostream&, int) const’:
../src/flow-monitor/model/ipv6-flow-classifier.cc:192:51: error: assuming signed overflow does not occur when simplifying conditional to constant [-Werror=strict-overflow]
 #define INDENT(level) for (int __xpto = 0; __xpto < level; __xpto++) os << ' ';
                                            ~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
                                                   
   INDENT (indent); os << "<Ipv6FlowClassifier>\n";
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
 
                                                   
   indent += 2;
   ~~~~~~~~~~~~                                    
   for (std::map<FiveTuple, FlowId>::const_iterator
   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        iter = m_flowMap.begin (); iter != m_flowMap.end (); iter++)
        ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
     {
     ~                                              
       INDENT (indent);
       ~~~~~~~~~                                    
../src/flow-monitor/model/ipv6-flow-classifier.cc:200:7: note: in expansion of macro ‘INDENT’
       INDENT (indent);
       ^~~~~~
cc1plus: all warnings being treated as errors

Waf: Leaving directory `
/home/pritish/EDU/CAD/ns-allinone-3.26/ns-3.26/build'
Build failed
 -> task in '
ns3-flow-monitor' failed (exit status 1):
    {task 139733809691024: cxx ipv4-flow-classifier.cc -> ipv4-flow-classifier.cc.1.o}
['
/usr/bin/g++', '-O3', '-g', '-Wall', '-Werror', '-march=native', '-fstrict-overflow', '-Wstrict-overflow=2', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-DNS3_BUILD_PROFILE_OPTIMIZED', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '../src/flow-monitor/model/ipv4-flow-classifier.cc', '-c', '-o', '/home/pritish/EDU/CAD/ns-allinone-3.26/ns-3.26/build/src/flow-monitor/model/ipv4-flow-classifier.cc.1.o']
 -> task in '
ns3-flow-monitor' failed (exit status 1):
    {task 139733809691280: cxx ipv6-flow-classifier.cc -> ipv6-flow-classifier.cc.1.o}
['
/usr/bin/g++', '-O3', '-g', '-Wall', '-Werror', '-march=native', '-fstrict-overflow', '-Wstrict-overflow=2', '-std=c++11', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-DNS3_BUILD_PROFILE_OPTIMIZED', '-DHAVE_SYS_IOCTL_H=1', '-DHAVE_IF_NETS_H=1', '-DHAVE_NET_ETHERNET_H=1', '-DHAVE_PACKET_H=1', '-DHAVE_IF_TUN_H=1', '../src/flow-monitor/model/ipv6-flow-classifier.cc', '-c', '-o', '/home/pritish/EDU/CAD/ns-allinone-3.26/ns-3.26/build/src/flow-monitor/model/ipv6-flow-classifier.cc.1.o']


ipv4-flow-probe.cc
ipv4-flow-probe.h
ipv6-flow-classifier.cc
ipv6-flow-classifier.h

Shobhit Asati

unread,
Aug 31, 2017, 2:12:45 PM8/31/17
to ns-3-users
Hi Pritish, i'm facing the same problem did you get any help???
Reply all
Reply to author
Forward
0 new messages