Bug 2902

Summary: Typos in dependencies of modules cause waf to run indefinitely
Product: ns-3 Reporter: Jörg Christian Kirchhof <christian.kirchhof>
Component: build systemAssignee: Gustavo J. A. M. Carneiro <gjcarneiro>
Status: RESOLVED FIXED    
Severity: enhancement CC: ns-bugs, tomh
Priority: P3    
Version: ns-3.28   
Hardware: All   
OS: All   
Attachments: Patch for the top level wscript

Description Jörg Christian Kirchhof 2018-03-28 05:35:08 UTC
Created attachment 3087 [details]
Patch for the top level wscript

Overview: 
If one of the dependencies in one of the wscripts of one of the modules contains a spelling error, "./waf build" will encounter an endless loop and run indefinitely. The attached bug fixes this. It 


Steps to Reproduce: 
1) Go into the folder of one of the modules, e.g., mobility.
2) Open the wscript in that folder.
3) Introduce a spelling error in one of the dependencies. For example, if you chose the mobility module replace "mobility = bld.create_ns3_module('mobility', ['network'])" by "mobility = bld.create_ns3_module('mobility', ['networks'])". 
Note the additional 's' after 'network'. 
4) Go back to the ns-3 root folder and call "./waf build"

Actual Results: 
The system runs indefinitely. 

Expected Results: 
The system should detect the unresolvable dependency, stop and print an error message. This is what is done by the attached patch.

Build Date & Hardware: 
ns-3.27 and ns-3.28 on Mac OS X.

Additional Builds and Platforms: 
none tested.

Additional Information: none.
Comment 1 Tom Henderson 2018-03-30 12:30:35 UTC
Fixed in changeset 13439:cfe716146de6 (with small modification to error log output).