<div dir="ltr">Spyros et al,<div><br></div><div>Apparently something was messed up with my environment variables.  I found some peculiar errors regarding CryptoPP that I hadn't noticed before, and did some research on it.</div><div><br></div><div>I found an ndnSIM thread: <a href="http://www.lists.cs.ucla.edu/pipermail/ndnsim/2015-November/002222.html">http://www.lists.cs.ucla.edu/pipermail/ndnsim/2015-November/002222.html</a></div><div><br></div><div>I attempted the solution used there, so I executed the following:</div><div><br></div><div><pre style="white-space:pre-wrap;color:rgb(0,0,0)">LD_LIBRARY_PATH="/usr/local:$LD_LIBRARY_PATH"
PKG_CONFIG_PATH="/usr/local/pkgconfig:$PKG_CONFIG_PATH"
PATH="/usr/local/bin:$PATH"
LIBRARY_PATH="/usr/local/lib:$LIBRARY_PATH"
INCLUDE_PATH="/usr/local/include:$INCLUDE_PATH"
export LD_LIBRARY_PATH PKG_CONFIG_PATH PATH LIBRARY_PATH INCLUDE_PATH</pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><br></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">Apparently something was messed up with my environment variables.  <b>It appears to be working now!</b>  Woohoo!</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">Thanks everyone,</font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif"><br></font></pre><pre style="white-space:pre-wrap;color:rgb(0,0,0)"><font face="arial, helvetica, sans-serif">John</font></pre></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Mon, May 22, 2017 at 12:03 AM, John Baugh <span dir="ltr"><<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div>Spyros et al.,<br><br></div><div>I tend to think I have a reasonable grasp of compilation and linking in general, which is precisely why some of what is going on is so frustrating.  Originally, before running ./waf distclean, I was getting a compiler error.  Now that I ran distclean, I get a linker error which seems to imply the object file is simply not being build or in a location of which my scenario is unaware.<br><br>I have been reading through the Waf Book online carefully, and looking through the wscripts as well.<br><br></div><div>I do appreciate your patience.  I have bits and pieces of Linux-based development in my career as both a software engineer in industry as well as my Masters thesis research, but this is a far larger scale, and I was previously not familiar with the WAF tool at all, and some of the setup.<br><br></div><div>However, <b>per your question</b>, I have a link to a folder on my Google Docs to the following files (as a full repository share would probably be a bit overkill):<br><div style="margin-left:40px">- forwarder.hpp<br></div><div style="margin-left:40px">- forwarder.cpp<br></div><div style="margin-left:40px">- ndn-simple2.cpp (my rather simple scenario)<br></div><div style="margin-left:40px"><b>LINK:  <a href="https://drive.google.com/drive/folders/0By9ufeKqmJYYTkhBVnNTVmg3RTg?usp=sharing" target="_blank">https://drive.google.com/<wbr>drive/folders/<wbr>0By9ufeKqmJYYTkhBVnNTVmg3RTg?<wbr>usp=sharing</a></b><br></div><br></div><div>The Forwarder object is obtained, as present in ndn-simple2.cpp but replicated here for convenience, thusly:<br><br><span style="font-family:monospace,monospace"><b>  /*</b><br></span><b><span style="font-family:monospace,monospace">      JPB - Added 5/18/2017<br>      Testing forwarder compilation and method(s)<br>  */<br>  //get l3protocol<br>  Ptr<ndn::L3Protocol> l3protocol = (nodes.Get(0))->GetObject<ndn:<wbr>:L3Protocol>();<br><br> <span style="background-color:rgb(255,255,0)"> //get forwarder<br>  nfd::Forwarder& forwarder = *l3protocol->getForwarder();</span><br><br><span style="background-color:rgb(255,255,0)">  forwarder.printMessage();</span></span><br></b><br></div><div><br></div><div>I appreciate your help!<br><br></div>Thanks,<br><br></div>John<br></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Sun, May 21, 2017 at 11:00 PM, Spyridon (Spyros) Mastorakis <span dir="ltr"><<a href="mailto:mastorakis@cs.ucla.edu" target="_blank">mastorakis@cs.ucla.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Hi John,<div><br></div><div>first of all, I would suggest that you take a look at how an NDN code repository is built and installed on your system. I would also suggest that you take a look at how a compiler and linker work and how you should write wscripts.</div><div><br></div><div>For all the opens-source software projects that I have seen so far, there is the common convention that code under the src/ directory is supposed to be modified and compiled, while the compiled code and most probably the included header files are supposed to be under the build/ directory.</div><div><br></div><div>It is not clear to me what is wrong in your case. I have followed a similar approach a number of times and it worked fine.</div><div><br></div><div>How do you get the Forwarder instance of a simulated node in your simulation scenario?</div><div><br></div><div>Thanks,</div><div><br></div><div><div>
<div><div><div><span style="float:none;display:inline!important">Spyridon (Spyros) Mastorakis</span><br><span style="float:none;display:inline!important">Personal Website: </span><a href="http://cs.ucla.edu/~mastorakis/" target="_blank">http://cs.ucla.edu/~m<wbr>astorakis/</a><br><span style="float:none;display:inline!important">Internet Research Laboratory</span><br><span style="float:none;display:inline!important">Computer Science Department</span><br><span style="float:none;display:inline!important">UCLA</span></div><div><br></div></div></div></div><div><div class="m_7646388330889665500h5"><div><blockquote type="cite"><div>On May 21, 2017, at 3:43 PM, John Baugh <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>> wrote:</div><br class="m_7646388330889665500m_-4488509622681004407Apple-interchange-newline"><div><div dir="auto">Still no progress since last night sadly.<div dir="auto"><br></div><div dir="auto">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.</div><div dir="auto"><br></div><div dir="auto">Thanks</div><div dir="auto"><br></div><div dir="auto">John</div><br><div class="gmail_extra" dir="auto"><br><div class="gmail_quote">On May 21, 2017 2:25 AM, "John Baugh" <<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>> wrote:<br type="attribution"><blockquote class="m_7646388330889665500m_-4488509622681004407quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Greetings again friends,<div><br></div><div>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.)</div><div><br></div><div>So, related to this:</div><div><br></div><div>1.)  There appear to be multiple waf copies in different directories.  Under what circumstances would you run, say, the waf inside the <b>NFD </b>directory as opposed to the one at the top level <b>ns-3</b> directory?</div><div><br></div><div>2.)  I ran the following from the <b>ns-3 </b>directory:</div><div><blockquote style="margin:0 0 0 40px;border:none;padding:0px">* ./waf distclean<br>* ./waf configure<br>*./waf<br>*sudo waf install<br><br><br></blockquote>    If you recall, I modified the <b>forwarder.cpp</b> file and the <b>forwarder.hpp </b>file in the src/ndnSIM/NFD/daemon/fw directory to contain a <b>printMessage</b> method.  I made sure it was public.</div><div><br></div><div>    After the ./waf commands aforementioned, I checked the ns-3/build/ns3/ndnSIM/NFD/daem<wbr>on/fw directory, and the <b>forwarder.hpp </b>file <i>does seem to be a copy </i>of the one from the src/ndnSIM/NFD.... directory.  </div><div><br></div><div>    But I am <b>now getting a linker error:</b></div><div><b><br></b></div><div>    "... scenarios/ndn-simple2.cpp:120: undefined reference to 'nfd::Forwarder::printMessage(<wbr>)</div><div>         collect2: error: ld returned 1 exit status"</div><div><br></div><div><br></div><div>Ideas?</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div><div class="m_7646388330889665500m_-4488509622681004407elided-text"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, May 19, 2017 at 2:35 AM, John Baugh <span dir="ltr"><<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Greetings again friends,<div><br></div><div>I'm up working on this trying to get my scenario to work with a custom forwarder again at nearly 3 a.m. <i>on my birthday</i>.  I'm not sure if that's dedication or insanity.  ;)</div><div><br></div><div>I spent another 4-5 hours trying to figure out this specific problem tonight, but with no luck.  I have found the following:</div><div><br></div><div>1.  forwarder.hpp lives in <b>both </b>ns-3/build/ns3/ndnSIM/NFD/daem<wbr>on/fw <b>as well as </b>ns-3/src/ndnSIM/NFD/daemon/fw</div><div>     The later also has a forwarder.cpp in it.</div><div><br></div><div>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)</div><div><br></div><div>3.  Why is there a <b>waf </b>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)?</div><div><br></div><div>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.</div><div><br></div><div>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.</div><div><br></div><div>Thanks,</div><div><br></div><div>John</div></div><div class="m_7646388330889665500m_-4488509622681004407m_-6744468358324047878HOEnZb"><div class="m_7646388330889665500m_-4488509622681004407m_-6744468358324047878h5"><div class="gmail_extra"><br><div class="gmail_quote">On Thu, May 18, 2017 at 2:47 AM, John Baugh <span dir="ltr"><<a href="mailto:jpbaugh@umich.edu" target="_blank">jpbaugh@umich.edu</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Greetings ndnSIM friends,<div><br></div><div><br></div><div>I've spent the last few days working on trying to modify the Forwarder class (which I did - I modified <b>ns-3/src/ndnSIM/NFD/daemon/fw/<wbr>forwarder.[hpp, cpp]</b>)</div><div><br></div><div>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.</div><div><br></div><div>What I did was add a method (the prototype to .hpp and definition to .cpp) called <b>printMessageForTest())</b></div><div><b><br></b></div><div>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.</div><div><br></div><div>Any clue what's going on?</div><div><br></div><div>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.</div><div><br></div><div>Looking forward to hearing from you,</div><div><br></div><div>John</div></div>
</blockquote></div><br></div>
</div></div></blockquote></div><br></div>
</div></blockquote></div></div></div></div></blockquote></div><br></div></div></div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div>