<div dir="ltr">Perhaps set LD_LIBRARY_PATH so clang-tblgen can find the correct version of libstdc++.so.<div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Wed, Sep 6, 2017 at 3:07 PM, Uri Moszkowicz 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 dir="ltr">I get the same error using your build script :(<div><br></div><div><div> 46%] Copying clang's cuda_wrappers/algorithm...</div><div>[ 46%] Copying clang's cuda_wrappers/new...</div><div>[ 46%] Copying clang's cuda_wrappers/complex...</div><div>[ 46%] Building arm_neon.h...</div><div>../../../../bin/clang-tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.20' not found (required by ../../../../bin/clang-tblgen)</div><div>../../../../bin/clang-tblgen: /usr/lib64/libstdc++.so.6: version `CXXABI_1.3.9' not found (required by ../../../../bin/clang-tblgen)</div><div>../../../../bin/clang-tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.14' not found (required by ../../../../bin/clang-tblgen)</div><div>../../../../bin/clang-tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.19' not found (required by ../../../../bin/clang-tblgen)</div><div>../../../../bin/clang-tblgen: /usr/lib64/libstdc++.so.6: version `GLIBCXX_3.4.21' not found (required by ../../../../bin/clang-tblgen)</div><div>make[2]: *** [tools/clang/lib/Headers/arm_<wbr>neon.h.tmp] Error 1</div><div>make[2]: *** Waiting for unfinished jobs....</div><div>make[1]: *** [tools/clang/lib/Headers/<wbr>CMakeFiles/clang-headers.dir/<wbr>all] Error 2</div><div>[ 46%] Linking CXX executable ../../bin/not</div><div>[ 46%] Built target not</div><div>[ 46%] Linking CXX executable ../../bin/llvm-cxxfilt</div><div>[ 46%] Linking CXX executable ../../bin/llvm-mcmarkup</div><div>[ 46%] Built target llvm-cxxfilt</div></div><div><br></div><div>My CMake, FCC, and Python builds were from source, not the package manager. I'm using CentOS 6.7 btw.</div><div><br></div><div>I think there's a clue in the error message here, given the reference to /usr/lib64. I noticed that spaces in arguments were getting dropped by CMake in commands. You don't have the linker option CMAKE_CXX_LINK_FLAGS specified from the build instructions but even if you did, the latter half of the option is truncated.</div></div><div class="HOEnZb"><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Sep 1, 2017 at 10:33 PM, Jeff Hammond <span dir="ltr"><<a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I built the latest Git on CentOS 6 two days ago, but I use upgraded CMake, GCC, Python and other things.  So there is nothing fundamentally wrong with CentOS other than the built-in packages it comes with are too old.<br><br>I recall CMake does something idiotic wherein it prefers /usr/bin/python over `which python`, which you have to manually override with -DPYTHON_EXECUTABLE=`which python`, or at least that is what I archived in my successful build script.<br><a href="https://github.com/jeffhammond/HPCInfo/blob/master/buildscripts/llvm-git.sh#L95" target="_blank">https://github.com/jeffhammond<wbr>/HPCInfo/blob/master/<wbr>buildscripts/llvm-git.sh#L95</a><br><br>Jeff<div><div class="m_-2580977614733648617h5"><br><br>On Fri, Sep 1, 2017 at 3:18 PM, Uri Moszkowicz via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>><br>> Hi Csaba,<br>> I started with the instructions on the LLVM website. The problem is that CentOS 6 does not meet the build requirements, shown here:<br>><br>> <a href="http://llvm.org/docs/GettingStarted.html#requirements" target="_blank">http://llvm.org/docs/GettingSt<wbr>arted.html#requirements</a><br>><br>> I built the required versions of software but the instructions don't cover how to utilize them.<br>><br>> Anyway, I compiled again with VERBOSE and discovered the problem is missing LibraryDependencies.inc. I specified python27 with a CMake variable and added it to my PATH but it still didn't solve the problem:<br>><br>> make[2]: Nothing to be done for `projects/compiler-rt/lib/buil<wbr>tins/CMakeFiles/builtins.dir/<wbr>build'.<br>> make[2]: Leaving directory `<clang-4.0.1>/src/build/llvm-<wbr>4.0.1-redhat6'<br>> [ 36%] Built target builtins<br>> <llvm-4.0.1>/tools/llvm-config<wbr>/llvm-config.cpp:47:35: fatal error: LibraryDependencies.inc: No such file or directory<br>>  #include "LibraryDependencies.inc"<br>>                                    ^<br>> compilation terminated.<br>> make[2]: *** [tools/llvm-config/CMakeFiles/<wbr>llvm-config.dir/llvm-config.cp<wbr>p.o] Error 1<br>> make[2]: Leaving directory `<clang-4.0.1>/src/build/llvm-<wbr>4.0.1-redhat6'<br>> make[1]: *** [tools/llvm-config/CMakeFiles/<wbr>llvm-config.dir/all] Error 2<br>><br>> How can I move past this error? Despite setting LD_LIBRARY_PATH and CMAKE_CXX_LINK_FLAGS as indicated in the instructions above, I also still seem to be getting GLIBC errors too :(<br>><br>> Thanks,<br>> Uri<br>><br>><br>> On Thu, Aug 31, 2017 at 3:47 AM, Csaba Raduly <<a href="mailto:rcsaba@gmail.com" target="_blank">rcsaba@gmail.com</a>> wrote:<br>>><br>>> Hi Uri,<br>>><br>>> On Wed, Aug 30, 2017 at 11:35 PM, Uri Moszkowicz via cfe-dev<br>>> <<a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a>> wrote:<br>>> > Hi,<br>>> > I'm having trouble building Clang on CentOS 6 and am hoping someone here can<br>>> > help. I followed the instructions on this website:<br>>> ><br>>> > <a href="http://btorpey.github.io/blog/2015/01/02/building-clang/" target="_blank">http://btorpey.github.io/blog/<wbr>2015/01/02/building-clang/</a><br>>><br>>> Seems a bit old, why not  <a href="https://clang.llvm.org/get_started.html" target="_blank">https://clang.llvm.org/get_st<wbr>arted.html</a><br>>><br>>> ><br>>> > I'm using GCC 6.3.0 and Python 2.7.13, both also built from source using<br>>> > these options:<br>>> ><br>>> > -DCMAKE_C_COMPILER=<gcc-6.3.0><wbr>/redhat6/bin/gcc<br>>> > -DCMAKE_CXX_COMPILER=<gcc-6.3.<wbr>0>/redhat6/bin/g++<br>>> > -DCMAKE_CXX_LINK_FLAGS='-L<gcc<wbr>-6.3.0>/redhat6/lib64<br>>> > -Wl,-rpath,<gcc-6.3.0>/redhat6<wbr>/lib64'<br>>> > -DLLVM_ENABLE_ASSERTIONS=ON<br>>> > -DCMAKE_BUILD_TYPE=Release<br>>> > -DLLVM_TARGETS_TO_BUILD=X86<br>>> > -DGCC_INSTALL_PREFIX=<gcc-6.3.<wbr>0>/redhat6<br>>> > -DPYTHON_EXECUTABLE:FILEPATH=<<wbr>python-2.7.13>/redhat6/bin/pyt<wbr>hon<br>>> > -DCMAKE_INSTALL_PREFIX=<clang-<wbr>4.0.1>/redhat6<br>>> ><br>>> > The errors I'm seeing look like this (I used -j32):<br>>> ><br>>> > [  4%] Building CXX object<br>>> > lib/TableGen/CMakeFiles/LLVMTa<wbr>bleGen.dir/Main.cpp.o<br>>> > [  4%] Building CXX object<br>>> > lib/Option/CMakeFiles/LLVMOpti<wbr>on.dir/OptTable.cpp.o<br>>> > [  6%] Building C object<br>>> > projects/compiler-rt/lib/built<wbr>ins/CMakeFiles/clang_rt.builti<wbr>ns-x86_64.dir/absvdi2.c.o<br>>> > [  6%] Building CXX object<br>>> > projects/compiler-rt/lib/sanit<wbr>izer_common/CMakeFiles/RTSanit<wbr>izerCommonLibc.x86_64.dir/<wbr>sanitizer_coverage_mapping_<wbr>libcdep.cc.o<br>>> > Scanning dependencies of target LLVMSupport<br>>> > g++: fatal error: no input files<br>>> > compilation terminated.<br>>> > make[2]: *** [bin/llvm-PerfectShuffle] Error 1<br>>> > make[1]: *** [utils/PerfectShuffle/CMakeFil<wbr>es/llvm-PerfectShuffle.dir/<wbr>all]<br>>> > Error 2<br>>> (snip)<br>>> ><br>>> > Any thoughts about what else I need to do?<br>>><br>>> For debugging purposes, build with<br>>><br>>> make VERBOSE=1<br>>><br>>> This would print the actual compiler invocation; the we'll have a<br>>> better chance figuring out what went wrong.<br>>><br>>> Csaba<br>>> --<br>>> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++<br>>> The Tao of math: The numbers you can count are not the real numbers.<br>>> Life is complex, with real and imaginary parts.<br>>> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus Torvalds<br>>> "People disagree with me. I just ignore them." -- Linus Torvalds<br>><br>><br>><br></div></div>> ______________________________<wbr>_________________<br>> cfe-dev mailing list<br>> <a href="mailto:cfe-dev@lists.llvm.org" target="_blank">cfe-dev@lists.llvm.org</a><br>> <a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev" target="_blank">http://lists.llvm.org/cgi-bin/<wbr>mailman/listinfo/cfe-dev</a><br>><br><br><br><br>--<br>Jeff Hammond<br><a href="mailto:jeff.science@gmail.com" target="_blank">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/" target="_blank">http://jeffhammond.github.io/</a><br><div class="gmail_extra">
</div></div>
</blockquote></div><br></div>
</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>