[cfe-dev] LLVM and Clang 3.1 on CentOS 5.6 GCC 4.4

Dmitri Shubin sbn at tbricks.com
Tue Aug 14 23:11:29 PDT 2012


On 14.08.2012 01:43, Mohamed Bana wrote:
> Any thoughts on this?  I just need someone to confirm if they've managed to get
> clang 3.1 working on stock CentOS 5.6 x86, and if so how they compiled clang.
I was able to build clang 3.1 from SVN on CentOS 5.8 (x86_64) with GCC 4.4

$ uname -a
Linux sbn 2.6.18-308.8.2.el5 #1 SMP Tue Jun 12 09:58:12 EDT 2012 x86_64 
x86_64 x86_64 GNU/Linux
$ cat /etc/redhat-release
CentOS release 5.8 (Final)
$ /usr/bin/gcc44 --version | head -1
gcc44 (GCC) 4.4.6 20110731 (Red Hat 4.4.6-3)
$ CC=/usr/bin/gcc44 CXX=/usr/bin/g++44 ../llvm/configure
checking for C compiler default output file name... a.out
checking whether the C compiler works... yes
...
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands
$ make -j 8
llvm[0]: Constructing LLVMBuild project information.
...
make[1]: Leaving directory `/nfshome/sbn/src/build-clang-lin/bindings'
llvm[0]: ***** Completed Debug+Asserts Build
llvm[0]: ***** Note: Debug build can be 10 times slower than an
llvm[0]: ***** optimized build. Use make ENABLE_OPTIMIZED=1 to
llvm[0]: ***** make an optimized build. Alternatively you can
llvm[0]: ***** configure with --enable-optimized.
$ ./Debug+Asserts/bin/clang --version
clang version 3.1 (branches/release_31 161861)
Target: x86_64-unknown-linux-gnu
Thread model: posix

But I have problems when I tried to build 32-bit version:

$ CC='/usr/bin/gcc44 -m32' CXX='/usr/bin/g++44 -m32' ../llvm/configure
checking for C compiler default output file name... a.out
...
config.status: executing tools/Makefile commands
config.status: executing tools/sample/Makefile commands
$ make -j 8
llvm[0]: Constructing LLVMBuild project information.
make[1]: Entering directory `/nfshome/sbn/src/build-clang-lin32/lib/Support'
...
   ARCHIVE:   clang_linux/full-i386/i386: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/full-i386/i386/libcompiler_rt.a
   ARCHIVE:   clang_linux/full-x86_64/x86_64: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/x86_64/libcompiler_rt.a
   ARCHIVE:   clang_linux/profile-i386/i386: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/profile-i386/i386/libcompiler_rt.a
   ARCHIVE:   clang_linux/profile-x86_64/x86_64: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/profile-x86_64/x86_64/libcompiler_rt.a
   FINAL-ARCHIVE: clang_linux/profile-i386: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/profile-i386/libcompiler_rt.a
   FINAL-ARCHIVE: clang_linux/profile-x86_64: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/profile-x86_64/libcompiler_rt.a
   FINAL-ARCHIVE: clang_linux/full-i386: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/full-i386/libcompiler_rt.a
   FINAL-ARCHIVE: clang_linux/full-x86_64: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/full-x86_64/libcompiler_rt.a
   ARCHIVE:   clang_linux/asan-x86_64/x86_64: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/x86_64/libcompiler_rt.a
   FINAL-ARCHIVE: clang_linux/asan-x86_64: 
/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/libcompiler_rt.a
make[5]: Leaving directory `/nfshome/sbn/src/llvm/projects/compiler-rt'
llvm[4]: Copying runtime library linux/profile-i386 to build dir
llvm[4]: Copying runtime library linux/full-i386 to build dir
llvm[4]: Copying runtime library linux/asan-i386 to build dir
cp: cannot stat 
`/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt/clang_linux/asan-i386/libcompiler_rt.a': 
No such file or directory
make[4]: *** 
[/nfshome/sbn/src/build-clang-lin32/Debug+Asserts/lib/clang/3.1/lib/linux/libclang_rt.asan-i386.a] 
Error 1
make[4]: *** Waiting for unfinished jobs....
rm 
/nfshome/sbn/src/build-clang-lin32/Debug+Asserts/lib/clang/3.1/lib/linux/.dir
make[4]: Leaving directory 
`/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory 
`/nfshome/sbn/src/build-clang-lin32/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/nfshome/sbn/src/build-clang-lin32/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/nfshome/sbn/src/build-clang-lin32/tools'
make: *** [all] Error 1



More information about the cfe-dev mailing list