Bug 1540 - waf not finding click libraries
waf not finding click libraries
Status: RESOLVED FIXED
Product: bake
Classification: Unclassified
Component: bakeconf.xml
unspecified
PC Linux
: P3 normal
Assigned To: Daniel Camara
:
Depends on:
Blocks: 1542
  Show dependency treegraph
 
Reported: 2012-11-30 16:15 EST by Tom Henderson
Modified: 2013-04-26 17:42 EDT (History)
4 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Tom Henderson 2012-11-30 16:15:55 EST
./bake.py -c ns-3-allinone
./bake.py install

cd source/ns-3-dev

./waf configure --enable-examples --with-nsclick=../../build/lib 

fails.  So does

./waf configure --enable-examples --with-nsclick=../click

or use of absolute instead of relative path.

However, if I cd to ../click and follow these instructions:

http://www.read.cs.ucla.edu/click/nsclick

I can get waf to find it the next time I try:

./waf configure --enable-examples --enable-tests --with-nsclick=../click

Before closing this bug, I would like to suggest that the following sequence works:

./bake.py -c ns-3-allinone
./bake.py install
cd source/ns-3-dev
./waf configure --enable-examples --enable-tests --with-nsclick=../../build/lib

results in:
NS-3 Click Integration        : enabled
Comment 1 Tom Henderson 2012-12-10 00:17:10 EST
downgrading for post-release fix
Comment 2 Lalith Suresh 2012-12-10 05:06:19 EST
(In reply to comment #0)
> ./bake.py -c ns-3-allinone
> ./bake.py install
> 
> cd source/ns-3-dev
> 
> ./waf configure --enable-examples --with-nsclick=../../build/lib 
> 
> fails.  So does
> 
> ./waf configure --enable-examples --with-nsclick=../click
> 
> or use of absolute instead of relative path.
> 
> However, if I cd to ../click and follow these instructions:
> 
> http://www.read.cs.ucla.edu/click/nsclick
> 
> I can get waf to find it the next time I try:
> 
> ./waf configure --enable-examples --enable-tests --with-nsclick=../click
> 
> Before closing this bug, I would like to suggest that the following sequence
> works:
> 
> ./bake.py -c ns-3-allinone
> ./bake.py install
> cd source/ns-3-dev
> ./waf configure --enable-examples --enable-tests
> --with-nsclick=../../build/lib
> 
> results in:
> NS-3 Click Integration        : enabled

Sorry I saw this late.

So, if I understand correctly, the problem is with regards to waf auto-detecting the nsclick lib based on the path guess, right?
Comment 3 Tom Henderson 2013-04-25 10:03:41 EDT
> 
> So, if I understand correctly, the problem is with regards to waf
> auto-detecting the nsclick lib based on the path guess, right?


I just looked at this again now.  I'll change the title, it is more a waf issue.

This works in the RC1 release candidate:

./waf configure --with-nsclick=../../build

I had erroneously assumed that it needed to be ../../build/lib/

Mitch is planning to update the wscript to allow it to auto-find ../../build, if present.

Separately, though, this does not work even after click has been built one-level up:

./waf configure --with-nsclick=../ns-click-3.17

which is how click is documented to work in the manual, currently.
Comment 4 Mitch Watrous 2013-04-25 14:08:30 EDT
I think the problem is with the version of click.

I put an earlier version of click (click 1.7) in the same directory and the relative path to it worked:

    ./waf configure --enable-tests --enable-examples --with-nsclick=../click-1.7.0rc1
Comment 5 Tom Henderson 2013-04-25 14:43:40 EDT
(In reply to comment #4)
> I think the problem is with the version of click.
> 
> I put an earlier version of click (click 1.7) in the same directory and the
> relative path to it worked:
> 
>     ./waf configure --enable-tests --enable-examples
> --with-nsclick=../click-1.7.0rc1

OK, that would explain it.

I think we need to fix the --with-nsclick=../click behavior in the ns-3-dev/src/click/wscript for the current way that click is built.

We need to be advising people to grab the latest click from git, now that ns-3's click requires their latest.

e.g. this ought to work:

cd ns-3-allinone
git clone git://github.com/kohler/click.git
cd click/
build it as instructed in the ns-3 manual
cd ../ns-3-dev
./waf configure --with-nsclick=../click

should work.  Probably click is now putting its build objects somewhere else that we need to account for when peeking into its source/ directory.
Comment 6 Lalith Suresh 2013-04-25 15:47:08 EDT
> We need to be advising people to grab the latest click from git, now that
> ns-3's click requires their latest.
> 
> e.g. this ought to work:
> 
> cd ns-3-allinone
> git clone git://github.com/kohler/click.git
> cd click/
> build it as instructed in the ns-3 manual
> cd ../ns-3-dev
> ./waf configure --with-nsclick=../click
> 
> should work.  Probably click is now putting its build objects somewhere else
> that we need to account for when peeking into its source/ directory.

Yes, this is the workflow that is typically used by ns-3-click users and it still happens to be working.
Comment 7 Lalith Suresh 2013-04-25 15:53:42 EDT
(In reply to comment #6)
> > We need to be advising people to grab the latest click from git, now that
> > ns-3's click requires their latest.
> > 
> > e.g. this ought to work:
> > 
> > cd ns-3-allinone
> > git clone git://github.com/kohler/click.git
> > cd click/
> > build it as instructed in the ns-3 manual
> > cd ../ns-3-dev
> > ./waf configure --with-nsclick=../click
> > 
> > should work.  Probably click is now putting its build objects somewhere else
> > that we need to account for when peeking into its source/ directory.
> 
> Yes, this is the workflow that is typically used by ns-3-click users and it
> still happens to be working.

That said, I'll push an update to the documentation to point users to the github repo.
Comment 8 Lalith Suresh 2013-04-25 16:10:01 EDT
(In reply to comment #7)
> (In reply to comment #6)
> > > We need to be advising people to grab the latest click from git, now that
> > > ns-3's click requires their latest.
> > > 
> > > e.g. this ought to work:
> > > 
> > > cd ns-3-allinone
> > > git clone git://github.com/kohler/click.git
> > > cd click/
> > > build it as instructed in the ns-3 manual
> > > cd ../ns-3-dev
> > > ./waf configure --with-nsclick=../click
> > > 
> > > should work.  Probably click is now putting its build objects somewhere else
> > > that we need to account for when peeking into its source/ directory.
> > 
> > Yes, this is the workflow that is typically used by ns-3-click users and it
> > still happens to be working.
> 
> That said, I'll push an update to the documentation to point users to the
> github repo.

changeset:   9717:410a26f21852
tag:         tip
user:        Lalith Suresh <suresh.lalith@gmail.com>
date:        Thu Apr 25 22:08:40 2013 +0200
summary:     Update Click build instructions to point to Click github repository
Comment 9 Tom Henderson 2013-04-26 17:42:33 EDT
works now