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

Mohamed Bana mohamed at bana.org.uk
Tue Aug 7 07:21:47 PDT 2012


Konstantin Tokarev <annulen at ...> writes:

> 
> 
> > After starting configure as:
> > 
> > CC=gcc44 CXX=g++44 ../configure --prefix=/home/dev/software-builds/llvm-
3.1_install
> --enable-optimized --enable-assertions --with-c-include-
dirs=/usr/include/c++/4.4.6
> > 
> > I get this error message:
> > 
> > ...
> > MKDIR: /home/dev/software-builds/llvm-
3.1.src/build/tools/clang/runtime/compiler-rt/clang_linux/asan-i386
> > 
> > COMPILE: clang_linux/full-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/absvdi2.c
> > COMPILE: clang_linux/full-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/absvsi2.c
> > 
> > COMPILE: clang_linux/full-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/absvti2.c
> > COMPILE: clang_linux/full-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/adddf3.c
> > 
> > COMPILE: clang_linux/full-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/addsf3.c
> > In file included from /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/absvdi2.c:15:
> > 
> > In file included from /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/int_lib.h:41:
> > In file included from /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/int_types.h:21:
> > 
> > /home/dev/software-builds/llvm-3.1.src/projects/compiler-
rt/lib/int_endianness.h:71In file
> included from /home/dev/software-builds/llvm-3.1.src/projects/compiler-
rt/lib/absvsi2.c:15:
> > 
> > In file included from /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/int_lib.h:41:
> > In file included from /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/int_types.h:21:
> > 
> > /home/dev/software-builds/llvm-3.1.src/projects/compiler-
rt/lib/int_endianness.h:71:10:
> fatal error: 'endian.h' file not found
> > :#include <endian.h>
> > 
> > ^
> > 10: fatal error: 'endian.h' file not found
> > #include <endian.h>
> > 
> > ^1 error generated.
> > 
> > What am I doing wrong?
> 
> You are missing /usr/include in --with-c-include-dirs list
> 
>  -- 
> Regards,
> Konstantin
> 

That didn't work

  COMPILE:   clang_linux/asan-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/asan/asan_poisoning.cc
  COMPILE:   clang_linux/asan-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/asan/asan_posix.cc
In file included from /home/dev/software-builds/llvm-3.1.src/projects/compiler-
rt/lib/asan/asan_posix.cc:35:
In file included from /usr/lib/gcc/i386-redhat-
linux/4.1.2/../../../../include/c++/4.1.2/algorithm:64:
In file included from /usr/lib/gcc/i386-redhat-
linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_algobase.h:69:
In file included from /usr/lib/gcc/i386-redhat-
linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:45:
In file included from /usr/lib/gcc/i386-redhat-
linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux/bits/c++io.h  
COMPILE:   clang_linux/asan-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/asan/asan_printf.cc
:38:
In file included from /usr/lib/gcc/i386-redhat-
linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-linux/bits/gthr.h:132:
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:100:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_once)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:101:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_getspecific)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:102:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_setspecific)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:103:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_create)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:104:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_cancel)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
  COMPILE:   clang_linux/asan-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/asan/asan_rtl.cc
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:105:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutex_lock)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:106:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutex_trylock)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:107:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutex_unlock)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:108:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutex_init)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:109:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_cond_broadcast)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:110:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_cond_wait)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:113:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_key_create)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:114:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_key_delete)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:115:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutexattr_init)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:116:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutexattr_settype)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:117:1: error: weakref declaration must have internal 
linkage
__gthrw(pthread_mutexattr_destroy)
^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:81:23: note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/i386-redhat-linux/4.1.2/../../../../include/c++/4.1.2/i386-redhat-
linux/bits/gthr-default.h:72:46: note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
  COMPILE:   clang_linux/asan-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/asan/asan_stack.cc
  COMPILE:   clang_linux/asan-i386/i386: /home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt/lib/asan/asan_stats.cc
16 errors generated.
make[5]: *** [/home/dev/software-builds/llvm-
3.1.src/build/tools/clang/runtime/compiler-rt/clang_linux/asan-
i386/i386/SubDir.lib__asan/asan_posix.o] Error 1
make[5]: *** Waiting for unfinished jobs....
make[5]: Leaving directory `/home/dev/software-builds/llvm-
3.1.src/projects/compiler-rt'
make[4]: *** [BuildRuntimeLibraries] Error 2
rm /home/dev/software-builds/llvm-
3.1.src/build/Release+Asserts/lib/clang/3.1/lib/linux/.dir
make[4]: Leaving directory `/home/dev/software-builds/llvm-
3.1.src/build/tools/clang/runtime/compiler-rt'
make[3]: *** [compiler-rt/.makeall] Error 2
make[3]: Leaving directory `/home/dev/software-builds/llvm-
3.1.src/build/tools/clang/runtime'
make[2]: *** [all] Error 1
make[2]: Leaving directory `/home/dev/software-builds/llvm-
3.1.src/build/tools/clang'
make[1]: *** [clang/.makeall] Error 2
make[1]: Leaving directory `/home/dev/software-builds/llvm-3.1.src/build/tools'
make: *** [all] Error 1


Configure line:

[dev at localhost build]$ ./config.status --v
LLVM config.status 3.1
configured by ../configure, generated by GNU Autoconf 2.60,
  with options "'--prefix=/home/dev/software-builds/llvm-3.1_install' '--enable-
optimized' '--enable-assertions' '--with-c-include-
dirs=/usr/include/c++/4.4.6:/usr/include' 'CC=gcc44' 'CXX=g++44'"

Copyright (C) 2006 Free Software Foundation, Inc.
This config.status script is free software; the Free Software Foundation
gives unlimited permission to copy, distribute and modify it.


I also tried

--with-c-include-dirs=/usr/include:/usr/include/c++/4.4.6


 —Mohamed




More information about the cfe-dev mailing list