Error when building LLVM LibC with gcc

Hello,

I try to build the latest version of LLVM using CMAKE v.3.16.3. I run the following two commands:

cmake …/llvm -G Ninja -DCMAKE_INSTALL_PREFIX=. -DLLVM_ENABLE_PROJECTS=all -DLLVM_CACHE_BUILD=ON -DLLVM_USE_LINKER=gold
cmake --build . -j 8

However, I get an error that is not similar to any error I have seen reported. The message is:

In file included from /home/CFA/LLVM/llvm-project/libc/src/fenv/feraiseexcept.cpp:11:
/home/CFA/LLVM/llvm-project/libc/src/fenv/feraiseexcept.cpp:15:25: error: ‘int __llvm_libc::feraiseexcept(int)’ aliased to external symbol ‘feraiseexcept’
15 | LLVM_LIBC_FUNCTION(int, feraiseexcept, (int e)) {

I attach a screenshot showing the error.

Any hint would be appreciated!!

This seems like specific to #llvm-project:libc ; do you need this subproject? An easy workaround is to not build with -DLLVM_ENABLE_PROJECTS=all but list the projects you’re interested in.

Could you also report the version of GCC used to build here?

The GCC version is 9.3.0