[ndnSIM] Trying to re-compile ndnSIM class Forwarder

John Baugh jpbaugh at umich.edu
Sun May 21 15:43:48 PDT 2017

Still no progress since last night sadly.

If any of you have a suggestion or answers to any of my questions below
please give your input.  I think I'm fairly close, but I'm missing
something I believe.



On May 21, 2017 2:25 AM, "John Baugh" <jpbaugh at umich.edu> wrote:

Greetings again friends,

After some good advice from Ashlesh, I was able to get a different error
(seems to be a linker error now instead of a compiler error... progress is
progress I suppose.)

So, related to this:

1.)  There appear to be multiple waf copies in different directories.
Under what circumstances would you run, say, the waf inside the *NFD *directory
as opposed to the one at the top level *ns-3* directory?

2.)  I ran the following from the *ns-3 *directory:

* ./waf distclean
* ./waf configure
*sudo waf install

    If you recall, I modified the *forwarder.cpp* file and the *forwarder.hpp
*file in the src/ndnSIM/NFD/daemon/fw directory to contain a
*printMessage* method.
I made sure it was public.

    After the ./waf commands aforementioned, I checked the
ns-3/build/ns3/ndnSIM/NFD/daemon/fw directory, and the *forwarder.hpp
*file *does
seem to be a copy *of the one from the src/ndnSIM/NFD.... directory.

    But I am *now getting a linker error:*

    "... scenarios/ndn-simple2.cpp:120: undefined reference to
         collect2: error: ld returned 1 exit status"




On Fri, May 19, 2017 at 2:35 AM, John Baugh <jpbaugh at umich.edu> wrote:

> Greetings again friends,
> I'm up working on this trying to get my scenario to work with a custom
> forwarder again at nearly 3 a.m. *on my birthday*.  I'm not sure if
> that's dedication or insanity.  ;)
> I spent another 4-5 hours trying to figure out this specific problem
> tonight, but with no luck.  I have found the following:
> 1.  forwarder.hpp lives in *both *ns-3/build/ns3/ndnSIM/NFD/daemon/fw *as
> well as *ns-3/src/ndnSIM/NFD/daemon/fw
>      The later also has a forwarder.cpp in it.
> 2.  Which one of the copies (?) of forwarder.hpp mentioned above am I
> supposed to change / modify for my scenarios to use it instead of the
> default one?  Where is the corresponding forwarder.cpp file for the one in
> ns-3/build path (there is one in the ns-3/src path, but none to be found in
> ns-3/build path mentioned above)
> 3.  Why is there a *waf *in so many different directories?  They seem to
> be specialized to the different components of ndnSIM, such as NFD, ndn-cxx,
> and specific scenarios -  Perhaps I'm using the wrong one(s)?
> 4.  My scenarios are still saying that the Forwarder class doesn't have a
> printMessageForTest method, even though I have it declared in both the
> copies of forwarder.hpp, and have it defined in forwarder.cpp.  I tried
> recompiling using ./waf in various directories, and I cannot find a
> solution to this problem.
> I appreciate your patience again.  This is a really irritating situation,
> and I'm fairly certain there's something simple I'm missing.  Any help
> would be greatly appreciated.
> Thanks,
> John
> On Thu, May 18, 2017 at 2:47 AM, John Baugh <jpbaugh at umich.edu> wrote:
>> Greetings ndnSIM friends,
>> I've spent the last few days working on trying to modify the Forwarder
>> class (which I did - I modified *ns-3/src/ndnSIM/NFD/daemon/fw/forwarder.[hpp,
>> cpp]*)
>> However, ./waf doesn't seem to work properly.  I even did a ./waf clean
>> and ./waf build.  On one of the runs of ./waf I did notice it (apparently?)
>> successfully re-build the forwarder.cpp file.
>> What I did was add a method (the prototype to .hpp and definition to
>> .cpp) called *printMessageForTest())*
>> I would assume that after ndnSIM was rebuilt with ./waf that my scenario,
>> which calls printMessageForTest on the forwarder would actually work, but
>> it doesn't recognize it.
>> Any clue what's going on?
>> Alternatively, if anyone could give an appropriate procedure for ensuring
>> all changes make it into the system when modifications of actual ndnSIM
>> files are made, it would be appreciated.
>> Looking forward to hearing from you,
>> John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.lists.cs.ucla.edu/pipermail/ndnsim/attachments/20170521/7ead8034/attachment.html>

More information about the ndnSIM mailing list