Yes, it's almost enough for me to get to FreeBSD, particularly as I really like the bsd licence, sad as that may seem :-). I think 10 will be switched over completely to clang/libc++. I see libcxxab now reports to have nearly everything done for linux, but I cannot see how it's built at all, I hoped it would build with libc++ as part of cmake, but alas !! <br>
<br>I think FreeBSD has libc++ set up as some filter library which I do not understand but if this worked on linux it would be great as we (in house) have moved to c++11 and until libc++ can seat itself with some abi implementation that allows std::async etc. I am afraid I code/check/compile in clang and compile/run in gcc 4.6 and 4.7. <br>
<br>Thanks <div>David<br><div class="gmail_quote">On Tue, May 29, 2012 at 3:22 PM, David Chisnall <span dir="ltr"><<a href="mailto:csdavec@swan.ac.uk" target="_blank">csdavec@swan.ac.uk</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
I can't speak for Linux, but I just tried your example on FreeBSD 9-STABLE with the default configuration of clang++, libc++ and libcxxrt that ship as part of the base system and it worked correctly with the following compile command:<br>
<br>
$ clang++ -std=c++11 thread.cc -o thread -pthread -stdlib=libc++<br>
<br>
David<br>
<div><div class="h5"><br>
On 29 May 2012, at 14:36, David Irvine wrote:<br>
<br>
> I am curious if anyone has been able to get clang++ to run std::async in linux at all. If so the process would be great. I have tried TOT + libc++, with stdc++ and also the recently released binaries. In no configuration can I get this to work. As recently reported (not by me) in another mail (lost now), the following fails :<br>
><br>
> #include <thread><br>
><br>
> void f(){}<br>
><br>
> int main() {<br>
> std::thread t(f);<br>
> t.join();<br>
> }<br>
><br>
> compiled with<br>
><br>
> clang++ -std=c++11 thread.cc -o thread -pthread<br>
><br>
> output<br>
><br>
> ./thread<br>
> pure virtual method called<br>
> terminate called without an active exception<br>
> Aborted (core dumped)<br>
><br>
> using<br>
><br>
> clang++ --version<br>
> clang version 3.1 (tags/RELEASE_31/final)<br>
> Target: x86_64-unknown-linux-gnu<br>
> Thread model: posix<br>
><br>
> std::async seems to fail at runtime, I think this is due to abi issues but cannot be sure.<br>
><br>
> Best Regards<br>
> David Irvine<br>
><br>
</div></div>> _______________________________________________<br>
> cfe-dev mailing list<br>
> <a href="mailto:cfe-dev@cs.uiuc.edu">cfe-dev@cs.uiuc.edu</a><br>
> <a href="http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev" target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev</a><br>
<br>
</blockquote></div><br></div>