<div dir="ltr"><div class="im">On Wed, Jan 15, 2014 at 7:32 AM, Anand S <span dir="ltr"><<a href="mailto:anandtech22@gmail.com" target="_blank">anandtech22@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Hi All,</div><div>      Iam trying to build wanproxy code (taken from trunk) in Ubuntu.</div>

<div>     When I do make in the top directory I get the following error -</div><div>     undefined reference to `uinet_initialize_thread' in common/thread/thread_posix.cc:214</div>
<div>     and </div><div>     undefined reference to `clock_gettime' in common/time/time.cc:42.</div><div>It looks like c++ code will not reference from c code if they are not properly linked.</div><div><br></div></div>

</blockquote><div><br></div></div><div>Hi Anand,<br></div><div><br></div><div>There were a couple of issues here that I have fixed on trunk this evening.<br><br>The
 first was that the integration of libuinet into the wanproxy build 
system was not complete, and as a result many sample programs would fail
 to build with errors the same or similar to the thread_posix.cc problem
 above.<br>
<br></div><div>The second was that, at least on Ubuntu, librt had to be added to the link stage to pick up clock_gettime.<br></div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div dir="ltr"><div>
<br></div><div>When I try to compile lib/libuinet separately I get the following error-</div><div>uinet_arc4random.c:35:26: fatal error: openssl/rand.h: No such file or directory</div><div>This file is not present in the wanproxy code.</div>

</div></blockquote><div><br></div></div><div>You need to have libssl-dev installed (sudo apt-get install libssl-dev).<br><br></div><div>You will also need to have netmap installed.<br></div><div class="im"><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">

<div dir="ltr">
<div>  </div><div>Please tell me what should I do to build wanproxy along with uinet..</div></div></blockquote><div><br></div></div><div>Currently, you must build libuinet first, then build wanproxy.<br><br></div><div>On Ubuntu 12.04.3 LTS, I found that I had to manually set COMPILER_TYPE to gcc to build libuinet, as in:<br>

</div><div>....lib/libuinet$ make COMPILER_TYPE=gcc<br><br></div><div>Also,
 if your netmap includes are in a non-standard place, you will have to 
set NETMAP_INCLUDES to that location on the libuinet make command line.<br>
</div><div> <br><br><br></div><div>Even given all of the above, you will
 still have the issue that on trunk, the epoll support for Linux is 
currently broken and needs to be updated (see <a href="http://lists.wanproxy.org/pipermail/wanproxy-wanproxy.org/2013-December/000746.html" target="_blank">http://lists.wanproxy.org/pipermail/wanproxy-wanproxy.org/2013-December/000746.html</a>).  Also, if you want *all* the sample programs to build, a similar fix will have to be done for the select support.<br>

</div><div><br></div><div>And finally, beyond a test program or two, 
libuinet features are currently not available to exercise generally in 
the suite of wanproxy programs, as selection of libuinet as the network 
backend has yet to be plumbed through the configuration system.<div class=""><div id=":1kj" class="" tabindex="0"><img class="" src="https://mail.google.com/mail/u/0/images/cleardot.gif"></div></div><span class=""><font color="#888888"><br>

<br></font></span></div><span class=""><font color="#888888"><div>-Patrick</div></font></span><div class="gmail_extra"><br><br><br></div></div>