Precompiled mac os clang 10 doesn't work out of box on Catalina

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Precompiled mac os clang 10 doesn't work out of box on Catalina

Vassil Vassilev via cfe-dev
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:
 
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
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Precompiled mac os clang 10 doesn't work out of box on Catalina

Vassil Vassilev via cfe-dev
My bad. Clang-9 also fails.
 
21.06.2020, 11:23, "via cfe-dev" <[hidden email]>:
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:
 
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
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Precompiled mac os clang 10 doesn't work out of box on Catalina

Vassil Vassilev via cfe-dev
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" <[hidden email]>:
My bad. Clang-9 also fails.
 
21.06.2020, 11:23, "via cfe-dev" <[hidden email]>:
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:
 
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
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

,

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
Reply | Threaded
Open this post in threaded view
|

Re: Precompiled mac os clang 10 doesn't work out of box on Catalina

Vassil Vassilev via cfe-dev

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" [hidden email]:
My bad. Clang-9 also fails.
 
21.06.2020, 11:23, "via cfe-dev" <[hidden email]>:
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:
 
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
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev

,

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev


_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev
-- 
Jens B. Jorgensen
[hidden email]

_______________________________________________
cfe-dev mailing list
[hidden email]
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev