direct-code-execution / ns-3-dce

Run real programs in the discrete time simulator ns3
http://www.nsnam.org/projects/direct-code-execution/
75 stars 46 forks source link

unable to build ns3-dce #112

Closed stoza closed 3 years ago

stoza commented 3 years ago

Description of the problem

I'm trying to build ns3 following the quick start here https://www.nsnam.org/docs/dce/manual/html/getting-started.html. But every time I do this I have the following error (obtained by running bake.py deploy -vvv).

../myscripts/mt3/dce-mt3.cc: In function 'int main(int, char**)': 
../myscripts/mt3/dce-mt3.cc:120:27: error: 'Default' is not a member of 'ns3::YansWifiPhyHelper
 YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();
                           ^
Waf: Leaving directory `/home/ns3dce/bake/source/ns-3-dce/build'
Build failed
 -> task in 'bin/dce-mt3' failed with exit status 1 (run with -v to display more information)

 >> Building dce-ns3-dev - Problem
   > Subprocess failed with error 1: ['/usr/bin/python3', '/home/ns3dce/bake/source/ns-3-dce/waf']
 > Error:  Critical dependency, module "dce-ns3-dev" failed 
   For more information call Bake with --debug and/or -v, -vvv, for full verbose mode (bake --help)

Steps to reproduce

Just follow the quick start given at https://www.nsnam.org/docs/dce/manual/html/getting-started.html

Thank a lot for your help!

mas2tg commented 3 years ago

I was actually facing the same problem. I couldn't figure out why it is happening. A quick and dirty way to bypass this problem is to comment out the code in ./myscripts/mt3/wscript and replace it with pass.

def build(bld):
    pass
    #bld.build_a_script('dce', needed = ['core', 'internet', 'dce', 'point-to-point', 'netanim', 'mobility'],
        #                         target='bin/dce-mt3',
        #                         source=['dce-mt3.cc'],
        #                         )
tomhenderson commented 3 years ago

Yes, the problem is that the examples need some alignment with changes to the ns-3 Wi-Fi API that have gone in since ns-3.32. I have a patch (off tree) to fix all of these and will try to commit soon. In the meantime, your change of disabling the problematic examples is fine as a workaround, or you can change:

YansWifiPhyHelper phy = YansWifiPhyHelper::Default ();

to

YansWifiPhyHelper phy;
mas2tg commented 3 years ago

Thank you!

tomhenderson commented 3 years ago

This is now fixed in the master branch.