[cfe-dev] Trouble building Clang on CentOS 6

Csaba Raduly via cfe-dev cfe-dev at lists.llvm.org
Thu Aug 31 01:47:32 PDT 2017


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



More information about the cfe-dev mailing list