http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58909
Bug ID: 58909 Summary: C++11's condition variables fail with static linkin Product: gcc Version: unknown Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: joel at clambassador dot com The program: #include <condition_variable> int main () { std::condition_variable a; } statically compiled as either: g++ --std=c++0x -static -pthread aa.cc -lpthread clang++ --std=c++11 -static -pthread aa.cc -lpthread segfaults at the destructor's implicit call to pthread_cond_destroy(). Other uses of std::condition_variable also fail. nm shows that pthread_cond_* functions are only 'w', while programs that use other aspects of c++ threading, such as mutexes, will have 'W' pthread_mutex_* and corresponding "T" __pthread_mutex_* available.