<html dir="ltr">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=windows-1256">
<style type="text/css" id="owaParaStyle">P {margin-top:0;margin-bottom:0;}</style>
</head>
<body fpstyle="1" ocsi="0">
<div style="direction: ltr;font-family: Tahoma;color: #000000;font-size: 10pt;">Recently I have been building LLVM and Clang from the distribution using gcc 4.9.2. With the new 5.0.0 rc2 that is giving warning messages during the compilation. I have been
trying out some other compilers.<br>
<br>
gcc 5.2 with -std=c++11 This works, although there are still some warnings.<br>
<br>
gcc 6.4 and gcc 7.1 fail with errors such as this in building libcxxabi as follows:<br>
<br>
Command: /opt/cmake/bin/cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/home/fletcher/LLVM/llvm-5.0.rc2/local_71 -DCMAKE_C_COMPILER=/opt/gcc-7.1/bin/gcc CMAKE_CXX_COMPILER=/opt/gcc-7.1/bin/g++ -DCMAKE_BUILD_TYPE=Release -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD="host"
-DCMAKE_CXX_FLAGS="-std=c++11 -I/opt/gcc-7.1/include/c++/7.1.0" -DCMAKE_EXE_LINKER_FLAGS="-Xlinker -R/opt/gcc-7.1/lib64 -L/opt/gcc-7.1/lib64" ../llvm<br>
<br>
First Error:<br>
<br>
Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_aux_runtime.cpp.o
<br>
In file included from /home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxx/include/stdlib.h:94:0,<br>
from /home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxx/include/cstdlib:86,<br>
from /home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxx/include/exception:82,<br>
from /home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxx/include/new:89,<br>
from /home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxxabi/src/cxa_aux_runtime.cpp:14:<br>
/opt/gcc-7.1/include/c++/7.1.0/stdlib.h:38:12: error: std::abort has not been declared<br>
using std::abort;<br>
<br>
clang 4.0.0 fails with a different problem with libcxxabi - <br>
<br>
Command:<br>
<br>
/opt/cmake/bin/cmake -G "Unix Makefiles" -DCMAKE_INSTALL_PREFIX=/home/fletcher/LLVM/llvm-5.0.rc2/local_40 -DCMAKE_C_COMPILER=/home/fletcher/LLVM/llvm-4.0.distrib/local/bin/clang CMAKE_CXX_COMPILER=/home/fletcher/LLVM/llvm-4.0.distrib/local/bin/clang++ -DCMAKE_BUILD_TYPE=Release
-DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_CXX_FLAGS="-I/home/fletcher/LLVM/llvm-4.0.distrib/local/include/c++/v1 -stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-Xlinker -R/home/fletcher/LLVM/llvm-4.0.distrib/local/lib -L/home/fletcher/LLVM/llvm-4.0.distrib/local/lib
-lc++abi -lclangBasic -lLLVMSupport -lpthread -ldl " ../llvm<br>
<br>
Error:<br>
<br>
Building CXX object projects/libcxxabi/src/CMakeFiles/cxxabi_objects.dir/cxa_aux_runtime.cpp.o<br>
In file included from /home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxxabi/src/cxa_aux_runtime.cpp:13:<br>
/home/fletcher/LLVM/llvm-5.0.rc2/llvm/projects/libcxxabi/include/cxxabi.h:42:26: error: unknown type name<br>
'size_t'<br>
<br>
It seems to me that there are some configuration problems here in getting the correct header arrangement.<br>
<br>
The rest of the build works, and looking around clang is recommended for building libcxxabi.<br>
<br>
Is this a known problem?<br>
<br>
Thanks<br>
<br>
John Fletcher<br>
<br>
<br>
</div>
</body>
</html>