I’ve tried to follow the docs to install it on WSL Ubuntu but the build fails (the log is not important *1, but you can check if interested https://pastebin.com/UTQdd4sW )
I’ve also tried nixOS (wsl) no luck there too
Then I thought using a docker image for this would be most straightforward and tried my luck with this https://hub.docker.com/r/andreafulcheri/ns3 but getting
waf: command not found
when I run ./waf --run hello-simulator
.
Also not sure how will I have the visual (GUI) of the simulation.
I’d prefer to use Python for simulation.
Now I’m mostly frustrated, any help with a step-by-step guide (From installing to running a simple test with visual simulation) is appreciated. (Please ask if I missed anything and I’ll update the OP)
*1 Any logs here are irrelevant for the scope of this question because I want a full guide From installing to running a simple test with visual simulation (not fix my bug here), I didn’t find a proper guide (and the official one is not doing it for me. So, it’s very irrelevant what wrong way I approached and its errors).
I want this question as a full guide for not just me but any newcomers.
2
Answers
If you are using a ns-3 version with Waf (<= ns-3.35), you should use use the compatible compilers tested with that version (check the release notes for that), or apply fixes manually.
The docker image you referred uses ns-3.38, which is based on CMake.
From ns-3.36 onwards, you can refer to the following guide.
Just make sure to install g++/clang, python3, cmake and ninja/makefiles.
https://www.nsnam.org/docs/tutorial/html/quick-start.html
Maybe you didn’t installed properly WSLg https://github.com/microsoft/wslg
Double check if a basic app like gedit works: