I am trying to port a program that was running without any problem when the environment set up was Ubuntu 12.0 QTCreator Version - 2.4.1 QT - 4.8.0 gcc - 4.6.3 to a new environment

Ubuntu 14.04 QTCreator Version - 3.0.1 QT - 5.2.1 gcc - 4.8

Unfortunately I end up seeing a runtime error "terminate called after throwing an instance of 'std::system_error' what(): Enable multithreading to use std::thread:Operation not permitted"

As per my understanding this seems to be an issue with compiler compatibility. Either I miss some options during compilations or a bug from compiler.

How to get his fixed? Any help is greatly appreciated.

  • std::thread was introduced with C++11. Are you compiling with that standard? Also this question belongs to Stack Overflow. – Potaito Apr 29 '16 at 10:40
  • @potAito: Not compiling with C++11 and not linking to pthread would both give compilation errors, not runtime exceptions. – mastov Apr 29 '16 at 11:09

gcc 4.8 had a bug related to this. You could try the workaround mentioned in the bug report: Add the flags


to the compilation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.