[LLVMdev] Compiling llvm and Clang on Linux

NAKAMURA Takumi geek4civic at gmail.com
Wed Jul 11 04:40:49 PDT 2012


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



More information about the llvm-dev mailing list