<html><head></head><body><div id="appVersion:飞书-4.8.1-editorVersion:0.9.6"></div><div><div style="line-height:1.68"><div style="font-family:arial,helvetica,sans-serif;color:rgb(31,35,41);line-height:1.68"><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">Thanks for your reply! But it still does not work.</span></div><div class="" dir="auto" style="margin:4px 0px"><br></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">Host environment:debian9    gcc6.3</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">My toolchain: gcc8.3</span></div><div class="" dir="auto" style="margin:4px 0px"><br></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">Command:</span></div><div class="" dir="auto" style="margin:4px 0px"><span>CXX=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/g++ CC=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/gcc cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;openmp" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" -DCMAKE_BUILD_TYPE=Release  -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DGCC_INSTALL_PREFIX=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830 -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/lib64 -L/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/lib64 -Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64 -L/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64 -Wl,-dynamic-linker /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64/</span><span class="outer-u-container "><span class=" hyperlink-href:ld-linux-x86-64.so"><a href="http://ld-linux-x86-64.so" rel="noopener" target="_blank" style="text-decoration:none;color:rgb(51,112,255)">ld-linux-x86-64.so</a></span></span><span>.2 -L/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64/</span><span class="outer-u-container "><span class=" hyperlink-href:ld-linux-x86-64.so"><a href="http://ld-linux-x86-64.so" rel="noopener" target="_blank" style="text-decoration:none;color:rgb(51,112,255)">ld-linux-x86-64.so</a></span></span><span>.2" ../llvm</span></div><div class="" dir="auto" style="margin:4px 0px"><br></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">Info:</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">[99/302] Building C object CMakeFiles/clang_rt.builtins-i386.dir/floatsidf.c.o</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">FAILED: CMakeFiles/clang_rt.builtins-i386.dir/floatsidf.c.o</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">/home/liuke.gehry/llvm/llvm-project/build_13_release/./bin/clang --target=x86_64-unknown-linux-gnu -DVISIBILITY_HIDDEN  -O3 -DNDEBUG    -m32 -std=c11 -fPIC -fno-builtin -fvisibility=hidden -MD -MT CMakeFiles/clang_rt.builtins-i386.dir/floatsidf.c.o -MF CMakeFiles/clang_rt.builtins-i386.dir/floatsidf.c.o.d -o CMakeFiles/clang_rt.builtins-i386.dir/floatsidf.c.o   -c /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/floatsidf.c</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">In file included from /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/floatsidf.c:16:</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">In file included from /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/fp_lib.h:23:</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">In file included from /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/int_lib.h:93:</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">In file included from /data00/home/liuke.gehry/llvm/llvm-project/build_13_release/lib/clang/13.0.1/include/limits.h:21:</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">In file included from /usr/include/limits.h:25:</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">#  include <sys/cdefs.h></span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">           ^~~~~~~~~~~~~</span></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">1 error generated.</span></div><div class="" dir="auto" style="margin:4px 0px"><br></div><div class="" dir="auto" style="margin:4px 0px"><span class=" fontsize " style="font-size:14px">It still includes system headers from "/usr/include".</span></div></div></div></div><div style="list-style-position:inside" id="lark-mail-quote-163763725"><div style="list-style-position:inside"><div style="list-style-position:inside"><div style="margin:12px 0px 0px;padding-left:12px;border-left:0.5px solid rgb(187,191,196)" class="adit-html-block ignore-collect adit-html-block--collapsed"><div><div id="lark-mail-quote-bdb9eab86d021bd4daaeb9a445e34c09"><div style="color:rgb(187,191,196)" class="adit-html-block__attr">On Mon, Nov 22, 2021, 21:31 <<a style="white-space:pre-wrap;word-break:break-word;text-decoration:none;color:rgb(51,112,255)" href="mailto:nemanja.i.ibm@gmail.com">nemanja.i.ibm@gmail.com</a>> wrote:</div><div style="margin-top:8px"><div><div dir="ltr">This is just a guess as you haven't included the full invocation or output of the failing command, but perhaps you need <span style="font-family:monospace">-DGCC_INSTALL_PREFIX=<span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830</span></span></div><br><div class="gmail_quote"><div id="lark-mail-quote-8123fd30b61d32dfbc1edfd1b9184ef4"><div class="gmail_attr" dir="ltr">On Fri, Nov 19, 2021 at 8:38 PM 刘可 via llvm-dev <<a rel="nofollow noopener noreferrer" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex" class="gmail_quote"><div id="gmail-m_643134630198768771appVersion:飞书-4.8.1-editorVersion:0.9.6"></div><div><div style="line-height:1.68"><div style="font-family:arial,helvetica,sans-serif;color:rgb(31,35,41);line-height:1.68"><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">Hi, I'm from ByteDance.</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">I was confused when I built LLVM with gcc toolchain.</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">===================================================================</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">Here is my first command:</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">CXX=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/g++ \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">CC=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/gcc \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">cmake -G Ninja \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;openmp" \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DCMAKE_BUILD_TYPE=Release  \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DLLVM_BUILD_LLVM_DYLIB=ON \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DLLVM_LINK_LLVM_DYLIB=ON \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">-DCMAKE_CXX_FLAGS="-Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/lib64 -Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64 -Wl,-dynamic-linker /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64/</span><span><span style="font-size:14px"><a rel="nofollow noopener noreferrer" style="text-decoration:none;color:rgb(51,112,255)" href="http://ld-linux-x86-64.so">ld-linux-x86-64.so</a></span></span><span style="font-size:14px">.2 -I/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-494/sysroot/usr/include" \</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">../llvm</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">result:</span></div><div style="margin:4px 0px" dir="auto"><span style="font-size:14px">/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found.</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">===================================================================</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">===================================================================</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">I tried to solve it by ’-I‘. But it failed.</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">Here is my second command:</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">CXX=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/g++ \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">CC=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/gcc \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;openmp" \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">-DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">-DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">-DCMAKE_BUILD_TYPE=Release  \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">-DLLVM_BUILD_LLVM_DYLIB=ON \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">-DLLVM_LINK_LLVM_DYLIB=ON \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">-DCMAKE_CXX_FLAGS="-Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/lib64 -Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64 -Wl,-dynamic-linker /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64/</span><span><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)"><a rel="nofollow noopener noreferrer" style="text-decoration:none;color:rgb(51,112,255)" href="http://ld-linux-x86-64.so">ld-linux-x86-64.so</a></span></span><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">.2 -I/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-494/sysroot/usr/include" \</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">../llvm</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">result:</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found.</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">$ ls /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/usr/include/sys/cdefs.h</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">toolchain/x86_64-x86_64-gcc-830/sysroot/usr/include/sys/cdefs.h</span></div><div style="margin:4px 0px" dir="auto"><br></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">'sys/cdefs.h' exists in gcc toolchain, </span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">===================================================================</span></div><div style="margin:4px 0px" dir="auto"><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:rgb(31,35,41)">Looking forward to your reply. Thanks!</span></div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a rel="nofollow noopener noreferrer" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br>
<a rel="nofollow noopener noreferrer" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div></div></div></div></div></div></div></div></div></div></body></html>