"building with bake" questions

101 views
Skip to first unread message

douglasleer

unread,
Oct 2, 2019, 3:40:05 AM10/2/19
to ns-3-users
A novice user here.

The tutorial has instructions on how to build ns-3 with bake.
The instructions work. However, the tutorial doesn't have correct instructions on how to run an example if the user used bake to build.

Because, "./waf --run hello-simulator" will give the following error:
The project was not configured: run "waf configure" first!

If I configure using waf and try to run "./waf --run hello-simulator", it seems that it will just rebuild ns-3 and run the example.

So, what's the point of building with bake? 
If we can build with bake, can we run an example also with bake?

Hope to have some clarifications.

Thanks in advance!


Tom Henderson

unread,
Oct 2, 2019, 4:47:07 PM10/2/19
to ns-3-...@googlegroups.com, douglasleer
Hi, this is an issue that I have known about and after testing some more
today, I recommend that for now, work around this by calling bake with
python3.

e.g.

$ python3 bake.py configure -e ns-3-allinone

$ python3 bake.py download

$ python3 bake.py build


and then you will not have that issue.  Otherwise, you will have to
reconfigure.  This is due to some python2 and python3 issues with Waf;
for more details, see:

https://gitlab.com/nsnam/bake/issues/3

- Tom


douglasleer

unread,
Oct 3, 2019, 8:52:08 AM10/3/19
to ns-3-users
Thank you so much for your reply. The workaround works for me!
However, do you think we should update the ns-3 tutorial to use your workaround?

Also, I feel like that the "Getting Started" chapter of the tutorial can be better organized.
When we use different methods (tarball, git, bake) to download ns-3, we will have different directories. 
The tutorial discusses downloading and then building, and then running, for the 3 methods at the same time. It is kinda of confusing.
I would prefer that it discusses each method separately, i.e., the downloading, building, and running for each method. And then, move to another method.
In this way, if a user (especially a beginner) chooses one method, he/she doesn't need to worry too much about the other method for the moment.

Another "obviously" confusing organization:
The tutorial has:
"3.2.1 Downloading a release of ns-3 as a source archive"
"3.3 Downloading ns-3 using Git"
"3.3.1 Downloading ns-3 Using Bake"
I would prefer that it has:
"3.3.1 Downloading a release of ns-3 as a source archive"
"3.3.2 Downloading ns-3 using Git"
"3.3.3 Downloading ns-3 Using Bake"


This is from a beginner's perspective.

Thanks again!

Tom Henderson

unread,
Oct 3, 2019, 10:38:12 AM10/3/19
to ns-3-...@googlegroups.com, douglasleer
On 10/3/19 5:52 AM, douglasleer wrote:
Thank you so much for your reply. The workaround works for me!
However, do you think we should update the ns-3 tutorial to use your workaround?

Yes, I will do so.


Also, I feel like that the "Getting Started" chapter of the tutorial can be better organized.
When we use different methods (tarball, git, bake) to download ns-3, we will have different directories. 
The tutorial discusses downloading and then building, and then running, for the 3 methods at the same time. It is kinda of confusing.
I would prefer that it discusses each method separately, i.e., the downloading, building, and running for each method. And then, move to another method.
In this way, if a user (especially a beginner) chooses one method, he/she doesn't need to worry too much about the other method for the moment.

OK.  I am waiting for some tutorial rewrites from Mohit Tahiliani and will see if this concern is addressed; if not, we can try to separately address it.


Another "obviously" confusing organization:
The tutorial has:
"3.2.1 Downloading a release of ns-3 as a source archive"
"3.3 Downloading ns-3 using Git"
"3.3.1 Downloading ns-3 Using Bake"
I would prefer that it has:
"3.3.1 Downloading a release of ns-3 as a source archive"
"3.3.2 Downloading ns-3 using Git"
"3.3.3 Downloading ns-3 Using Bake"


OK, this may be solved in the above reorganization.

Thanks for the feedback.  It is useful to hear from newcomers as to what is confusing because, over time, some documentation can drift out of alignment, or problems are not apparent to those of us who have been working with the code for so long.

- Tom

Dawei Li

unread,
Oct 3, 2019, 12:00:26 PM10/3/19
to ns-3-users
Hi Tom,

Thanks for getting back to me! Let me know if I can be of help.

Sincerely,
Dawei
Reply all
Reply to author
Forward
0 new messages