<div dir="ltr">Why are you passing this?<div><br></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">  -DCMAKE_CXX_FLAGS="</span><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">-std=c++11</span><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px"> -I/opt/gcc-7.1/include/c++/7.</span><wbr style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">1.0"</span><br></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px"><br></span></div><div><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">CMakeLists.txt should take care of setting </span><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">-std=c++11, and by passing </span><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">-I/opt/gcc-7.1/include/c++/7.</span><wbr style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px"><span style="color:rgb(0,0,0);font-family:Tahoma;font-size:13.3333px">1.0, are you short circuiting the compiler's own include paths?</span></div><div><br></div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Aug 19, 2017 at 9:00 AM, Fletcher, John P via cfe-dev <span dir="ltr"><<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">




<div>
<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/<wbr>fletcher/LLVM/llvm-5.0.rc2/<wbr>local_71 -DCMAKE_C_COMPILER=/opt/gcc-7.<wbr>1/bin/gcc CMAKE_CXX_COMPILER=/opt/gcc-7.<wbr>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.<wbr>1.0" -DCMAKE_EXE_LINKER_FLAGS="-<wbr>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/<wbr>CMakeFiles/cxxabi_objects.dir/<wbr>cxa_aux_runtime.cpp.o         <wbr>                              <wbr>                              <wbr>                   
<br>
In file included from /home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxx/<wbr>include/stdlib.h:94:0,<br>
                 from /home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxx/<wbr>include/cstdlib:86,<br>
                 from /home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxx/<wbr>include/exception:82,<br>
                 from /home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxx/<wbr>include/new:89,<br>
                 from /home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxxabi/<wbr>src/cxa_aux_runtime.cpp:14:<br>
/opt/gcc-7.1/include/c++/7.1.<wbr>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/<wbr>fletcher/LLVM/llvm-5.0.rc2/<wbr>local_40 -DCMAKE_C_COMPILER=/home/<wbr>fletcher/LLVM/llvm-4.0.<wbr>distrib/local/bin/clang CMAKE_CXX_COMPILER=/home/<wbr>fletcher/LLVM/llvm-4.0.<wbr>distrib/local/bin/clang++ -DCMAKE_BUILD_TYPE=Release
 -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_TARGETS_TO_BUILD="host" -DCMAKE_CXX_FLAGS="-I/home/<wbr>fletcher/LLVM/llvm-4.0.<wbr>distrib/local/include/c++/v1 -stdlib=libc++" -DCMAKE_EXE_LINKER_FLAGS="-<wbr>Xlinker -R/home/fletcher/LLVM/llvm-4.<wbr>0.distrib/local/lib -L/home/fletcher/LLVM/llvm-4.<wbr>0.distrib/local/lib
 -lc++abi -lclangBasic -lLLVMSupport -lpthread -ldl " ../llvm<br>
<br>
Error:<br>
<br>
Building CXX object projects/libcxxabi/src/<wbr>CMakeFiles/cxxabi_objects.dir/<wbr>cxa_aux_runtime.cpp.o<br>
In file included from /home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxxabi/<wbr>src/cxa_aux_runtime.cpp:13:<br>
/home/fletcher/LLVM/llvm-5.0.<wbr>rc2/llvm/projects/libcxxabi/<wbr>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<span class="HOEnZb"><font color="#888888"><br>
<br>
John Fletcher<br>
<br>
<br>
</font></span></div>
</div>

<br>______________________________<wbr>_________________<br>
cfe-dev mailing list<br>
<a href="mailto:cfe-dev@lists.llvm.org">cfe-dev@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>
<br></blockquote></div><br></div>