[cfe-dev] Trouble building Clang on CentOS 6

Uri Moszkowicz via cfe-dev cfe-dev at lists.llvm.org
Fri Sep 1 15:18:27 PDT 2017


Hi Csaba,
I started with the instructions on the LLVM website. The problem is that
CentOS 6 does not meet the build requirements, shown here:

http://llvm.org/docs/GettingStarted.html#requirements

I built the required versions of software but the instructions don't cover
how to utilize them.

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:

make[2]: Nothing to be done for
`projects/compiler-rt/lib/builtins/CMakeFiles/builtins.dir/build'.
make[2]: Leaving directory `<clang-4.0.1>/src/build/llvm-4.0.1-redhat6'
[ 36%] Built target builtins
<llvm-4.0.1>/tools/llvm-config/llvm-config.cpp:47:35: fatal error:
LibraryDependencies.inc: No such file or directory
 #include "LibraryDependencies.inc"
                                   ^
compilation terminated.
make[2]: ***
[tools/llvm-config/CMakeFiles/llvm-config.dir/llvm-config.cpp.o] Error 1
make[2]: Leaving directory `<clang-4.0.1>/src/build/llvm-4.0.1-redhat6'
make[1]: *** [tools/llvm-config/CMakeFiles/llvm-config.dir/all] Error 2

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 :(

Thanks,
Uri


On Thu, Aug 31, 2017 at 3:47 AM, Csaba Raduly <rcsaba at gmail.com> wrote:

> Hi Uri,
>
> On Wed, Aug 30, 2017 at 11:35 PM, Uri Moszkowicz via cfe-dev
> <cfe-dev at lists.llvm.org> wrote:
> > Hi,
> > I'm having trouble building Clang on CentOS 6 and am hoping someone here
> can
> > help. I followed the instructions on this website:
> >
> > http://btorpey.github.io/blog/2015/01/02/building-clang/
>
> Seems a bit old, why not  https://clang.llvm.org/get_started.html
>
> >
> > I'm using GCC 6.3.0 and Python 2.7.13, both also built from source using
> > these options:
> >
> > -DCMAKE_C_COMPILER=<gcc-6.3.0>/redhat6/bin/gcc
> > -DCMAKE_CXX_COMPILER=<gcc-6.3.0>/redhat6/bin/g++
> > -DCMAKE_CXX_LINK_FLAGS='-L<gcc-6.3.0>/redhat6/lib64
> > -Wl,-rpath,<gcc-6.3.0>/redhat6/lib64'
> > -DLLVM_ENABLE_ASSERTIONS=ON
> > -DCMAKE_BUILD_TYPE=Release
> > -DLLVM_TARGETS_TO_BUILD=X86
> > -DGCC_INSTALL_PREFIX=<gcc-6.3.0>/redhat6
> > -DPYTHON_EXECUTABLE:FILEPATH=<python-2.7.13>/redhat6/bin/python
> > -DCMAKE_INSTALL_PREFIX=<clang-4.0.1>/redhat6
> >
> > The errors I'm seeing look like this (I used -j32):
> >
> > [  4%] Building CXX object
> > lib/TableGen/CMakeFiles/LLVMTableGen.dir/Main.cpp.o
> > [  4%] Building CXX object
> > lib/Option/CMakeFiles/LLVMOption.dir/OptTable.cpp.o
> > [  6%] Building C object
> > projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.
> builtins-x86_64.dir/absvdi2.c.o
> > [  6%] Building CXX object
> > projects/compiler-rt/lib/sanitizer_common/CMakeFiles/
> RTSanitizerCommonLibc.x86_64.dir/sanitizer_coverage_mapping_libcdep.cc.o
> > Scanning dependencies of target LLVMSupport
> > g++: fatal error: no input files
> > compilation terminated.
> > make[2]: *** [bin/llvm-PerfectShuffle] Error 1
> > make[1]: *** [utils/PerfectShuffle/CMakeFiles/llvm-
> PerfectShuffle.dir/all]
> > Error 2
> (snip)
> >
> > Any thoughts about what else I need to do?
>
> For debugging purposes, build with
>
> make VERBOSE=1
>
> This would print the actual compiler invocation; the we'll have a
> better chance figuring out what went wrong.
>
> Csaba
> --
> GCS a+ e++ d- C++ ULS$ L+$ !E- W++ P+++$ w++$ tv+ b++ DI D++ 5++
> The Tao of math: The numbers you can count are not the real numbers.
> Life is complex, with real and imaginary parts.
> "Ok, it boots. Which means it must be bug-free and perfect. " -- Linus
> Torvalds
> "People disagree with me. I just ignore them." -- Linus Torvalds
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20170901/24254e2c/attachment.html>


More information about the cfe-dev mailing list