2
charlie@charlie:~/Desktop/ns-allinone-3.36.1/ns-3.36.1$ ls
AUTHORS   build-support  CMakeLists.txt   doc       ns3               scratch  testpy.supp  VERSION
bindings  CHANGES.md     contrib          examples  README.md         src      utils
build     cmake-cache    CONTRIBUTING.md  LICENSE   RELEASE_NOTES.md  test.py  utils.py

charlie@charlie:~/Desktop/ns-allinone-3.36.1/ns-3.36.1$ ./waf
bash: ./waf: No such file or directory

Could someone help me out to understand why waf module is not installed in my directory?

Tsyvarev
  • 60,011
  • 17
  • 110
  • 153
  • Which installation way you are following in that [manual](https://www.nsnam.org/wiki/Installation#Installation)? The content of directory `~/Desktop/ns-allinone-3.36.1/ns-3.36.1` which you show doesn't correspond to any of these ways. – Tsyvarev Sep 08 '22 at 17:52
  • 1
    The content you show resembles [that repo](https://gitlab.com/nsnam/ns-3-dev/-/tree/ns-3.36.1). In the README you could see instructions how to build it. These instructions doesn't note `waf`. – Tsyvarev Sep 08 '22 at 17:58
  • Default is e.g. `cd ns-allinone-3.36.1/ && ./build.py --enable-examples --enable-tests` https://www.nsnam.org/docs/tutorial/html/getting-started.html ..... Earlier versions had waf configuration/build , new versions have cmake configuration/build → `CMakeLists.txt` – Knud Larsen Sep 08 '22 at 19:29
  • @Hannet Did you find a solution in the past four months since you asked this? If so, you can answre your own question. – Mehdi Charife Jan 19 '23 at 19:53
  • @KNudLarsen Newer versions don't have the waf file? – Mehdi Charife Jan 19 '23 at 20:18
  • See `ns-allinone-3.36.1/build.py` : build.py seems to use `qmake` for configuration, and `ns-allinone-3.36.1/ns-3.36.1/` is using `cmake` . .... INFO: Please read `ns-allinone-3.36.1/README.md` : "./build.py --enable-examples --enable-tests" – Knud Larsen Jan 20 '23 at 09:59

2 Answers2

1

Try using the ./ns3 command instead of ./waf

예준캉
  • 11
  • 1
1

waf build system was removed in version ns-3.36: https://github.com/nsnam/ns-3-dev-git/blob/master/CHANGES.md#changes-to-build-system-3

It is replaced by ns3 script which is a Python script providing an interface similar to waf. Most common commands such as ./waf configure and ./waf build are replaced with almost identical ./ns3 configure, ./ns3 build etc. Internally, however, CMake build system is used.

You can see the merge request which introduced the change here: https://gitlab.com/nsnam/ns-3-dev/-/merge_requests/460

tla
  • 855
  • 1
  • 14