<div dir="ltr">+rafael who is the real author of the patch.<div><br></div><div>I think we should check if CPU_COUNT is available using CMake.</div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Oct 4, 2017 at 11:17 AM, Philip Reames <span dir="ltr"><<a href="mailto:listmail@philipreames.com" target="_blank">listmail@philipreames.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<p>+ Rui, the patch author<br>
</p>
<p>Do we know what the oldest glibc which works with this patch is?<br>
</p>
<p>For context, the most recent REHL 5 ships with glibc 2.5. REHL 6
ships with 2.12 and REHL ships with 2.17. I have evidence that
this breaks at least on Centos 6.4 which is derived from REHL 6.
<br>
</p>
<p>This appears to break on anything REHL 6 (or earlier) derived. I
think this patch needs to be reverted. Thoughts?<br>
</p>
<p>Philip<br>
</p><div><div class="h5">
<br>
<div class="m_-5227494766079339797moz-cite-prefix">On 10/04/2017 12:08 AM, Serguei Katkov
via llvm-dev wrote:<br>
</div>
</div></div><blockquote type="cite"><div><div class="h5">
<div class="m_-5227494766079339797WordSection1">
<p class="MsoNormal">Hi All,<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">The landed patch <a href="https://reviews.llvm.org/D38481" target="_blank">https://reviews.llvm.org/<wbr>D38481</a>
introduced the usage of CPU_COUNT defined in glibc sched.h
header.<u></u><u></u></p>
<p class="MsoNormal">I failed to find this symbol in sched.h of
glibc version 2.5-24, so compilation just fails.<u></u><u></u></p>
<p class="MsoNormal"><span>/home/dolphin/merge-from-<wbr>upstream-area/ws/pristine/lib/<wbr>Support/Threading.cpp:
In function ‘unsigned int llvm::hardware_concurrency()’:<u></u><u></u></span></p>
<p class="MsoNormal"><span>/home/dolphin/merge-from-<wbr>upstream-area/ws/pristine/lib/<wbr>Support/Threading.cpp:80:26:
error: ‘CPU_COUNT’ was not declared in this scope<u></u><u></u></span></p>
<p class="MsoNormal"><span> return CPU_COUNT(&Set);<u></u><u></u></span></p>
<p class="MsoNormal"><span> ^<u></u><u></u></span></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">It is buildable with newest version of
glibc. <u></u><u></u></p>
<p class="MsoNormal">I tried to find a requirements for glibc
version in LLVM documentation but failed.<u></u><u></u></p>
<p class="MsoNormal">So I wonder whether there is such
requirement or not.<u></u><u></u></p>
<p class="MsoNormal">Could anyone point me to this
documentation?<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">I'm trying to understand whether patch is
wrong which relies on availability of library but does not
check the symbol itself or this version of glibc is not
supported.<u></u><u></u></p>
<p class="MsoNormal"><u></u> <u></u></p>
<p class="MsoNormal">Thank you,<u></u><u></u></p>
<p class="MsoNormal">Serguei.<u></u><u></u></p>
<p class="MsoNormal"><span lang="RU"><u></u> <u></u></span></p>
</div>
<br>
<fieldset class="m_-5227494766079339797mimeAttachmentHeader"></fieldset>
<br>
</div></div><pre>______________________________<wbr>_________________
LLVM Developers mailing list
<a class="m_-5227494766079339797moz-txt-link-abbreviated" href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>
<a class="m_-5227494766079339797moz-txt-link-freetext" href="http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/llvm-dev</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>