<html><body><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;">At work I also have a RHEL 5 based environment and have to live with g++ v4.1.2 headers. (Later I'll switch to libc++.)</span></div><div><br></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;">Anyway I got around the compile error you descibe</span></div><div><pre><span style="font-size: 14px; " data-mce-style="font-size: 14px;">> error: weakref declaration must have internal linkage
> extern __typeof(pthread_once) __gthrw_pthread_once __attribute__
> ((__weakref__("pthread_once")));
</span></pre><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;">by defining away __weakref__ thus:</span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;">clang++ -D'__weakref__(X)=' ...</span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;">(writing this from memory, so I may err.)</span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;">Hope this helps,</span></div></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;"><br></span></div><div><span style="font-size: 14px; " data-mce-style="font-size: 14px;"> Gabor</span></div></body></html>