[cfe-dev] Precompiled mac os clang 10 doesn't work out of box on Catalina

Jens Jorgensen via cfe-dev cfe-dev at lists.llvm.org
Tue Jun 23 22:57:05 PDT 2020


There's an open bug for this, or at least there was.... maybe autoclosed?

https://bugs.llvm.org/show_bug.cgi?id=45880

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:

https://lists.llvm.org/pipermail/cfe-dev/2019-September/063394.html

On 6/22/20 5:06 PM, via cfe-dev wrote:
> Last night, I solved this issue, but partially.
> Starting from Mojave "/usr/include" was removed from Mac OS. You
> should either install headers explicitly, or pass "--sysroot"
> parameter during compilation.
> 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.
>  
> I think we should either update guidelines, or improve sysroot
> computation in Driver.
>  
> Anybody? Any thoughts on that?
>  
> -Stepan
>  
> 21.06.2020, 12:09, "via cfe-dev" <cfe-dev at lists.llvm.org>:
>
>     My bad. Clang-9 also fails.
>      
>     21.06.2020, 11:23, "via cfe-dev" <cfe-dev at lists.llvm.org
>     <mailto:cfe-dev at lists.llvm.org>>:
>
>         Hi! I have downloaded precompiled clang 10 on a virgin Mac OS
>         Catalina installation. My attempt to compile C++ code fails
>         with error:
>          
>         /Users/stepan/Downloads/clang+llvm-10.0.0-x86_64-apple-darwin/bin/../include/c++/v1/wchar.h:118:15:
>         fatal error:
>         'wchar.h' file not found
>         #include_next <wchar.h>
>         ^~~~~~~~~
>         1 error generated.
>          
>         This is kind of know error end was described in stack overflow:
>         https://stackoverflow.com/questions/26185978/macos-wchar-h-file-not-found
>          
>         The reason is a wrong configuration of sysroot or include
>         directories.
>          
>         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?
>          
>         BTW: clang-9 works without any issues.
>          
>         Thanks!
>         Stepan
>          
>         ,
>
>         _______________________________________________
>         cfe-dev mailing list
>         cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>         https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>     ,
>
>     _______________________________________________
>     cfe-dev mailing list
>     cfe-dev at lists.llvm.org <mailto:cfe-dev at lists.llvm.org>
>     https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
>
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at lists.llvm.org
> https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

-- 
Jens B. Jorgensen
jbj1 at ultraemail.net

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20200624/84423d18/attachment-0001.html>


More information about the cfe-dev mailing list