<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">https://github.com/jeffhammond/HPCInfo/blob/master/buildscripts/llvm-git.sh#L95</a><br><br>Jeff<br><br>On Fri, Sep 1, 2017 at 3:18 PM, Uri Moszkowicz via cfe-dev <<a href="mailto:cfe-dev@lists.llvm.org">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">http://llvm.org/docs/GettingStarted.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/builtins/CMakeFiles/builtins.dir/build'.<br>> make[2]: Leaving directory `<clang-4.0.1>/src/build/llvm-4.0.1-redhat6'<br>> [ 36%] Built target builtins<br>> <llvm-4.0.1>/tools/llvm-config/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/llvm-config.dir/llvm-config.cpp.o] Error 1<br>> make[2]: Leaving directory `<clang-4.0.1>/src/build/llvm-4.0.1-redhat6'<br>> make[1]: *** [tools/llvm-config/CMakeFiles/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">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">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/">http://btorpey.github.io/blog/2015/01/02/building-clang/</a><br>>><br>>> Seems a bit old, why not  <a href="https://clang.llvm.org/get_started.html">https://clang.llvm.org/get_started.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>/redhat6/bin/gcc<br>>> > -DCMAKE_CXX_COMPILER=<gcc-6.3.0>/redhat6/bin/g++<br>>> > -DCMAKE_CXX_LINK_FLAGS='-L<gcc-6.3.0>/redhat6/lib64<br>>> > -Wl,-rpath,<gcc-6.3.0>/redhat6/lib64'<br>>> > -DLLVM_ENABLE_ASSERTIONS=ON<br>>> > -DCMAKE_BUILD_TYPE=Release<br>>> > -DLLVM_TARGETS_TO_BUILD=X86<br>>> > -DGCC_INSTALL_PREFIX=<gcc-6.3.0>/redhat6<br>>> > -DPYTHON_EXECUTABLE:FILEPATH=<python-2.7.13>/redhat6/bin/python<br>>> > -DCMAKE_INSTALL_PREFIX=<clang-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/LLVMTableGen.dir/Main.cpp.o<br>>> > [  4%] Building CXX object<br>>> > lib/Option/CMakeFiles/LLVMOption.dir/OptTable.cpp.o<br>>> > [  6%] Building C object<br>>> > projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-x86_64.dir/absvdi2.c.o<br>>> > [  6%] Building CXX object<br>>> > projects/compiler-rt/lib/sanitizer_common/CMakeFiles/RTSanitizerCommonLibc.x86_64.dir/sanitizer_coverage_mapping_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/CMakeFiles/llvm-PerfectShuffle.dir/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>> _______________________________________________<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">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-dev</a><br>><br><br><br><br>--<br>Jeff Hammond<br><a href="mailto:jeff.science@gmail.com">jeff.science@gmail.com</a><br><a href="http://jeffhammond.github.io/">http://jeffhammond.github.io/</a><br><div class="gmail_extra">
</div></div>