| Issue |
109551
|
| Summary |
clang 18.1.8 fails to build on Ubuntu 22.04 - missing std::atomic - actual problem unguarded-availability-new
|
| Labels |
clang
|
| Assignees |
|
| Reporter |
drudru
|
This is a build problem.
I was trying to compile version 18.1.8 on Ubuntu 22.04
gcc version 11.4.0 (Ubuntu 11.4.0-1ubuntu1~22.04).
Strangely, the cmake build was failing with missing std::atomic.
That seemed way off since that is a basic requirement.
After digging into the logs, I found that the real issue was that the build system
thought that g++ supported -Werror=unguarded-availability-new.
The check in llvm/cmake/config-ix.cmake:
```
check_c_compiler_flag("-Werror=unguarded-availability-new" "C_SUPPORTS_WERROR_UNGUARDED_AVAILABILITY_NEW")
```
Appears to be flawed.
I commented out the 3 following lines that set the CMAKE_REQUIRED_FLAGS to for this warning.
Once I did that, the build worked successfully.
Hopefully, this helps some others who encounter the same issue.
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs