Error when building LLVM LibC with gcc


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

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

I got the same error message today when I built the libc. Could anyone help solve this problem? Thanks a lot.

I got the same error message when I build the llvm-project-13.0.1
“/home/yansendao/gcc/llvm-project-13.0.1.src/libc/src/fenv/feraiseexcept.cpp:15:25: error: ‘int __llvm_libc::feraiseexcept(int)’ aliased to external symbol ‘feraiseexcept’”