On trusty the problem is still present when linking against any of the boost 
library (tried both 1.54.0 or 1.55.0) - the workaround (-Wl,--no-as-needed) 
still works though. This is what I get using the 'thread.cpp' provided above:

craczy@vb:/tmp$ g++ thread.cpp -pthread -std=c++11 -o thread
craczy@vb:/tmp$ ./thread 
1307674368000
355687428096000
craczy@vb:/tmp$ g++ thread.cpp -pthread -std=c++11 -o thread -lboost_filesystem
craczy@vb:/tmp$ ./thread 
terminate called after throwing an instance of 'std::system_error'
  what():  Enable multithreading to use std::thread: Operation not permitted
Aborted (core dumped)
craczy@vb:/tmp$ cat /etc/lsb-release 
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=14.04
DISTRIB_CODENAME=trusty
DISTRIB_DESCRIPTION="Ubuntu 14.04.1 LTS"
craczy@vb:/tmp$

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1228201

Title:
  g++ doesn't compile simple code, using thread header

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to