[LLVMdev] Unable to evaluate clang on linux or windows

C K Kashyap ckkashyap at gmail.com
Fri Oct 18 05:33:42 PDT 2013


Hi,
I'd really appreciate some pointers in this regard.
Regards,
Kashyap


On Wed, Oct 16, 2013 at 5:43 PM, C K Kashyap <ckkashyap at gmail.com> wrote:

> Sorry ... I missed mentioning the details -
>
> this is the error I get -
>
> root at no1slu398:~/Documents/LLVM/tmp# clang++ -std=c++0x  hello.cpp
> In file included from hello.cpp:1:
> In file included from
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/thread:38:
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:535:6:
> error: no matching constructor for initialization of 'duration' (aka
>       'std::chrono::duration<long, std::ratio<1, 1000000> >')
>           : __d(__t.time_since_epoch())
>             ^   ~~~~~~~~~~~~~~~~~~~~~~
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/condition_variable:106:42:
> note: in instantiation of function template specialization
>       'std::chrono::time_point<std::chrono::system_clock,
> std::chrono::duration<long, std::ratio<1, 1000000> >
> >::time_point<std::chrono::duration<long,
>       std::ratio<1, 1000000000> > >' requested here
>         const __clock_t::time_point __s_atime = __s_entry + __delta;
>                                                 ^
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:234:12:
> note: candidate constructor not viable: no known conversion from
>       'duration<[...], ratio<[...], 1000000000>>' to 'const
> duration<[...], ratio<[...], 1000000>>' for 1st argument
>         constexpr duration(const duration&) = default;
>                   ^
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:237:19:
> note: candidate template ignored: disabled by 'enable_if' [with _Rep2 =
>       std::chrono::duration<long, std::ratio<1, 1000000000> >]
>                enable_if<is_convertible<_Rep2, rep>::value
>                          ^
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:244:19:
> note: candidate template ignored: disabled by 'enable_if' [with _Rep2 =
> long, _Period2
>       = std::ratio<1, 1000000000>]
>                enable_if<treat_as_floating_point<rep>::value
>                          ^
> /usr/lib/gcc/x86_64-linux-gnu/4.6/../../../../include/c++/4.6/chrono:232:12:
> note: candidate constructor not viable: requires 0 arguments, but 1 was
> provided
>         constexpr duration() : __r() { }
>                   ^
> 1 error generated.
> root at no1slu398:~/Documents/LLVM/tmp# cat hello.cpp
> #include <thread>
>
>  int main() {
>   return 0;
> }
>
>
> Regards,
> Kashyap
>
>
>
> On Wed, Oct 16, 2013 at 7:40 AM, Ben Pope <benpope81 at gmail.com> wrote:
>
>> On 15/10/13 22:22, C K Kashyap wrote:
>> > Hi,
>> > I'd like to try out the new c++11 features using clang. However, I am
>> > running into some issue or the other on both Windows and Linux. In both
>> > cases, it looks like the problem is due to headers from VC/g++.
>> > I was wondering if someone can point me to some steps on setting up a
>> > Windows or Linux(ubuntu 12.04 LTS) box for exploring clang.
>> > I was able to successfully build clang on my ubuntu but that did not
>> > help in building my sample CPP files.
>>
>> It might help if you give us the compiler error and version of clang
>> you've compiled.
>>
>> I can compile C++ programs with libstdc++ or libc++ without issue.
>>
>> Windows support is experimental at the moment, so let's stick with
>> Ubuntu for now.
>>
>> Ben
>>
>>
>> _______________________________________________
>> LLVM Developers mailing list
>> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20131018/96507e7e/attachment.html>


More information about the llvm-dev mailing list