Serguei Katkov via llvm-dev
2017-Oct-04 07:08 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
Hi All, The landed patch https://reviews.llvm.org/D38481 introduced the usage of CPU_COUNT defined in glibc sched.h header. I failed to find this symbol in sched.h of glibc version 2.5-24, so compilation just fails. /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: In function 'unsigned int llvm::hardware_concurrency()': /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: error: 'CPU_COUNT' was not declared in this scope return CPU_COUNT(&Set); ^ It is buildable with newest version of glibc. I tried to find a requirements for glibc version in LLVM documentation but failed. So I wonder whether there is such requirement or not. Could anyone point me to this documentation? 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. Thank you, Serguei. -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/4b99c495/attachment.html>
Philip Reames via llvm-dev
2017-Oct-04 18:17 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
+ Rui, the patch author Do we know what the oldest glibc which works with this patch is? 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. This appears to break on anything REHL 6 (or earlier) derived. I think this patch needs to be reverted. Thoughts? Philip On 10/04/2017 12:08 AM, Serguei Katkov via llvm-dev wrote:> > Hi All, > > The landed patch https://reviews.llvm.org/D38481 introduced the usage > of CPU_COUNT defined in glibc sched.h header. > > I failed to find this symbol in sched.h of glibc version 2.5-24, so > compilation just fails. > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: > In function ‘unsigned int llvm::hardware_concurrency()’: > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: > error: ‘CPU_COUNT’ was not declared in this scope > > return CPU_COUNT(&Set); > > ^ > > It is buildable with newest version of glibc. > > I tried to find a requirements for glibc version in LLVM documentation > but failed. > > So I wonder whether there is such requirement or not. > > Could anyone point me to this documentation? > > 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. > > Thank you, > > Serguei. > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/0cec184e/attachment.html>
Philip Reames via llvm-dev
2017-Oct-04 18:18 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
+ Rafael, the actual patch author. Don't know how I misread that, sorry. On 10/04/2017 11:17 AM, Philip Reames wrote:> > + Rui, the patch author > > Do we know what the oldest glibc which works with this patch is? > > 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. > > This appears to break on anything REHL 6 (or earlier) derived. I think > this patch needs to be reverted. Thoughts? > > Philip > > > On 10/04/2017 12:08 AM, Serguei Katkov via llvm-dev wrote: >> >> Hi All, >> >> The landed patch https://reviews.llvm.org/D38481 introduced the usage >> of CPU_COUNT defined in glibc sched.h header. >> >> I failed to find this symbol in sched.h of glibc version 2.5-24, so >> compilation just fails. >> >> /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: >> In function ‘unsigned int llvm::hardware_concurrency()’: >> >> /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: >> error: ‘CPU_COUNT’ was not declared in this scope >> >> return CPU_COUNT(&Set); >> >> ^ >> >> It is buildable with newest version of glibc. >> >> I tried to find a requirements for glibc version in LLVM >> documentation but failed. >> >> So I wonder whether there is such requirement or not. >> >> Could anyone point me to this documentation? >> >> 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. >> >> Thank you, >> >> Serguei. >> >> >> >> _______________________________________________ >> LLVM Developers mailing list >> llvm-dev at lists.llvm.org >> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/916e0e35/attachment.html>
Rui Ueyama via llvm-dev
2017-Oct-04 18:19 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
+rafael who is the real author of the patch. I think we should check if CPU_COUNT is available using CMake. On Wed, Oct 4, 2017 at 11:17 AM, Philip Reames <listmail at philipreames.com> wrote:> + Rui, the patch author > > Do we know what the oldest glibc which works with this patch is? > > 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. > > This appears to break on anything REHL 6 (or earlier) derived. I think > this patch needs to be reverted. Thoughts? > > Philip > > On 10/04/2017 12:08 AM, Serguei Katkov via llvm-dev wrote: > > Hi All, > > > > The landed patch https://reviews.llvm.org/D38481 introduced the usage of > CPU_COUNT defined in glibc sched.h header. > > I failed to find this symbol in sched.h of glibc version 2.5-24, so > compilation just fails. > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: > In function ‘unsigned int llvm::hardware_concurrency()’: > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: > error: ‘CPU_COUNT’ was not declared in this scope > > return CPU_COUNT(&Set); > > ^ > > > > It is buildable with newest version of glibc. > > I tried to find a requirements for glibc version in LLVM documentation but > failed. > > So I wonder whether there is such requirement or not. > > Could anyone point me to this documentation? > > > > 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. > > > > Thank you, > > Serguei. > > > > > _______________________________________________ > LLVM Developers mailing listllvm-dev at lists.llvm.orghttp://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/3f1e6d65/attachment.html>
Daniel Neilson via llvm-dev
2017-Oct-04 18:23 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
Reverted: https://reviews.llvm.org/rL314922 On Oct 4, 2017, at 1:17 PM, Philip Reames via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: + Rui, the patch author Do we know what the oldest glibc which works with this patch is? 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. This appears to break on anything REHL 6 (or earlier) derived. I think this patch needs to be reverted. Thoughts? Philip On 10/04/2017 12:08 AM, Serguei Katkov via llvm-dev wrote: Hi All, The landed patch https://reviews.llvm.org/D38481 introduced the usage of CPU_COUNT defined in glibc sched.h header. I failed to find this symbol in sched.h of glibc version 2.5-24, so compilation just fails. /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: In function ‘unsigned int llvm::hardware_concurrency()’: /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: error: ‘CPU_COUNT’ was not declared in this scope return CPU_COUNT(&Set); ^ It is buildable with newest version of glibc. I tried to find a requirements for glibc version in LLVM documentation but failed. So I wonder whether there is such requirement or not. Could anyone point me to this documentation? 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. Thank you, Serguei. _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/d9b2a75c/attachment.html>
Daniel Neilson via llvm-dev
2017-Oct-04 19:02 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
Correction to Philip’s statement, below, about the glibc version packaged with Centos 6.4 — it includes glibc v2.12. LLVM will build on this system just fine. -Daniel On Oct 4, 2017, at 1:17 PM, Philip Reames via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: + Rui, the patch author Do we know what the oldest glibc which works with this patch is? 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. This appears to break on anything REHL 6 (or earlier) derived. I think this patch needs to be reverted. Thoughts? Philip On 10/04/2017 12:08 AM, Serguei Katkov via llvm-dev wrote: Hi All, The landed patch https://reviews.llvm.org/D38481 introduced the usage of CPU_COUNT defined in glibc sched.h header. I failed to find this symbol in sched.h of glibc version 2.5-24, so compilation just fails. /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: In function ‘unsigned int llvm::hardware_concurrency()’: /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: error: ‘CPU_COUNT’ was not declared in this scope return CPU_COUNT(&Set); ^ It is buildable with newest version of glibc. I tried to find a requirements for glibc version in LLVM documentation but failed. So I wonder whether there is such requirement or not. Could anyone point me to this documentation? 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. Thank you, Serguei. _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev _______________________________________________ LLVM Developers mailing list llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/1387a052/attachment.html>
Rui Ueyama via llvm-dev
2017-Oct-04 19:38 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
Serguei, glibc 2.5 was released 11 years ago, so I wonder what operating system you are using now. On Wed, Oct 4, 2017 at 12:08 AM, Serguei Katkov via llvm-dev < llvm-dev at lists.llvm.org> wrote:> Hi All, > > > > The landed patch https://reviews.llvm.org/D38481 introduced the usage of > CPU_COUNT defined in glibc sched.h header. > > I failed to find this symbol in sched.h of glibc version 2.5-24, so > compilation just fails. > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: > In function ‘unsigned int llvm::hardware_concurrency()’: > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: > error: ‘CPU_COUNT’ was not declared in this scope > > return CPU_COUNT(&Set); > > ^ > > > > It is buildable with newest version of glibc. > > I tried to find a requirements for glibc version in LLVM documentation but > failed. > > So I wonder whether there is such requirement or not. > > Could anyone point me to this documentation? > > > > 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. > > > > Thank you, > > Serguei. > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/48119307/attachment.html>
Philip Reames via llvm-dev
2017-Oct-04 21:19 UTC
[llvm-dev] Minimal glibc version supported by LLVM build
Our build system is setup to deliberately use a very old environment. We've found that's one of the most reliable easy ways to ensure we don't accidentally introduce a dependency on a newer system library than intended. This lets us ship prebuilt binaries which run on a wide spectrum of systems. We're going to chat internally and check to see if we can roll this forward a bit, but supporting an older glibc is definitely going to be somewhat we want. Exactly *how* old might be flexible, but I have to check. Rui, let me turn your question around on you. What version of glibc would you like to be our minimum? And why? Is there a good reason to move this forward? I think we need to establish and document a minimum supported version here. I'm open to debating what that version should be, but the current lack of clarity is clearly problematic. Philip p.s. Sorry about the confusion earlier about CentOS. I'd misunderstood an statement in internal conversation and repeated the information without checking. While true that the build failed on a CentOS 6.4 system, it was being built against a non-default (older) glibc. p.p.s. This brought up the point internally that we really should have a public build bot for the configuration we care about. I need to talk that over internally, but this seems like something we can make happen. On 10/04/2017 12:38 PM, Rui Ueyama via llvm-dev wrote:> Serguei, > > glibc 2.5 was released 11 years ago, so I wonder what operating system > you are using now. > > On Wed, Oct 4, 2017 at 12:08 AM, Serguei Katkov via llvm-dev > <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote: > > Hi All, > > The landed patch https://reviews.llvm.org/D38481 > <https://reviews.llvm.org/D38481> introduced the usage of > CPU_COUNT defined in glibc sched.h header. > > I failed to find this symbol in sched.h of glibc version 2.5-24, > so compilation just fails. > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp: > In function ‘unsigned int llvm::hardware_concurrency()’: > > /home/dolphin/merge-from-upstream-area/ws/pristine/lib/Support/Threading.cpp:80:26: > error: ‘CPU_COUNT’ was not declared in this scope > > return CPU_COUNT(&Set); > > ^ > > It is buildable with newest version of glibc. > > I tried to find a requirements for glibc version in LLVM > documentation but failed. > > So I wonder whether there is such requirement or not. > > Could anyone point me to this documentation? > > 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. > > Thank you, > > Serguei. > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org> > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev > <http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev> > > > > > _______________________________________________ > LLVM Developers mailing list > llvm-dev at lists.llvm.org > http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171004/7241bdb1/attachment.html>