<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  </head>
  <body>
    <p>There's an open bug for this, or at least there was.... maybe
      autoclosed? <br>
    </p>
    <p><a href="https://bugs.llvm.org/show_bug.cgi?id=45880">https://bugs.llvm.org/show_bug.cgi?id=45880</a></p>
    <p>Exactly as you say an 'out of the box' clang build in recent mac
      os will fail to find the "system" headers. You can read the thread
      here:</p>
    <p><a
href="https://lists.llvm.org/pipermail/cfe-dev/2019-September/063394.html">https://lists.llvm.org/pipermail/cfe-dev/2019-September/063394.html</a></p>
    <div class="moz-cite-prefix">On 6/22/20 5:06 PM, via cfe-dev wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:365561592816472@mail.yandex.ru">
      <meta http-equiv="content-type" content="text/html; charset=UTF-8">
      <div>Last night, I solved this issue, but partially.</div>
      <div>Starting from Mojave "/usr/include" was removed from Mac OS.
        You should either install headers explicitly, or pass
        "--sysroot" parameter during compilation.</div>
      <div>I say "partially", because imho it breaks default use-case.
        Since this moment you can't use clang out of box just like that:
        "clang++ test.cpp". I love Apple because you can use things out
        of the box. But, alas, this is not about clang anymore.</div>
      <div> </div>
      <div>I think we should either update guidelines, or improve
        sysroot computation in Driver.</div>
      <div> </div>
      <div>Anybody? Any thoughts on that?</div>
      <div> </div>
      <div>-Stepan</div>
      <div> </div>
      <div>21.06.2020, 12:09, "via cfe-dev"
        <a class="moz-txt-link-rfc2396E" href="mailto:cfe-dev@lists.llvm.org"><cfe-dev@lists.llvm.org></a>:</div>
      <blockquote>
        <div>My bad. Clang-9 also fails.</div>
        <div> </div>
        <div>21.06.2020, 11:23, "via cfe-dev" <<a
            href="mailto:cfe-dev@lists.llvm.org" moz-do-not-send="true">cfe-dev@lists.llvm.org</a>>:</div>
        <blockquote>
          <div>Hi! I have downloaded precompiled clang 10 on a virgin
            Mac OS Catalina installation. My attempt to compile C++ code
            fails with error:</div>
          <div> </div>
          <div>
            <div>/Users/stepan/Downloads/clang+llvm-10.0.0-x86_64-apple-darwin/bin/../include/c++/v1/wchar.h:118:15:
              fatal error:</div>
            <div>'wchar.h' file not found</div>
            <div>#include_next <wchar.h></div>
            <div>^~~~~~~~~</div>
            <div>1 error generated.</div>
            <div> </div>
            <div>This is kind of know error end was described in stack
              overflow:</div>
            <div><a
href="https://stackoverflow.com/questions/26185978/macos-wchar-h-file-not-found"
                moz-do-not-send="true">https://stackoverflow.com/questions/26185978/macos-wchar-h-file-not-found</a></div>
            <div> </div>
            <div>The reason is a wrong configuration of sysroot or
              include directories.</div>
            <div> </div>
            <div>And yet I have a question. As long a it is a
              precompiled clang for macos, isn't it possible to fix it
              and make it working out of box?</div>
            <div> </div>
            <div>BTW: clang-9 works without any issues.</div>
            <div> </div>
            <div>Thanks!</div>
            <div>Stepan</div>
            <div> </div>
          </div>
          ,
          <p>_______________________________________________<br>
            cfe-dev mailing list<br>
            <a href="mailto:cfe-dev@lists.llvm.org"
              moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
            <a
              href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
              moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></p>
        </blockquote>
        ,
        <p>_______________________________________________<br>
          cfe-dev mailing list<br>
          <a href="mailto:cfe-dev@lists.llvm.org" moz-do-not-send="true">cfe-dev@lists.llvm.org</a><br>
          <a
            href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev"
            moz-do-not-send="true">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a></p>
      </blockquote>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <pre class="moz-quote-pre" wrap="">_______________________________________________
cfe-dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a>
<a class="moz-txt-link-freetext" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a>
</pre>
    </blockquote>
    <pre class="moz-signature" cols="72">-- 
Jens B. Jorgensen
<a class="moz-txt-link-abbreviated" href="mailto:jbj1@ultraemail.net">jbj1@ultraemail.net</a>
</pre>
  </body>
</html>