<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal">Hi,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I get the following error while building compiler-rt:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal" style="margin-left:.5in">/slowfs/msret_s1_us03/ajost/src/llvm-3.3.src/projects/compiler-rt/lib/sanitizer_common/sanitizer_stoptheworld_linux.cc:315:22: error: no matching function for call to 'clone'<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">  pid_t tracer_pid = clone(TracerThread, tracer_stack.Bottom(),<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">                     ^~~~~<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">/usr/include/bits/sched.h:71:12: note: candidate function not viable: requires 4 arguments, but 7 were provided<o:p></o:p></p>
<p class="MsoNormal" style="margin-left:.5in">extern int clone (int (*__fn) (void *__arg), void *__child_stack,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Inside sched.h, clone is indeed declared with four arguments, but, interestingly, the man page for clone provides this prototype:<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">       #include <sched.h><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">       int clone(int (*fn)(void *), void *child_stack,<o:p></o:p></p>
<p class="MsoNormal">                 int flags, void *arg, ...<o:p></o:p></p>
<p class="MsoNormal">                 /* pid_t *pid, struct user_desc *tls, pid_t *ctid */ );<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I’m running RedHat EL 2.6.9-89.ELlargesmp without root privileges.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Is this a bug in LLVM?  Do I just have an old version of clone that’s not supported by LLVM?  I can try just removing the last three arguments from the compiler-rt source, but is that the best solution?  If someone can point out a clean
 way to fix this, then I don’t mind trying to contribute a patch (I would need to learn how).<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Also, is this something that autoconf should have detected?  What should it have done about it?<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">-Andy <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>