<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=utf-8"><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;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
@font-face
        {font-family:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
@font-face
        {font-family:"Viner Hand ITC";
        panose-1:3 7 5 2 3 5 2 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
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;}
p
        {mso-style-priority:99;
        mso-margin-top-alt:auto;
        margin-right:0cm;
        mso-margin-bottom-alt:auto;
        margin-left:0cm;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert Zchn";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";
        color:black;}
p.CodeBlock, li.CodeBlock, div.CodeBlock
        {mso-style-name:"Code Block";
        margin:0cm;
        margin-bottom:.0001pt;
        background:#F2F2F2;
        font-size:11.0pt;
        font-family:Consolas;
        color:black;}
p.MailQuote, li.MailQuote, div.MailQuote
        {mso-style-name:"Mail Quote";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:9.0pt;
        font-family:"Calibri","sans-serif";
        color:black;}
span.E-MailFormatvorlage20
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
span.HTMLVorformatiertZchn
        {mso-style-name:"HTML Vorformatiert Zchn";
        mso-style-priority:99;
        mso-style-link:"HTML Vorformatiert";
        font-family:Consolas;
        color:black;}
span.E-MailFormatvorlage23
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
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 bgcolor=white lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='color:#1F497D'>Hi,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>-stdlib=libc++ is needed if you wish to use libc++ on a Linux system that would otherwise require a recent version of libstdc++ from GCC.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>The flag is currently passed in by the LLVM root build system but probably does not work because the .c files are compiled as C++.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Intel’s plan was to clean that up by the end of September which should fix the problem.<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>In the meantime, could you try to specify LIBOMP_CXXFLAGS which should inject the parameters to the right places?<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Note: The runtime does not really use or link against libc++ nor libstdc++ but clang requires the flag to actually find the atomic header…<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Cheers,<o:p></o:p></span></p><p class=MsoNormal><span style='color:#1F497D'>Jonas<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'>From:</span></b><span lang=DE style='font-size:10.0pt;font-family:"Tahoma","sans-serif";color:windowtext'> Openmp-dev [mailto:openmp-dev-bounces@lists.llvm.org] <b>On Behalf Of </b>Paul Osmialowski via Openmp-dev<br><b>Sent:</b> Friday, September 09, 2016 8:25 PM<br><b>To:</b> openmp-dev@lists.llvm.org<br><b>Subject:</b> Re: [Openmp-dev] LLVM 3.9 openmp build failure on linux -- cannot find atomic<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p> </o:p></p><p>Hi Riyaz,<o:p></o:p></p><p><o:p> </o:p></p><p>I'm always building LLVM OpenMP runtime with latest LLVM and Clang (from git master) and I on every of my Linux machines I never had to set any additional flags. What system are you building it on?<o:p></o:p></p><p class=MsoNormal><o:p> </o:p></p><div><p class=MsoNormal>On 09/03/16 05:07, Riyaz Puthiyapurayil via Openmp-dev wrote:<o:p></o:p></p></div><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span style='font-family:Consolas'>With Release 3.9, kmp_lock.h is now including <atomic> under #ifdef __cplusplus. This wasn’t the case with Release 3.8.1. However, there are ‘.c’ files that are compiled as C++ files with ‘-x c++’ but they are not compiled with -stdlib=libc++. As a result, clang does not find <atomic> and gives the following error:</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>… Building C object projects/openmp/runtime/src/CMakeFiles/omp.dir/kmp_error.c.o</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>:</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>:</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>In file included from /remote/vgsource7/riyaz/llvm/projects/openmp/runtime/src/kmp_error.c:16:</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>In file included from /remote/vgsource7/riyaz/llvm/projects/openmp/runtime/src/kmp.h:92:</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>/remote/vgsource7/riyaz/llvm/projects/openmp/runtime/src/kmp_lock.h:26:10: fatal error: 'atomic' file not found</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>#include <atomic></span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>         ^</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>1 error generated.</span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'> </span><o:p></o:p></p><p class=MsoNormal><span style='font-family:Consolas'>Should LIBOMP_USE_STDCPPLIB be set to TRUE?</span><o:p></o:p></p><p class=MsoNormal style='text-align:justify'> <o:p></o:p></p><p class=MsoNormal style='text-align:justify'><i><span style='font-family:"Viner Hand ITC"'>-Riyaz</span></i><o:p></o:p></p><p class=MsoNormal> <o:p></o:p></p><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><br><br><br><o:p></o:p></span></p><pre>_______________________________________________<o:p></o:p></pre><pre>Openmp-dev mailing list<o:p></o:p></pre><pre><a href="mailto:Openmp-dev@lists.llvm.org">Openmp-dev@lists.llvm.org</a><o:p></o:p></pre><pre><a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev">http://lists.llvm.org/cgi-bin/mailman/listinfo/openmp-dev</a><o:p></o:p></pre></blockquote><p class=MsoNormal><span style='font-size:12.0pt;font-family:"Times New Roman","serif"'><o:p> </o:p></span></p></div></div></body></html>