[cfe-users] installing a complete clang++ environment

Robin Sommer robin at icir.org
Tue Sep 30 15:20:14 PDT 2014


I've written (and just updated) a script to bootstrap clang, including
the various support libraries, into an arbitrary prefix, see

    http://https://github.com/rsmmr/install-clang

Robin

On Fri, Sep 26, 2014 at 10:43 +0200, Klaus Rudolph wrote:

> I try to use clang 3.6 for c++ development. I found a "clang+llvm-3.5.0-x86_64-fedora20.tar.xz" binary. But compiling with it results in:
> 
> ...
> /usr/lib/gcc/x86_64-redhat-linux/4.8.3/../../../../include/c++/4.8.3/cstdio:120:11: error: no member named 'gets' in the global namespace
> ...
> 
> which shows that clang uses my system installed stdlibc++ which is not what I want.
> 
> After searching a lot I found that I should set:
> CXXFLAGS=-stdlib=libc++ -nodefaultlibs -lc++ -lc++abi -lm -lc -lgcc_s -lgcc
> 
> which simply results in:
> /usr/bin/ld: cannot find -lc++
> /usr/bin/ld: cannot find -lc++abi
> 
> OK, both libs are not part of the binary prebuild.
> 
> Where can I find the needed libraries? If not, how can I compile a complete clang++? And how to install them?
> 
> Is there any full documentation about clang installing and first steps for using tutorial?
> 
> My problem is that I could find a lot of information, but nothing is complete. Each page I found give only a piece of information and combining all the infos results in incompatible solutions.
> 
> Regards!
>  Klaus
> 
> 
> 
> _______________________________________________
> cfe-users mailing list
> cfe-users at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-users
> 


-- 
Robin Sommer * Phone +1 (510) 722-6541 *     robin at icir.org
ICSI/LBNL    * Fax   +1 (510) 666-2956 * www.icir.org/robin



More information about the cfe-users mailing list