<div dir="ltr">Maybe a machine change? Let's take this off list for now and we can update when we figure it out. I can't duplicate it.<div><br></div><div>-eric</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Feb 3, 2014 at 4:33 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</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">First error: head file related. Strangely, this code has been there a while, which makes me think that the HAVE_ARC4RANDOM is somehow now showing up as set whereas perhaps it didn't used to be.<div><br>
</div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">tfiala@tfiala2:~/lldb/svn/lgs/build$ make</font></div></div><div><div><font size="1" face="courier new, monospace">make[1]: Entering directory `/mnt/ssd/work/svn/lgs/build/lib/Support'</font></div>
</div><div><div><font size="1" face="courier new, monospace">llvm[1]: Compiling Process.cpp for Debug+Asserts build</font></div></div><div><div><font size="1" face="courier new, monospace">In file included from /mnt/ssd/work/svn/lgs/llvm/lib/Support/Process.cpp:103:0:</font></div>
</div><div><div><font size="1" face="courier new, monospace">/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc: In static member function ‘static unsigned int llvm::sys::Process::GetRandomNumber()’:</font></div>
</div><div><div><font size="1" face="courier new, monospace">/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:368:21: error: ‘arc4random’ was not declared in this scope</font></div></div><div><div><font size="1" face="courier new, monospace"> return arc4random();</font></div>
</div><div><div><font size="1" face="courier new, monospace"> ^</font></div></div><div><div><font size="1" face="courier new, monospace">/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:374:1: warning: control reaches end of non-void function [-Wreturn-type]</font></div>
</div><div><div><font size="1" face="courier new, monospace"> }</font></div></div><div><div><font size="1" face="courier new, monospace"> ^</font></div></div><div><div><font size="1" face="courier new, monospace">/bin/rm: cannot remove `/mnt/ssd/work/svn/lgs/build/lib/Support/Debug+Asserts/Process.d.tmp': No such file or directory</font></div>
</div><div><div><font size="1" face="courier new, monospace">make[1]: *** [/mnt/ssd/work/svn/lgs/build/lib/Support/Debug+Asserts/Process.o] Error 1</font></div></div><div><div><font size="1" face="courier new, monospace">make[1]: Leaving directory `/mnt/ssd/work/svn/lgs/build/lib/Support'</font></div>
</div><div><div><font size="1" face="courier new, monospace">make: *** [all] Error 1</font></div></div><div><font size="1" face="courier new, monospace"><br></font></div></blockquote><font face="arial, helvetica, sans-serif">If I add #include <bsd/stdlib.h>, I get past that:</font><div>
<font face="arial, helvetica, sans-serif"><br></font></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">Index: lib/Support/Unix/Process.inc</font></div>
</div><div><div><font size="1" face="courier new, monospace">===================================================================</font></div></div><div><div><font size="1" face="courier new, monospace">--- lib/Support/Unix/Process.inc<span style="white-space:pre-wrap"> </span>(revision 200620)</font></div>
</div><div><div><font size="1" face="courier new, monospace">+++ lib/Support/Unix/Process.inc<span style="white-space:pre-wrap"> </span>(working copy)</font></div></div><div><div><font size="1" face="courier new, monospace">@@ -38,6 +38,9 @@</font></div>
</div><div><div><font size="1" face="courier new, monospace"> #ifdef HAVE_TERMIOS_H</font></div></div><div><div><font size="1" face="courier new, monospace"> # include <termios.h></font></div></div><div><div><font size="1" face="courier new, monospace"> #endif</font></div>
</div><div><div><font size="1" face="courier new, monospace">+#if defined(HAVE_ARC4RANDOM)</font></div></div><div><div><font size="1" face="courier new, monospace">+# include <bsd/stdlib.h></font></div></div><div>
<div>
<font size="1" face="courier new, monospace">+#endif</font></div></div><div><div><font size="1" face="courier new, monospace"> </font></div></div><div><div><font size="1" face="courier new, monospace"> //===----------------------------------------------------------------------===//</font></div>
</div><div><div><font size="1" face="courier new, monospace"> //=== WARNING: Implementation here must contain only generic UNIX code that</font></div></div><div><br></div></blockquote>Then I start fixing up link errors like the following that now require -lbsd:<div>
<br></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font size="1" face="courier new, monospace">make[2]: Entering directory `/mnt/ssd/work/svn/lgs/build/utils/fpcmp'</font></div></div>
<div><div><font size="1" face="courier new, monospace">llvm[2]: Linking Debug+Asserts executable fpcmp</font></div></div><div><div><font size="1" face="courier new, monospace">/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::GetRandomNumber()':</font></div>
</div><div><div><font size="1" face="courier new, monospace">/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:371: undefined reference to `arc4random'</font></div></div><div><div><font size="1" face="courier new, monospace">collect2: error: ld returned 1 exit status</font></div>
</div><div><div><font size="1" face="courier new, monospace">make[2]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/fpcmp] Error 1</font></div></div><div><div><font size="1" face="courier new, monospace">make[2]: Leaving directory `/mnt/ssd/work/svn/lgs/build/utils/fpcmp'</font></div>
</div><div><div><font size="1" face="courier new, monospace">make[1]: *** [fpcmp/.makeall] Error 2</font></div></div><div><div><font size="1" face="courier new, monospace">make[1]: Leaving directory `/mnt/ssd/work/svn/lgs/build/utils'</font></div>
</div><div><div><font size="1" face="courier new, monospace">make: *** [all] Error 1</font></div></div><div><font size="1" face="courier new, monospace"><br></font></div></blockquote><font face="arial, helvetica, sans-serif">That'll get resolved with something like this (don't know how many platforms would need this fix - this should definitely bee ifdef guarded).</font><div>
<font face="arial, helvetica, sans-serif"><br></font></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><div><font face="courier new, monospace" size="1">tfiala@tfiala2:/mnt/ssd/work/svn/lgs/llvm/utils/fpcmp$ svn diff Makefile</font></div>
</div><div><div><font face="courier new, monospace" size="1">Index: Makefile</font></div></div><div><div><font face="courier new, monospace" size="1">===================================================================</font></div>
</div><div><div><font face="courier new, monospace" size="1">--- Makefile (revision 200725)</font></div></div><div><div><font face="courier new, monospace" size="1">+++ Makefile (working copy)</font></div></div><div>
<div><font face="courier new, monospace" size="1">@@ -12,5 +12,7 @@</font></div></div><div><div><font face="courier new, monospace" size="1"> USEDLIBS = LLVMSupport.a</font></div></div><div><div><font face="courier new, monospace" size="1"> NO_INSTALL = 1</font></div>
</div><div><div><font face="courier new, monospace" size="1"><br></font></div></div><div><div><font face="courier new, monospace" size="1">+LDFLAGS += "-lbsd"</font></div></div><div><div><font face="courier new, monospace" size="1">+</font></div>
</div><div><div><font face="courier new, monospace" size="1"> include $(LEVEL)/Makefile.common</font></div></div></blockquote><div><font face="arial, helvetica, sans-serif"><div><br></div><div>But this is just one of several (more below):</div>
<div><br></div></font></div><blockquote style="margin:0px 0px 0px 40px;border:none;padding:0px"><div><font size="1" face="courier new, monospace"><div><div>llvm[4]: Building Debug+Asserts Archive Library libclang.a</div>
</div>
</font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::GetRandomNumber()':</div></div></font></div>
<div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:371: undefined reference to `arc4random'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>collect2: error: ld returned 1 exit status</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/diagtool] Error 1</div></div>
</font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/diagtool'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>make[3]: *** [diagtool/.makeall] Error 2</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[3]: *** Waiting for unfinished jobs....</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::GetRandomNumber()':</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>
/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:371: undefined reference to `arc4random'</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>collect2: error: ld returned 1 exit status</div>
</div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/clang-format] Error 1</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/clang-format'</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[3]: *** [clang-format/.makeall] Error 2</div>
</div></font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::GetRandomNumber()':</div></div>
</font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:371: undefined reference to `arc4random'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>collect2: error: ld returned 1 exit status</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/arcmt-test] Error 1</div></div>
</font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/arcmt-test'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>make[3]: *** [arcmt-test/.makeall] Error 2</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::GetRandomNumber()':</div>
</div></font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:371: undefined reference to `arc4random'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>collect2: error: ld returned 1 exit status</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/clang-check] Error 1</div></div>
</font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/clang-check'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>make[3]: *** [clang-check/.makeall] Error 2</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/libclang'</div>
</div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: Entering directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/c-index-test'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>llvm[4]: Compiling c-index-test.c for Debug+Asserts build</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>llvm[4]: Linking Debug+Asserts executable c-index-test</div></div></font></div>
<div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libclang.so: undefined reference to `arc4random'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>collect2: error: ld returned 1 exit status</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/c-index-test] Error 1</div></div>
</font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/c-index-test'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>make[3]: *** [all] Error 1</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/build/Debug+Asserts/lib/libLLVMSupport.a(Process.o): In function `llvm::sys::Process::GetRandomNumber()':</div>
</div></font></div><div><font size="1" face="courier new, monospace"><div><div>/mnt/ssd/work/svn/lgs/llvm/lib/Support/Unix/Process.inc:371: undefined reference to `arc4random'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>collect2: error: ld returned 1 exit status</div></div></font></div><div><font size="1" face="courier new, monospace"><div><div>make[4]: *** [/mnt/ssd/work/svn/lgs/build/Debug+Asserts/bin/clang] Error 1</div></div></font></div>
<div><font size="1" face="courier new, monospace"><div><div>make[4]: Leaving directory `/mnt/ssd/work/svn/lgs/build/tools/clang/tools/driver'</div></div></font></div><div><font size="1" face="courier new, monospace"><div>
<div>make[3]: *** [driver/.makeall] Error 2</div></div></font></div></blockquote><div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">We've got it confirmed on another machine here.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">We build with gcc 4.8.2, Ubuntu 12.04 x86_64, configure-based, with the only non-Ubuntu components being the gcc and a newer libedit required by some recent changes to lldb.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Generally this has been rock solid. I don't know if something caused the </font><span style="font-family:'courier new',monospace;font-size:x-small">HAVE_ARC4RANDOM </span><font face="arial, helvetica, sans-serif">flag to change all of a sudden, but if it did, it happened to two machines simultaneously.</font></div>
<div><font face="arial, helvetica, sans-serif"><br></font></div><div><font face="arial, helvetica, sans-serif">Any thoughts?</font></div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><br><div class="gmail_quote">
On Mon, Feb 3, 2014 at 4:08 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</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">Ah. Weird. I'm not seeing anything. Can you paste the errors you're seeing?<span><font color="#888888"><div>
<br></div><div>-eric</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 3:57 PM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</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">It's in llvm and clang code. I haven't gotten to any of the lldb code yet.</div><div>
<div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Feb 3, 2014 at 1:33 PM, Eric Christopher <span dir="ltr"><<a href="mailto:echristo@gmail.com" target="_blank">echristo@gmail.com</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">Weird. Probably best to send mail to lldb@?<div><br></div><div>-eric</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote"><div><div>On Mon, Feb 3, 2014 at 11:24 AM, Todd Fiala <span dir="ltr"><<a href="mailto:tfiala@google.com" target="_blank">tfiala@google.com</a>></span> wrote:<br>
</div></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div><div dir="ltr">Hey all,<div><br></div><div>FYI -</div><div><br></div><div>We're seeing a whole host of errors around requiring arc4random and linkage errors building llvm/clang/lldb from top of tree. This is on lldb builds with Ubuntu 12.04 x86_64, using gcc 4.8.2 and configure-based builds. This appeared to crop up sometime since Friday morning. What's the right fix for that? Looks to be a dependency on libbsd?</div>
<span><font color="#888888">
<div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small"><td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">
Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px">
<a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34)">tfiala@google.com</span></a> |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px">
<font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div></font></span></div>
<br></div></div>_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:LLVMdev@cs.uiuc.edu" target="_blank">LLVMdev@cs.uiuc.edu</a> <a href="http://llvm.cs.uiuc.edu" target="_blank">http://llvm.cs.uiuc.edu</a><br>
<a href="http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev</a><br>
<br></blockquote></div><br></div>
</blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br><br clear="all"><div><br></div>-- <br><div dir="ltr"><table cellspacing="0" cellpadding="0" style="color:rgb(136,136,136);font-family:'Times New Roman'"><tbody><tr style="color:rgb(85,85,85);font-family:sans-serif;font-size:small">
<td nowrap style="border-top-style:solid;border-top-color:rgb(213,15,37);border-top-width:2px">Todd Fiala |</td><td nowrap style="border-top-style:solid;border-top-color:rgb(51,105,232);border-top-width:2px"> Software Engineer |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(0,153,57);border-top-width:2px"> <a href="mailto:tfiala@google.com" style="color:rgb(17,85,204)" target="_blank"><span style="background-color:rgb(255,255,204);color:rgb(34,34,34);background-repeat:initial initial">tfiala@google.com</span></a> |</td>
<td nowrap style="border-top-style:solid;border-top-color:rgb(238,178,17);border-top-width:2px"><font color="#1155cc"> <a>650-943-3180</a></font></td></tr></tbody></table><br></div>
</div>
</div></div></blockquote></div><br></div>