2

I had code that worked fine. I shut down my PC (Ubuntu) and then, built the same software (ns-3) and now I get the error:

Traceback (most recent call last):
  File "./waf", line 148, in <module>
    Scripting.prepare(t, cwd, VERSION, wafdir)
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 102, in prepare
    prepare_impl(t,cwd,ver,wafdir)
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 95, in prepare_impl
    main()
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 130, in main
    fun(ctx)
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 269, in build
    bld=check_configured(bld)
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Scripting.py", line 219, in check_configured
    bld.load_dirs(proj[SRCDIR],proj[BLDDIR])
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Build.py", line 245, in load_dirs
    self.load()
  File "/home/ns-allinone-3.6/ns-3.6/.waf-1.5.8-12763e767c863088b8579dbeeb8265b6/wafadmin/Build.py", line 78, in load
    if f:data=cPickle.load(f)
EOFError

I am just amazed at this, how could 2 minutes before everything was fine and now I am screwed by this error.

What should I do, I am totally bewildered. I have a deadline and suddenly this code stops, it worked fine, only change I did was to switch off my PC.

Luke B
  • 2,075
  • 2
  • 18
  • 26
ferrer
  • 135
  • 3
  • 10
  • This problem could be caused by updates in the OS. Check if you have made some recently. Moreover I suggest you to update the entire simulator to a new and update release like the 3.24.1 (This may solve your problem!!) Here the [link](https://www.nsnam.org/releases/latest). – rebatoma Oct 24 '15 at 14:21
  • @Mattia how do I revert the updates. I have to use this version only. Please help. – ferrer Oct 24 '15 at 14:22
  • Download the new release then move your codes in the scratch folder inside `ns3-allinone-3.24/ns-3.34/scratch`. Then `./waf` will compile all the simulator with your codes and everything should work properly (except for a few tweaks). If you have any problem use in the right way the ns-3 documentation [here](https://www.nsnam.org/documentation/) or the user-group [here](https://groups.google.com/forum/#!forum/ns-3-users). – rebatoma Oct 24 '15 at 14:28
  • @Mattia My code works with 3.6 only, TCP model is different for 3.24. I can't use that. Please suggest any other solution. I can't do that. I just can't believe this is happening .. – ferrer Oct 24 '15 at 14:30
  • Ok. So as I already write down. Check if you have made some update in the OS and remove the changes. Probably you update something that changes in the compiler and this provide your error! – rebatoma Oct 24 '15 at 14:33
  • Probably just WAF cache gone awry. Try to rebuild it. First write: `rm -rf build` and build from scratch. – rebatoma Oct 24 '15 at 14:36
  • @Mattia please explain a bit more, my mind is not working. – ferrer Oct 24 '15 at 14:44
  • @Mattia Thanks a lot Mattia. Your help has solved the problem. Thanks again. I wish you all the best. Many many Thanks :) – ferrer Oct 24 '15 at 14:50
  • Open the terminal. Inside the main ns-3 fonder (where you usually compile and run the codes). Write `sudo rm -rf build` and press enter (this may required the administrator password). In this way you delete the build folder. Then procede by rebuild the entire simulator, so write: `./waf configure` and press enter. Then you should be able to run your code using `./waf --run TheNameOfYourCode`. The recompiling procedure may take few minutes. – rebatoma Oct 24 '15 at 14:50
  • @Mattia yes thanks for explaining, sorry for asking you to do that. I was mentally blocked. Yes, I did what you had said. And, I am very grateful to you for your help. All the best Muy Muy thanks :) – ferrer Oct 24 '15 at 14:52
  • I suggest you to finish this work and then for future works, download and install the new release 3.24!!! Best regards. – rebatoma Oct 24 '15 at 14:53
  • @Mattia Yes, I will do that. Thanks for the suggestion :) – ferrer Oct 24 '15 at 14:55

1 Answers1

0

NS-3.6 is a very very old ns-3 release which you are trying to build with a new system (gcc compiler, python etc). I think the only solution to solve the problem is to update the simulator to a new release.

Try to rebuild it. First write: rm -rf build and build from scratch

rebatoma
  • 734
  • 1
  • 17
  • 32
  • No , No I can't do that. The code just worked 5 minutes ago. What changed..... I can't use any new version, I have my entire project on that version. – ferrer Oct 24 '15 at 14:26
  • @PartidodelPartido so check if you made some updates in the operative system and restore previous setting. – rebatoma Oct 24 '15 at 14:29