Thanks for the information.
I am running on a machine on which gcc44 is installed but whose default
installation is 4.1.2.
I ran
../llvm/configure CC=gcc44 CXX=g++44
make
and still got the same error (I checked and CC=gcc44 and CXX=g++44 now in
build/Makefile.config)..
I tried also
../llvm/configure CC=gcc44 CXX=g++44 --include_dir=<gcc44 include dir>
but it didn't help either.
I couldn't find in the gcc44 directories the the file gthr-default.h, on
which the error is issued.
The error is issued while compiling the line line #include <algorithm>
in llvm/projects/compiler-rt/lib/asan/asan_posix.cc
the line is preceded by the comment
// Should not add dependency on libstdc++
Below are the gcc44 directories installed on the machine. Do you know what
else is needed in order to resolve the problem?
Thanks,
Sitvanit
/usr/bin/gcc44
/usr/bin/gcov44
/usr/bin/i386-redhat-linux6E-gcc44
/usr/lib/gcc
/usr/lib/gcc/i386-redhat-linux6E
/usr/lib/gcc/i386-redhat-linux6E/4.4.6
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtbegin.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtbeginS.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtbeginT.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtend.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtendS.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtfastmath.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtprec32.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtprec64.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/crtprec80.o
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/abmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/ammintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/avxintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/bmiintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/bmmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/cpuid.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/cross-stdarg.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/emmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/float.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/fma4intrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/immintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/iso646.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/limits.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/lwpintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/mm3dnow.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/mm_malloc.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/mmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/nmmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/omp.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/pmmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/popcntintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/smmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/stdarg.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/stdbool.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/stddef.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/stdfix.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/syslimits.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/tbmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/tmmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/unwind.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/varargs.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/wmmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/x86intrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/xmmintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/include/xopintrin.h
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libcloog.so.0
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgcc.a
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgcc_eh.a
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgcc_s.so
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgcov.a
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgomp.a
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgomp.so
/usr/lib/gcc/i386-redhat-linux6E/4.4.6/libgomp.spec
/usr/libexec/gcc
/usr/libexec/gcc/i386-redhat-linux6E
/usr/libexec/gcc/i386-redhat-linux6E/4.4.6
/usr/libexec/gcc/i386-redhat-linux6E/4.4.6/cc1
/usr/libexec/gcc/i386-redhat-linux6E/4.4.6/collect2
/usr/share/doc/gcc44-4.4.6
/usr/share/doc/gcc44-4.4.6/COPYING
/usr/share/doc/gcc44-4.4.6/COPYING.LIB
/usr/share/doc/gcc44-4.4.6/COPYING3
/usr/share/doc/gcc44-4.4.6/COPYING3.LIB
/usr/share/doc/gcc44-4.4.6/ChangeLog-1997.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-1998.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-1999.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2000.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2001.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2002.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2003.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2004.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2005.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2006.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2007.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog-2008.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.dataflow.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.lib.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.ptr.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.tree-ssa.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.tuples.bz2
/usr/share/doc/gcc44-4.4.6/ChangeLog.vta.bz2
/usr/share/doc/gcc44-4.4.6/README.Portability
Sitvanit Ruah
Formal Verification Group
IBM Haifa Research Laboratory
Tel: 972-4-828-1249
From: NAKAMURA Takumi <geek4civic at gmail.com>
To: Sitvanit Ruah/Haifa/IBM at IBMIL,
Cc: llvmdev at cs.uiuc.edu
Date: 11/07/2012 02:42 PM
Subject: Re: [LLVMdev] Compiling llvm and Clang on Linux
Sent by: llvmdev-bounces at cs.uiuc.edu
It's undocumented FAQ, if you are using RHEL5 (or clone).
- install gcc44-c++
- Build with CC=gcc44 CXX=g++44
- You may need "CC=clang -std=gnu89" to use clang with its glibc.
Have fun!
ps. AFAIK, clang can be built more easily on centos6.
...Takumi
2012/7/11 Sitvanit Ruah <RUAH at il.ibm.com>:>
> Hello all,
> I am new to this mailing list so I hope this is the right place to post
the> following question.
>
> We are considering using Clang front end for our tool. I tried to compile
> LLVM
> (using configure followed by make from the llvm top directory) on LINUX
> X86 with gcc 4.1.2.
>
> I got several compilation error messages of the form
>
> /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)
>
> Could you guide me on how to resolve these errors?
> I downloaded the sources from the web page (not from SVN).
> Thanks,
> Sitvanit
>
>
> Sitvanit Ruah
> Formal Verification Group
> IBM Haifa Research Laboratory
>
>
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
_______________________________________________
LLVM Developers mailing list
LLVMdev at cs.uiuc.edu http://llvm.cs.uiuc.edu
http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev