Question

I recently downloaded code as mentioned in http://clang.llvm.org/get_started.html link. My GCC version is 4.1.2. The compilation went fine for at least an hour before the below error started to occur in console.

The LLVM support stated that I need to use gcc44-c++, which is not available in our box:

Red Hat Enterprise Linux Server release 5.5 (Tikanga)
# yum install gcc44-c++
Loaded plugins: security
ppsd-nonprod-base                                                              
                      | 2.1 kB     00:00
ppsd-nonprod-extras                                                            
                      | 2.1 kB     00:00
ppsd-nonprod-extras/primary_db                                                 
                      | 173 kB     00:00
ppsd-prod-base                                                                 
                      | 2.1 kB     00:00
ppsd-prod-extras                                                               
                      | 2.1 kB     00:00
ppsd-prod-updates                                                              
                      | 1.9 kB     00:00
Setting up Install Process
No package gcc44-c++ available.
Nothing to do

Please let me know if gcc44-c++ actually means GCC 4.4 C++ compiler or it is a different compiler. If different please let me know how can I download and install the same for Red Hat 5.4 OS?

  MKDIR:    
prakash_prasad/install_packages/LLVM/build/tools/clang/runtime/compiler-rt/clang_linux/asan-x86_64/x86_64/SubDir.lib__asan
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_allocator.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_globals.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_interceptors.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_linux.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_mac.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_malloc_mac.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_malloc_win.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_new_delete.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_poisoning.cc
  COMPILE:   clang_linux/asan-x86_64/x86_64:
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_posix.cc
In file included from
prakash_prasad/install_packages/LLVM/llvm/projects/compiler-rt/lib/asan/asan_posix.cc:38:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/algorithm:64:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/stl_algobase.h:69:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/iosfwd:45:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/c++io.h:38:
In file included from
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr.h:132:
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:100:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_once)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:101:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_getspecific)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:102:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_setspecific)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:103:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_create)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:104:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_cancel)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:105:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutex_lock)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:106:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutex_trylock)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:107:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutex_unlock)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:108:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutex_init)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:109:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_cond_broadcast)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:110:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_cond_wait)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:113:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_key_create)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:114:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_key_delete)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:115:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutexattr_init)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:116:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutexattr_settype)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
                                             ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:117:1:
error: weakref declaration must have
      internal linkage
__gthrw(pthread_mutexattr_destroy)
^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:81:23:
note: expanded from macro '__gthrw'
#define __gthrw(name) __gthrw2(__gthrw_ ## name,name,name)
                      ^
/usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/x86_64-redhat-linux/bits/gthr-default.h:72:46:
note: expanded from macro '__gthrw2'
  extern __typeof(type) name __attribute__ ((__weakref__(#name2))); \
Was it helpful?

Solution

Please let me know if gcc44-c++ actually means GCC 4.4 C++ compiler or it is a different compiler.

It means that you need GCC 4.4 (or higher). I'd suggest that you upgrade to the latest 4.7.

If different please let me know how can I download and install the same for Red Hat 5.4 OS?

You will need to upgrade your compiler. A quick search reveals quite a few RPMs are available. Select one that fits your system.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top