ns3 LTE installation HELP

3,393 views
Skip to first unread message

JM Koo

unread,
Oct 8, 2012, 6:45:17 PM10/8/12
to ns-3-...@googlegroups.com
hello
am trying to simulate an lte network for my master thesis. unfortunately am a begginer to linux, c++, python and such.
already installed ns-3-dev and ns-3.15
"installed" lena lte (hg clone http://lena.cttc.es/hg/lena/)
but i cant seem to run any example tests, get loads of error
plus i cant find any step by step tutorial on internet...
can somebody help me and point me into the right direction?
please
thx
JK

JM Koo

unread,
Oct 8, 2012, 7:36:14 PM10/8/12
to ns-3-...@googlegroups.com
ok, downloaded "nbaldo/ns-3-lena-dev" and "nbaldo/ns-3-lena-trunk" from code.nsnam.org
did "./waf configure" but when i try to "./test.py" i get errors in both dev and trunk

when "./test.py" in "ns-3-lena-dev" i get error

[ 869/1759] cxx: src/mpi/model/mpi-interface.cc -> build/src/mpi/model/mpi-interface.cc.1.o
Waf: Leaving directory `/root/repos/ns-3-allinone/ns-3-lena-dev/build'
Build failed
 -> task failed (exit status 1): 
    {task 29128528: cxx animation-interface.cc -> animation-interface.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-fPIC', '-pthread', '-pthread', '-Ibuild/src/netanim', '-Isrc/netanim', '-Ibuild', '-I.', '-I/usr/include/gtk-2.0', '-I/usr/lib64/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng15', '-I/usr/include/libxml2', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DPYTHONDIR="/usr/local/lib/python2.7/site-packages"', '-DPYTHONARCHDIR="/usr/local/lib64/python2.7/site-packages"', '-DHAVE_PYTHON_H=1', '-DENABLE_GSL', '../src/netanim/model/animation-interface.cc', '-c', '-o', 'src/netanim/model/animation-interface.cc.1.o']
Waf died. Not running tests
[root@fedoravm ns-3-lena-dev]# 

and when "./test.py" in "ns-3-lena-trunk" i get error

[ 590/1475] cxx: src/core/model/calendar-scheduler.cc -> build/debug/src/core/model/calendar-scheduler_1.o
../src/core/model/calendar-scheduler.cc: In member function ‘virtual ns3::Scheduler::Event ns3::CalendarScheduler::PeekNext() const’:
../src/core/model/calendar-scheduler.cc:128:43: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint64_t {aka long unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
../src/core/model/calendar-scheduler.cc:128:43: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint32_t {aka unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
../src/core/model/calendar-scheduler.cc: In member function ‘ns3::Scheduler::Event ns3::CalendarScheduler::DoRemoveNext()’:
../src/core/model/calendar-scheduler.cc:157:43: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint64_t {aka long unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
../src/core/model/calendar-scheduler.cc:157:43: error: narrowing conversion of ‘-1’ from ‘int’ to ‘uint32_t {aka unsigned int}’ inside { } is ill-formed in C++11 [-Werror=narrowing]
../src/core/model/map-scheduler.cc: In member function ‘virtual ns3::Scheduler::Event ns3::MapScheduler::RemoveNext()’:
../src/core/model/map-scheduler.cc:85:46: error: variable ‘next’ set but not used [-Werror=unused-but-set-variable]
../src/core/model/time.cc: In member function ‘virtual void ns3::ArithTestCase::DoRun()’:
../src/core/model/time.cc:285:8: error: variable ‘x’ set but not used [-Werror=unused-but-set-variable]
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
cc1plus: all warnings being treated as errors
Waf: Leaving directory `/root/repos/ns-3-allinone/ns-3-lena-trunk/build'
Build failed:
 -> task failed (err #1): 
    {task: cxx map-scheduler.cc -> map-scheduler_1.o}
 -> task failed (err #1): 
    {task: cxx calendar-scheduler.cc -> calendar-scheduler_1.o}
 -> task failed (err #1): 
    {task: cxx time.cc -> time_1.o}
Waf died. Not running tests
[root@fedoravm ns-3-lena-trunk]# 


any help with this?

Konstantinos

unread,
Oct 9, 2012, 5:59:07 AM10/9/12
to ns-3-...@googlegroups.com
Hi,

NS-3.15 has the LENA code integrated under the LTE module.
If you install NS-3,15 then you have also LENA, so there is no need to look for other codes like you mention below.

First of all, since you are a beginner, you have to go through the NS-3 tutorial, step by step, and then start working with LTE.

Here is a step-by-step installation guide for NS-3 http://www.nsnam.org/wiki/index.php/Installation
Here is the tutorial http://www.nsnam.org/docs/tutorial/html/index.html

After you have read and understood that, you can go and read the LTE module (http://www.nsnam.org/docs/models/html/lte.html) so that you can build your scenario.

gian

unread,
Oct 9, 2012, 6:33:34 AM10/9/12
to ns-3-...@googlegroups.com
Hi JM,
wich Linux distribution for develop NS-3 have you adopted ?
I use Ubuntu 12.04 LTS, with these additional packages (applications):
gcc
python
mercurial
bzr
valgrid
doxygen
graphviz
gccxml

and these other libraries for develop:

python-pygraphviz, python-pygccxml, python-pygoocanvas, python-kiwi, python2.7-dev, libgtk2.0-dev, libxml++2.6-dev, libsqlite3-dev, libgsl0-dev, libboost-all-dev

Why you download the LENA code from http://lena.cttc.es/hg/lena/? This code is merged in ns-3.14...

Bye.

JM Koo

unread,
Oct 9, 2012, 12:13:00 PM10/9/12
to ns-3-...@googlegroups.com
Hello Gian
am using both Fedora17 and Ubuntu 12.04LTS, why both? well I don't know linux at all.... ubuntu is more user friendly but in tutorial they recommend fedora, so i installed 2 vm.
am running tutorial simultaneously in fedora and ubuntu and sometimes i encounter problems on either or both linux.
am guessing i have those packages as well, since i installed all the "prerequisites" in installation tutorial, except for openmpi*, gcc-3.4 also gave problem, but i installed latest version from ubuntu software center
also had problems with network cradle but solved it with installation of flex and flex-static.

Konstantinos

unread,
Oct 9, 2012, 12:43:36 PM10/9/12
to ns-3-...@googlegroups.com
Hi

On Tuesday, 9 October 2012 17:01:29 UTC+1, JM Koo wrote:
Hello Konstantinos

I followed http://www.nsnam.org/wiki/index.php/Installation for installation of prerequisites.  as for the tutorial I read the ns-3-tutorial.pdf and got to run the "hello simulator program"
actually have installed ns-3.15.

That's ok.
 
as for LTE Module, I got to write and "run" (i guess) the basic simulation program example there.

No. All the simulation scenarios should be written in the scratch folder. That's your working folder. Anything inside the /src folder is like the "library". If you want to develop a new model, or if you want to change something in existiing models, then you go inside the /src. Otherwise, you just create simulation scripts in scratch. You can go inside /src/lte/examples and copy from these the files in your scratch folder (better to rename them also).
 
tho it said "successful", I dont quite know, tried to put a "NS_LOG_UNCOND ("message")" after "Simulation::Run();" to see if i get the "message" in terminal, but it didnt.


I guess you haven't read the tutorial well. Try putting is before the Run()...
 

JM Koo

unread,
Oct 9, 2012, 1:02:17 PM10/9/12
to ns-3-...@googlegroups.com
thanks for your prompt response Konstantinos,
I will do as suggested and re-read the tutorial!

regarding scratch folder and programs, I followed LTE tutorial basic simulation program; question is, after I write and save as *.cc file, I put it in scratch and run it?
since I didnt know, I save it to /ns-3-lena-dev/build/[myfoldername] and put lte-bsp.cc there, then from /ns-3-lena-dev$  I execute ./waf -d debug -o build/[myfoldername]  configure and then it runs

btw, I did put NS_LOG_UNCOND ("message")  befor Simulation::Run (), and NS_LOG_COMPONENT_DEFINE ("something") at the beginning, and still no message.

thanks again
JK

Konstantinos

unread,
Oct 9, 2012, 1:15:34 PM10/9/12
to ns-3-...@googlegroups.com


On Tuesday, 9 October 2012 18:02:17 UTC+1, JM Koo wrote:
thanks for your prompt response Konstantinos,
I will do as suggested and re-read the tutorial!

regarding scratch folder and programs, I followed LTE tutorial basic simulation program; question is, after I write and save as *.cc file, I put it in scratch and run it?
since I didnt know, I save it to /ns-3-lena-dev/build/[myfoldername] and put lte-bsp.cc there, then from /ns-3-lena-dev$  I execute ./waf -d debug -o build/[myfoldername]  configure and then it runs

btw, I did put NS_LOG_UNCOND ("message")  befor Simulation::Run (), and NS_LOG_COMPONENT_DEFINE ("something") at the beginning, and still no message.


That's because you didn't put the file in the correct folder. It has not been build.
Put your .cc file in ns-3.15/scratch
Run ./waf (this will build ns-3 and all the scripts in /scratch)
Run ./waf --run scratch/your_file (without .cc at the end)
 

JM Koo

unread,
Oct 9, 2012, 1:18:26 PM10/9/12
to ns-3-...@googlegroups.com
will do
thanks again for the big help
I'll keep you posted
JK

JM Koo

unread,
Oct 9, 2012, 2:15:20 PM10/9/12
to ns-3-...@googlegroups.com
hey Gian, just to be sure,
how do I verify I have all these packages and libraries? or even better, if I dont, how do I install them? packages I think it would be sudo apt-get install, but as for the libraries? how do I installthem?
thx
JK

On Tuesday, 9 October 2012 05:33:34 UTC-5, gian wrote:

JM Koo

unread,
Oct 9, 2012, 3:07:43 PM10/9/12
to ns-3-...@googlegroups.com
so, am getting this error, checked with lte tutorial and script seems to be fine...

ubuntuvm@ubuntuvm:~/repos/ns-3-allinone/ns-3.15$ ./waf
Waf: Entering directory `/home/ubuntuvm/repos/ns-3-allinone/ns-3.15/build'
[ 698/1485] cxx: scratch/subdir/scratch-simulator-subdir.cc -> build/scratch/subdir/scratch-simulator-subdir.cc.3.o
[1363/1485] cxx: scratch/LTE-bsp-scratch.cc -> build/scratch/LTE-bsp-scratch.cc.1.o
[1364/1485] cxx: scratch/scratch-simulator.cc -> build/scratch/scratch-simulator.cc.2.o
../scratch/LTE-bsp-scratch.cc: In function ‘int main(int, char**)’:
../scratch/LTE-bsp-scratch.cc:89:45: error: no matching function for call to ‘ns3::LteHelper::ActivateEpsBearer(ns3::NetDeviceContainer&, ns3::EpsBearer&)’
../scratch/LTE-bsp-scratch.cc:89:45: note: candidates are:
./ns3/lte-helper.h:211:8: note: void ns3::LteHelper::ActivateEpsBearer(ns3::NetDeviceContainer, ns3::EpsBearer, ns3::Ptr<ns3::EpcTft>)
./ns3/lte-helper.h:211:8: note:   candidate expects 3 arguments, 2 provided
./ns3/lte-helper.h:220:8: note: void ns3::LteHelper::ActivateEpsBearer(ns3::Ptr<ns3::NetDevice>, ns3::EpsBearer, ns3::Ptr<ns3::EpcTft>)
./ns3/lte-helper.h:220:8: note:   candidate expects 3 arguments, 2 provided
../scratch/LTE-bsp-scratch.cc:113:1: error: ‘Simulation’ has not been declared
Waf: Leaving directory `/home/ubuntuvm/repos/ns-3-allinone/ns-3.15/build'
Build failed
 -> task in 'LTE-bsp-scratch' failed (exit status 1):
    {task 156396492: cxx LTE-bsp-scratch.cc -> LTE-bsp-scratch.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-fno-strict-aliasing', '-fwrapv', '-fstack-protector', '-fno-strict-aliasing', '-Ibuild', '-I.', '-I.', '-I/home/ubuntuvm/repos/ns-3-allinone', '-I/usr/include/gtk-2.0', '-I/usr/lib/i386-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/glib-2.0', '-I/usr/lib/i386-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng12', '-I/usr/include/libxml2', '-I/usr/include/python2.7', '-DNS3_ASSERT_ENABLE', '-DNS3_LOG_ENABLE', '-DHAVE_PACKET_H=1', '-DHAVE_DL=1', '-DSQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DENABLE_GSL', '-DNDEBUG', '../scratch/LTE-bsp-scratch.cc', '-c', '-o', 'scratch/LTE-bsp-scratch.cc.1.o']




what can it be?
am guessing one of the errors its about a third argument which is not given in the tutorial? what would it be?
and the one regarding "main", dont know what it is...


On Tuesday, 9 October 2012 12:15:34 UTC-5, Konstantinos wrote:

Konstantinos

unread,
Oct 9, 2012, 3:11:31 PM10/9/12
to ns-3-...@googlegroups.com
Where did you find this code you try to simulate?


On Tuesday, October 9, 2012 8:07:43 PM UTC+1, JM Koo wrote:
so, am getting this error, checked with lte tutorial and script seems to be fine...

ubuntuvm@ubuntuvm:~/repos/ns-3-allinone/ns-3.15$ ./waf
Waf: Entering directory `/home/ubuntuvm/repos/ns-3-allinone/ns-3.15/build'
[ 698/1485] cxx: scratch/subdir/scratch-simulator-subdir.cc -> build/scratch/subdir/scratch-simulator-subdir.cc.3.o
[1363/1485] cxx: scratch/LTE-bsp-scratch.cc -> build/scratch/LTE-bsp-scratch.cc.1.o
[1364/1485] cxx: scratch/scratch-simulator.cc -> build/scratch/scratch-simulator.cc.2.o
../scratch/LTE-bsp-scratch.cc: In function ‘int main(int, char**)’:
../scratch/LTE-bsp-scratch.cc:89:45: error: no matching function for call to ‘ns3::LteHelper::ActivateEpsBearer(ns3::NetDeviceContainer&, ns3::EpsBearer&)’
../scratch/LTE-bsp-scratch.cc:89:45: note: candidates are:
./ns3/lte-helper.h:211:8: note: void ns3::LteHelper::ActivateEpsBearer(ns3::NetDeviceContainer, ns3::EpsBearer, ns3::Ptr<ns3::EpcTft>)
./ns3/lte-helper.h:211:8: note:   candidate expects 3 arguments, 2 provided
./ns3/lte-helper.h:220:8: note: void ns3::LteHelper::ActivateEpsBearer(ns3::Ptr<ns3::NetDevice>, ns3::EpsBearer, ns3::Ptr<ns3::EpcTft>)
./ns3/lte-helper.h:220:8: note:   candidate expects 3 arguments, 2 provided

It gives you the reason for your problem. The ActivateEpsBearer method requires 3 arguments and you give 2. Take the scenario scripts from the same version of ns-3 you are running because there might be changes in the API

Konstantinos

unread,
Oct 9, 2012, 3:12:59 PM10/9/12
to ns-3-...@googlegroups.com
The installation page (http://www.nsnam.org/wiki/index.php/Installation) gives you exactly which packages are required and how to install them for different OS.

JM Koo

unread,
Oct 9, 2012, 3:17:16 PM10/9/12
to ns-3-...@googlegroups.com
got it from here
didnt copy/paste, actually type all the lines to "practice"

JM Koo

unread,
Oct 9, 2012, 3:17:17 PM10/9/12
to ns-3-...@googlegroups.com
yeah, i followed that wiki instruction

Prithvi Reddy Bojja

unread,
Oct 25, 2012, 11:55:43 PM10/25/12
to ns-3-...@googlegroups.com
Hello I am doing my Master Project on simulating a LTE network.
I am a beginner to C++ and ns-3.
Can i find a website that gives me information or a step by step process to install ns-3 and please recommend me the which UBUNTU version to use and ns-3 version.
@Konstantinos please help me out.

Konstantinos

unread,
Oct 26, 2012, 5:31:53 AM10/26/12
to ns-3-...@googlegroups.com
If you read the NS-3 tutorial, it gives you all the information you need.
The installation page (http://www.nsnam.org/wiki/index.php/Installation) has a step-by-step process to install it. There is no specific UBUNTU version that is required, but I would recommend an LTS (long term support) version

JM Koo

unread,
Oct 26, 2012, 12:55:01 PM10/26/12
to ns-3-...@googlegroups.com
Hey there...
as Konstantinos said, following the installation tutorial is the best way to go... 
follow ubuntu prerequisites and install the packages... although i had trouble with 
  • To install gcc-3.4 for some Network Simulation Cradle (nsc) stacks:
 sudo apt-get install g++-3.4 gcc-3.4
and
  • Support for MPI-based distributed emulation
sudo apt-get install openmpi*

I am running ubuntu 12.04LTS...
regarding C++, i think what you need to know about that its just the structure of c++ programming (which is in some way like java, since both of them are OOP), after you know the basics, you can go to ns3 lte api, which is what am going through....to see how things works....

if am mistaken in some points please correct me, since I as well am new to both c++, linux and all this required stuffs...

greetings

JK
Message has been deleted

Prithvi Reddy Bojja

unread,
Oct 27, 2012, 3:45:56 AM10/27/12
to ns-3-...@googlegroups.com
Hey guys.
Can you guys send me a simple LTE code so that i can verify whether my dependencies are working alright.
Please guys!

Thank you in advance.

Prithvi Reddy Bojja

unread,
Oct 27, 2012, 4:03:29 AM10/27/12
to ns-3-...@googlegroups.com
Hello Jose.
I tried to simulate the basic code that you have posted the link above.
it is giving the following error.

can you please help me in debugging this error.
@konstantinos Please send me any basic codes if you have any.

./waf: Entering directory `/home/bojjaprithvi/repos/ns-3-allinone/ns-3-dev/build'
[ 713/1831] cxx: scratch/done.cc -> build/scratch/done.cc.1.o
../scratch/done.cc: In function ‘int main(int, char**)’:
../scratch/done.cc:43:45: error: no matching function for call to ‘ns3::LteHelper::ActivateEpsBearer(ns3::NetDeviceContainer&, ns3::EpsBearer&)’
../scratch/done.cc:43:45: note: candidates are:

./ns3/lte-helper.h:211:8: note: void ns3::LteHelper::ActivateEpsBearer(ns3::NetDeviceContainer, ns3::EpsBearer, ns3::Ptr<ns3::EpcTft>)
./ns3/lte-helper.h:211:8: note: candidate expects 3 arguments, 2 provided
./ns3/lte-helper.h:220:8: note: void ns3::LteHelper::ActivateEpsBearer(ns3::Ptr<ns3::NetDevice>, ns3::EpsBearer, ns3::Ptr<ns3::EpcTft>)
./ns3/lte-helper.h:220:8: note: candidate expects 3 arguments, 2 provided
Waf: Leaving directory `/home/bojjaprithvi/repos/ns-3-allinone/ns-3-dev/build'
Build failed



On Friday, October 26, 2012 9:55:01 AM UTC-7, JM Koo wrote:

Konstantinos

unread,
Oct 27, 2012, 4:27:50 AM10/27/12
to ns-3-...@googlegroups.com
You can find example codes inside each module or in the /examples folder.
Also, try to use the example codes from the ns3 version that you have installed. The error you are getting here is because you call a method from LteHelper which has now been changed (since the previous version)

JM Koo

unread,
Oct 27, 2012, 10:37:51 AM10/27/12
to ns-3-...@googlegroups.com
As Konstantinos said, there are examples in ns-3.15/src/lte/examples.  you can copy them to ns-3.15/scratch (rename them if you want) and run them.
and as Konstantinos said, the error is due a change in the method (I had the same problem when copying that same example and running it)

Prithvi Reddy Bojja

unread,
Oct 29, 2012, 3:55:47 AM10/29/12
to ns-3-...@googlegroups.com
Hello Jose and Konstantinos.
I had tried simulating few example codes from the src/lte/examples.
They are building fine.
I have a few examples where i have something like lte-simple-net-device.h in the header files that i have to include.
It is showing build error saying that it has not been found.
Can i know the reason,

Please refer this example code in the header files which we include at the start of the code.

Prithvi Reddy Bojja

unread,
Oct 29, 2012, 4:07:14 AM10/29/12
to ns-3-...@googlegroups.com
Hello Konstantinos.
I have a quick question for you.
I have a example model network.
I just wanted to know whether an LTE model to internet(IPv4) is possible.
I had to simulate a network where  have to send packets from the UE's to the end user connected on the internet.
Please find the sample network in the attachment.

Please provide me some information on this.


Thank you.
1.JPG

Konstantinos

unread,
Oct 29, 2012, 6:24:57 AM10/29/12
to ns-3-...@googlegroups.com
Hi,

This example already exists in NS-3 and you can build/extend it more for based on your requirements.
Have a look at /src/lte/examples/lte-simple-epc.cc it builds exactly the network you provided (1 UE pre eNB) and one remote-host over the internet. There is traffic from/to UE to/from remote-host

Muhammad Imran KHAN

unread,
Oct 30, 2012, 6:43:23 PM10/30/12
to ns-3-...@googlegroups.com
Hello , 
I will suggest you by TARBALLS. Sometimes with mercurial, some packets could not be successfully downloaded .. ? 



Imran


On Sat, Oct 27, 2012 at 7:47 AM, Prithvi Reddy Bojja <bojja....@gmail.com> wrote:
Hello All.
Which one would you recommend to use Mercurial or Tarballs?
Which one works perfectly with ubuntu-12.04 LTS?
Please suggest..
Thank you.


On Friday, October 26, 2012 9:55:01 AM UTC-7, JM Koo wrote:
--
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/ns-3-users/-/d3xQ9CNxYikJ.

To post to this group, send email to ns-3-...@googlegroups.com.
To unsubscribe from this group, send email to ns-3-users+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/ns-3-users?hl=en.

JM Koo

unread,
Oct 30, 2012, 7:04:10 PM10/30/12
to ns-3-...@googlegroups.com, xpti...@gmail.com
Hello
I use mercurial and so far no problems...
regards
JK

Prithvi Reddy Bojja

unread,
Oct 31, 2012, 5:39:53 AM10/31/12
to ns-3-...@googlegroups.com, xpti...@gmail.com
I am also using mercurial.
So far it has been working fine.
All we need to watch out is for the dependencies that support LTE network simulation should be properly installed.


Thank  you.

karthika

unread,
Oct 17, 2014, 7:11:54 AM10/17/14
to ns-3-...@googlegroups.com



Hello..



I run "hello-simulator". Then error become like this
if any program is running i getting the same error code

[guest@pf12 ns-3.20]$ ./waf --run hello-simulator
Waf: Entering directory `/opt/ns-allinone-3.20/ns-3.
20/build'
[1750/2075] cxx: examples/tutorial/third.cc -> build/examples/tutorial/third.cc.4.o[1772/2075] cxx: scratch/mythird.cc -> build/scratch/mythird.cc.5.o
In file included from ./ns3/simulator-impl.h:26:0,
                 from ./ns3/default-simulator-impl.h:24,
                 from ./ns3/core-module.h:23,
                 from ../examples/tutorial/third.cc:17:
./ns3/nstime.h:561:11: error: ‘set’ in namespace ‘std’ does not name a type
   typedef std::set< Time * > MarkedTimes;
           ^
./ns3/nstime.h:576:10: error: ‘MarkedTimes’ does not name a type
   static MarkedTimes * g_markingTimes;
          ^
./ns3/nstime.h: In constructor ‘ns3::Time::Time()’:
./ns3/nstime.h:108:9: error: ‘g_markingTimes’ was not declared in this scope
     if (g_markingTimes)
         ^
./ns3/nstime.h: In copy constructor ‘ns3::Time::Time(const ns3::Time&)’:
./ns3/nstime.h:116:9: error: ‘g_markingTimes’ was not declared in this scope
     if (g_markingTimes)
         ^
./ns3/nstime.h: In constructor ‘ns3::Time::Time(double)’:
./ns3/nstime.h:124:9: error: ‘g_markingTimes’ was not declared in this scope
     if (g_markingTimes)
         ^


..
..

Waf: Leaving directory `/opt/ns-allinone-3.20/ns-3.20/build'
Build failed
 -> task in 'third' failed (exit status 1):
    {task 33250896: cxx third.cc -> third.cc.4.o}

['/usr/lib64/ccache/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib64/gtk-2.0/include', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/pixman-1', '-I/usr/include/libdrm', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-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_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '../examples/tutorial/third.cc', '-c', '-o', 'examples/tutorial/third.cc.4.o']
 -> task in 'mythird' failed (exit status 1):
    {task 33966800: cxx mythird.cc -> mythird.cc.5.o}

['/usr/lib64/ccache/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib64/gtk-2.0/include', '-I/usr/include/pango-1.0', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/pixman-1', '-I/usr/include/libdrm', '-I/usr/include/libpng16', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/harfbuzz', '-I/usr/include/glib-2.0', '-I/usr/lib64/glib-2.0/include', '-I/usr/include/freetype2', '-I/usr/include/libxml2', '-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_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '../scratch/mythird.cc', '-c', '-o', 'scratch/mythird.cc.5.o']


Tommaso Pecorella

unread,
Oct 17, 2014, 1:42:22 PM10/17/14
to ns-3-...@googlegroups.com
Hi, 

the right direction is to NOT reply to a thread that has little or no connection with the problem you are experiencing.

Another direction is to give some important info:
1) the OS you are using. Type, subtype, version (e.g., Linux, Debian, 7.5)
2) the gcc version (use gcc -version)
3) the ns-3 version (it's 3.20 but I had to figurer e out)
4) if you did any modification to the code

Thanks,

T.

Rosali Mohanty

unread,
Nov 9, 2014, 7:59:38 AM11/9/14
to ns-3-...@googlegroups.com
hi,
i too got the same error while running any program from scratch. All the example programs are running previously but adding the new models to scratch gave me error while running. the error is :
Waf: Entering directory `/home/sony/vikki/source/ns-3.20/build'
[1771/2080] cxx: scratch/bss.cc -> build/scratch/bss.cc.1.o
In file included from ./ns3/simulator-impl.h:26:0,
                 from ./ns3/default-simulator-impl.h:24,
                 from ./ns3/core-module.h:24,
                 from ../scratch/bss.cc:1:
./ns3/nstime.h:561:11: error: ‘set’ in namespace ‘std’ does not name a type
./ns3/nstime.h:576:10: error: ‘MarkedTimes’ does not name a type
./ns3/nstime.h: In constructor ‘ns3::Time::Time()’:
./ns3/nstime.h:108:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In copy constructor ‘ns3::Time::Time(const ns3::Time&)’:
./ns3/nstime.h:116:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(double)’:
./ns3/nstime.h:124:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(int)’:
./ns3/nstime.h:132:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(long int)’:
./ns3/nstime.h:140:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(long long int)’:
./ns3/nstime.h:148:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(unsigned int)’:
./ns3/nstime.h:156:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(long unsigned int)’:
./ns3/nstime.h:164:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(long long unsigned int)’:
./ns3/nstime.h:172:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In destructor ‘ns3::Time::~Time()’:
./ns3/nstime.h:219:9: error: ‘g_markingTimes’ was not declared in this scope
./ns3/nstime.h: In constructor ‘ns3::Time::Time(const ns3::int64x64_t&)’:
./ns3/nstime.h:483:9: error: ‘g_markingTimes’ was not declared in this scope
In file included from ./ns3/core-module.h:29:0,
                 from ../scratch/bss.cc:1:
./ns3/event-garbage-collector.h: At global scope:
./ns3/event-garbage-collector.h:61:11: error: ‘multiset’ in namespace ‘std’ does not name a type
./ns3/event-garbage-collector.h:63:3: error: ‘EventList’ does not name a type
./ns3/event-garbage-collector.h:64:3: error: ‘EventList’ does not name a type
In file included from ./ns3/internet-module.h:74:0,
                 from ../scratch/bss.cc:7:
./ns3/ripng-helper.h:140:24: error: ‘set’ is not a member of ‘std’
./ns3/ripng-helper.h:140:24: error: ‘set’ is not a member of ‘std’
./ns3/ripng-helper.h:140:41: error: template argument 2 is invalid
./ns3/ripng-helper.h:140:41: error: template argument 4 is invalid
./ns3/ripng-helper.h:140:43: error: expected unqualified-id before ‘>’ token
In file included from ./ns3/internet-module.h:75:0,
                 from ../scratch/bss.cc:7:
./ns3/ripng.h:221:3: error: ‘set’ in namespace ‘std’ does not name a type
./ns3/ripng.h:227:37: error: ‘std::set’ has not been declared
./ns3/ripng.h:227:40: error: expected ‘,’ or ‘...’ before ‘<’ token
./ns3/ripng.h:401:3: error: ‘set’ in namespace ‘std’ does not name a type
Waf: Leaving directory `/home/sony/vikki/source/ns-3.20/build'
Build failed
 -> task in 'bss' failed (exit status 1): 
{task 159401548: cxx bss.cc -> bss.cc.1.o}
['/usr/bin/g++', '-O0', '-ggdb', '-g3', '-Wall', '-Werror', '-Wno-error=deprecated-declarations', '-fstrict-aliasing', '-Wstrict-aliasing', '-pthread', '-pthread', '-fno-strict-aliasing', '-fwrapv', '-fstack-protector', '-fno-strict-aliasing', '-I.', '-I..', '-I/usr/include/gtk-2.0', '-I/usr/lib/i386-linux-gnu/gtk-2.0/include', '-I/usr/include/atk-1.0', '-I/usr/include/cairo', '-I/usr/include/gdk-pixbuf-2.0', '-I/usr/include/pango-1.0', '-I/usr/include/gio-unix-2.0', '-I/usr/include/glib-2.0', '-I/usr/lib/i386-linux-gnu/glib-2.0/include', '-I/usr/include/pixman-1', '-I/usr/include/freetype2', '-I/usr/include/libpng12', '-I/usr/include/libxml2', '-I/usr/include/python2.7', '-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_SQLITE3=1', '-DHAVE_IF_TUN_H=1', '-DHAVE_GSL=1', '-DNDEBUG', '../scratch/bss.cc', '-c', '-o', 'scratch/bss.cc.1.o']
plz help me out...
rosali 

Tommaso Pecorella

unread,
Nov 9, 2014, 10:22:27 AM11/9/14
to ns-3-...@googlegroups.com
Hi,

I'm afraid I can't give any help, and I doubt anyone can.
If you're not able to describe your problem, you reply to a thread stared in 2012 (2 years ago) and you state "i too got the same error" (without saying wat error you are referring to), without saying what's in the file bss.cc, without any info on the compiler, OS version and so on....
If you are unable to ask for help, nobody will be ever able to give help.

T.

meenakshi meena

unread,
Dec 25, 2014, 7:07:44 AM12/25/14
to ns-3-...@googlegroups.com
hello sir, i installed ns3-3.17, which has lena-x2-handover and i copied it and pasted it in scratch folder and i could compile it in terminal successfully. but how to view the out put in animator or graphically. what are the procedures to get this out put...

On Monday, 10 November 2014 09:34:38 UTC+5:30, Boopala Krishnan wrote:
Hi ,
       I think it's better that you install g++ newer version or default version as well as python stable version. Or reinstall everything. I prefer new version ns-3.21.

meenakshi meena

unread,
Dec 25, 2014, 7:10:53 AM12/25/14
to ns-3-...@googlegroups.com

Boopala Krishnan

unread,
Dec 26, 2014, 9:48:18 AM12/26/14
to ns-3-...@googlegroups.com
Mam,
          If you need to see the throughput you can use flow monitor and compare the results with simple lte model. For using flow monitor you can use this link   http://www.nsnam.org/docs/models/html/flow-monitor.html. For simple lte model you can use this example <lena-simple-epc>.
 And to see output in Net anim, insert this line before "simulator:stop" in your code.

          AnimationInterface anim ("my_anim.xml");

And insert this line in header 

#include "ns3/netanim-module.h"

Further information you can get in this link http://www.nsnam.org/docs/release/3.13/models/html/animation.html regarding NetAnim
In NetAnim if you play you can see the handover of UE from one eNB to other.
I think this answers your ?........

Tommaso Pecorella

unread,
Dec 28, 2014, 3:34:51 AM12/28/14
to ns-3-...@googlegroups.com
Hi,

I don't want to be pedantic, but...

3.17: we're at 3.21, and all models had huge improvements. Suggestion, warm one: use the latest ns-3.
Links to the documentation: they're always useful, but the same applies. Using the wrong (outdated in this case) doc can cause a lot of headaches. Make sure to use the latest one, or at least the documentation built for the release you're using.

Cheers,

T.

JM Koo

unread,
Oct 9, 2012, 12:01:29 PM10/9/12
to ns-3-...@googlegroups.com
Hello Konstantinos

I followed http://www.nsnam.org/wiki/index.php/Installation for installation of prerequisites.  as for the tutorial I read the ns-3-tutorial.pdf and got to run the "hello simulator program"
actually have installed ns-3.15.
as for LTE Module, I got to write and "run" (i guess) the basic simulation program example there.
tho it said "successful", I dont quite know, tried to put a "NS_LOG_UNCOND ("message")" after "Simulation::Run();" to see if i get the "message" in terminal, but it didnt.
On Tuesday, 9 October 2012 04:59:07 UTC-5, Konstantinos wrote:
Hi,

NS-3.15 has the LENA code integrated under the LTE module.
If you install NS-3,15 then you have also LENA, so there is no need to look for other codes like you mention below.

First of all, since you are a beginner, you have to go through the NS-3 tutorial, step by step, and then start working with LTE.

Here is a step-by-step installation guide for NS-3 http://www.nsnam.org/wiki/index.php/Installation
Here is the tutorial http://www.nsnam.org/docs/tutorial/html/index.html

After you have read and understood that, you can go and read the LTE module (http://www.nsnam.org/docs/models/html/lte.html) so that you can build your scenario.


On Monday, 8 October 2012 23:45:17 UTC+1, JM Koo wrote:
hello
am trying to simulate an lte network for my master thesis. unfortunately am a begginer to linux, c++, python and such.
already installed ns-3-dev and ns-3.15
"installed" lena lte (hg clone http://lena.cttc.es/hg/lena/)
but i cant seem to run any example tests, get loads of error
plus i cant find any step by step tutorial on internet...
can somebody help me and point me into the right direction?
please
thx
JK

Boopala Krishnan

unread,
Nov 9, 2014, 11:04:38 PM11/9/14
to ns-3-...@googlegroups.com
Hi ,
       I think it's better that you install g++ newer version or default version as well as python stable version. Or reinstall everything. I prefer new version ns-3.21.

On Sunday, November 9, 2014 6:29:38 PM UTC+5:30, Rosali Mohanty wrote:

Hogan Chou

unread,
Nov 12, 2020, 8:59:22 AM11/12/20
to ns-3-users
Thank you, now I know how to use examples. But I want to use FF MAC Scheduler module and find out the existing mac scheduling algrithms' performance, how can I start a simulation using these FF MAC Scheduler's scheduling algrithms? These algrithms include:
在2012年10月10日星期三 UTC+8 上午12:43:36<Konstantinos> 写道:
Hi

On Tuesday, 9 October 2012 17:01:29 UTC+1, JM Koo wrote:
Hello Konstantinos

I followed http://www.nsnam.org/wiki/index.php/Installation for installation of prerequisites.  as for the tutorial I read the ns-3-tutorial.pdf and got to run the "hello simulator program"
actually have installed ns-3.15.

That's ok.
 
as for LTE Module, I got to write and "run" (i guess) the basic simulation program example there.
No. All the simulation scenarios should be written in the scratch folder. That's your working folder. Anything inside the /src folder is like the "library". If you want to develop a new model, or if you want to change something in existiing models, then you go inside the /src. Otherwise, you just create simulation scripts in scratch. You can go inside /src/lte/examples and copy from these the files in your scratch folder (better to rename them also).
 
tho it said "successful", I dont quite know, tried to put a "NS_LOG_UNCOND ("message")" after "Simulation::Run();" to see if i get the "message" in terminal, but it didnt.


I guess you haven't read the tutorial well. Try putting is before the Run()...
 
On Tuesday, 9 October 2012 04:59:07 UTC-5, Konstantinos wrote:

Tarek Hassan

unread,
Nov 13, 2020, 6:54:13 AM11/13/20
to ns-3-...@googlegroups.com
Hi,

I was also working on it. You can follow design documentation of nsam.org

Regards,
Tarek Hassan

--
Posting to this group should follow these guidelines https://www.nsnam.org/wiki/Ns-3-users-guidelines-for-posting
---
You received this message because you are subscribed to the Google Groups "ns-3-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ns-3-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ns-3-users/c1a6a2b6-b4dd-426c-943a-03b014e764bdn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages