[Ns-developers] Upgrade ns-3 to waf 1.6
gjcarneiro at gmail.com
Fri Sep 9 03:17:42 PDT 2011
On Fri, Sep 9, 2011 at 05:41, Tom Henderson <tomh at tomh.org> wrote:
> - I had to simplify to cut the amount of WAF hacks needed:
>> 1. --enable-static-and-shared is gone;
>> 2. There's no build subdirectory anymore, now it's build/ns3,
>> build/utils, etc.
>> To mitigate the above changes, I suggest users make use of the -o
>> of waf to select an alternative build dir.
>> waf configure -d debug -o debug; waf build ---> this will create a build
>> tree 'debug' with debug mode ns3 objects
> It wasn't clear to me from the above whether you are saying that there is
> no build subdirectory whatsoever, or whether you don't have e.g.
> build/debug, build/optimized by default (when you don't pass the -o option).
> I think you are saying that if you don't specify -o, but you change from
> debug to optimized, it will just overwrite what is in ns-3-dev/build/, but
> could you clarify?
When you don't pass the -o option, the build directory is 'build', with no
subdirectory. Changing from debug to optimized will overwrite.
Well, you could argue that currently you switch between shared and static
and it also overwrites the build directory if the optimization level is the
same. Really, there could be numerous combinations of build options that
produce different build objects: shared vs static, python version, gcc
version, debug level, etc. Why is just the debug level so special to
warrant different builds by default, and not the others? At least this way
the end user is free to choose whatever build directory structure makes
sense to him.
>> To build both static and shared ns-3, you can simply build it twice:
>> 1. waf configure -d debug -o shared; waf build
>> 2. waf configure -d optimized --enable-static -o static; waf build
>> The above will build shared ns3 into the directory 'shared', and static
>> into 'static'.
>> This is a bit more typing for the end user, but more flexible (you can
>> as many build directories as you want for different combinations of
>> parameters, e.g. different python versions), and lets me cut some WAF
>> "hacks" that would take me too much time to figure out how replicate in
>> new WAF version.
>> Is this change acceptable to the ns-3 community? If so, I will proceed to
>> eventually upgrade ns-3 to the new waf. There's plenty of bugs to fix,
>> code to cleanup.
> Seems like a good idea to me.
> - Tom
Gustavo J. A. M. Carneiro
INESC Porto, UTM, WiN, http://win.inescporto.pt/gjc
"The universe is always one step beyond logic." -- Frank Herbert
More information about the Ns-developers