https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82033
Bug ID: 82033 Summary: C++11 <thread> library doesn't work on AIX if GCC is built with --disable-bootstrap Product: gcc Version: 7.2.0 Status: UNCONFIRMED Severity: normal Priority: P3 Component: libstdc++ Assignee: unassigned at gcc dot gnu.org Reporter: sam.thursfield at codethink dot co.uk Target Milestone: --- Host: powerpc-ibm-aix7.1.0.0 Target: powerpc-ibm-aix7.1.0.0 Build: powerpc-ibm-aix7.1.0.0 Here's a simple testcase: ``` #include <string> #include <iostream> #include <thread> using namespace std; void task1(string msg) { cout << "task1 says: " << msg; } int main() { std::thread t1(task1, "Hello"); t1.join(); } ``` This builds fine using `g++ -std=c++11 -pthread`. *Unless* you built the compiler with `--disable-bootstrap`. In that case, it fails: ```threadtest.cpp: In function 'int main()': threadtest.cpp:16:10: error: 'thread' is not a member of 'std' std::thread t1(task1, "Hello"); ^~~~~~ threadtest.cpp:16:10: note: suggested alternative: 'tera' std::thread t1(task1, "Hello"); ^~~~~~ tera threadtest.cpp:19:5: error: 't1' was not declared in this scope t1.join(); ^~ threadtest.cpp:19:5: note: suggested alternative: 'tm' t1.join(); ^~ tm ```