[cfe-dev] [LLVMdev] Compiling std::string with clang

NAKAMURA Takumi geek4civic at gmail.com
Sat Aug 11 07:17:38 PDT 2012


Dmitry,

You may install gcc44-c++ if you use RHEL5 (or its clone).
Clang++ is aware of libstdc++-devel-4.4.x.

Please ask cfe-dev for clang issues.

...Takumi

2012/8/9 Dmitry Pidan <PIDAN1 at il.ibm.com>:
>   Hi,
>   I am new to LLVM, so I am sorry if the question I am going to ask has
> already been raised before. I will be thankful if anyone can describe me a
> quick way to search relevant topics within the list archive,
>   When I am trying to compile a simple code, containing access to
> std::string, with clang:
>
>     #include <string>
>     int main()
>     {
>           std::string s;
>           return 0;
>     }
>
>    I am getting a plenty of following errors:
>
> In file included from test_string.cpp:1:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/string:46:
> In file included from
> /usr/lib/gcc/x86_64-redhat-linux/4.1.2/../../../../include/c++/4.1.2/bits/char_traits.h:46:
> 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:46:
> 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:68:
> error: weakref declaration must have internal linkage
> extern __typeof(pthread_once) __gthrw_pthread_once __attribute__
> ((__weakref__("pthread_once")));
>
>    In one of the development phorums, I found somebody saying that LLVM does
> not support gcc 4.1 libraries. Is that true? If yes, which libraries should
> I use, in case I would like to use llvm 2.9?
>
>
>   Regards,
>   Dmitry
>
>
> Dmitry Pidan
> Emerging Quality Technologies Group
> IBM Haifa Research Lab.
> Lotus Notes: Dmitry Pidan/Haifa/IBM at IBMIL
> E-mail: pidan1 at il.ibm.com
> Phone: 972-4-8296036
>
> _______________________________________________
> 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 cfe-dev mailing list