0

I am trying to install ns-3 on ubuntu 18.04./ but when I try to build with following command

python ./build.py

and I have following errors:

In file included from ./ns3/ptr.h:26:0,
                 from ./ns3/event-id.h:24,
                 from ./ns3/simulator.h:24,
                 from ../src/wimax/model/ss-net-device.cc:23:
../src/wimax/model/ss-net-device.cc: In member function ‘virtual void ns3::SubscriberStationNetDevice::DoReceive(ns3::Ptr<ns3::Packet>)’:
./ns3/assert.h:93:22: error: enum constant in boolean context [-Werror=int-in-bool-context]
       if (!(condition))                               \
                      ^
../src/wimax/model/ss-net-device.cc:926:15: note: in expansion of macro ‘NS_ASSERT_MSG’
               NS_ASSERT_MSG (SS_STATE_WAITING_RNG_RSP,
               ^~~~~~~~~~~~~
./ns3/assert.h:93:22: error: enum constant in boolean context [-Werror=int-in-bool-context]
       if (!(condition))                               \
                      ^
../src/wimax/model/ss-net-device.cc:945:15: note: in expansion of macro ‘NS_ASSERT_MSG’
               NS_ASSERT_MSG (SS_STATE_WAITING_RNG_RSP,
               ^~~~~~~~~~~~~
cc1plus: all warnings being treated as errors

Build failed
 -> task in 'ns3-wimax' failed (exit status 1): 
    {task 139646911565952: cxx ss-net-device.cc -> ss-net-device.cc.1.o}
['/usr/bin/c++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-I.', '-I..', '-DNS3_BUILD_PROFILE_DEBUG', '-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_IF_TUN_H=1', '-DHAVE_SQLITE3=1', '../src/wimax/model/ss-net-device.cc', '-c', '-o', 

What should I do fix them?

Charles Green
  • 21,339
Bushra
  • 1

0 Answers0