[Bug 1228201] [NEW] g++ doesn't compile simple code, using thread header
shkiper325
shkiper325 at gmail.com
Fri Sep 20 15:08:31 UTC 2013
Public bug reported:
Bug is only for 13.10. I'm learning c++ and I tried to write a simple code using std::thread (code is in attachment). I found info, that the code won't build without -pthread/-lpthread g++ option. I build code with every position of this flags and with std=c++11/std=c++0x, but I've got the same error:
shkiper at server:~/C++$ g++ thread.cpp -pthread -std=c++11 -o thread
shkiper at server:~/C++$ ./thread
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Аварийный останов (сделан дамп памяти)
shkiper at server:~/C++$
I tryed to build this code on live cd - same error.
It bullds and works on ubuntu <13.10.
I think, g++ doesn't links pthread lib:
shkiper at server:~/C++$ ldd thread
linux-vdso.so.1 => (0x00007fff4172b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff895b72000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff89595c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff895594000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff895290000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff895e95000)
shkiper at server:~/C++ ll /usr/lib/x86_64-linux-gnu/ | grep thread
lrwxrwxrwx 1 root root 26 авг. 23 18:27 libfftw3f_threads.so.3 -> libfftw3f_threads.so.3.3.2
-rw-r--r-- 1 root root 26992 дек. 10 2012 libfftw3f_threads.so.3.3.2
lrwxrwxrwx 1 root root 25 дек. 10 2012 libfftw3_threads.so.3 -> libfftw3_threads.so.3.3.2
-rw-r--r-- 1 root root 26992 дек. 10 2012 libfftw3_threads.so.3.3.2
lrwxrwxrwx 1 root root 27 авг. 23 18:27 libgpgme-pthread.so.11 -> libgpgme-pthread.so.11.10.0
-rw-r--r-- 1 root root 207088 июля 30 12:43 libgpgme-pthread.so.11.10.0
lrwxrwxrwx 1 root root 26 сент. 18 16:44 libgthread-2.0.so.0 -> libgthread-2.0.so.0.3793.0
-rw-r--r-- 1 root root 6088 сент. 18 16:45 libgthread-2.0.so.0.3793.0
-rw-r--r-- 1 root root 1801210 авг. 1 02:52 libpthread.a
-rw-r--r-- 1 root root 4756 авг. 1 02:52 libpthread_nonshared.a
-rw-r--r-- 1 root root 252 авг. 1 02:52 libpthread.so
lrwxrwxrwx 1 root root 23 авг. 23 18:27 libssh_threads.so.4 -> libssh_threads.so.4.2.4
-rw-r--r-- 1 root root 6200 мая 3 19:54 libssh_threads.so.4.2.4
lrwxrwxrwx 1 root root 39 авг. 23 18:27 libthread_db.so -> /lib/x86_64-linux-gnu/libthread_db.so.1
lrwxrwxrwx 1 root root 22 февр. 2 2013 libthreadutil.so.6 -> libthreadutil.so.6.0.2
-rw-r--r-- 1 root root 26464 февр. 2 2013 libthreadutil.so.6.0.2
shkiper at server:~/C++$
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: g++ 4:4.8.1-2ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-7.14-generic 3.11.1
Uname: Linux 3.11.0-7-generic x86_64
ApportVersion: 2.12.4-0ubuntu1
Architecture: amd64
Date: Fri Sep 20 18:58:19 2013
InstallationDate: Installed on 2013-08-23 (28 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130822)
MarkForUpload: True
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
** Affects: gcc-defaults (Ubuntu)
Importance: Undecided
Status: New
** Tags: amd64 saucy
** Attachment added: "thread.cpp"
https://bugs.launchpad.net/bugs/1228201/+attachment/3831609/+files/thread.cpp
** Description changed:
- Bus is only for 13.10. I'm learning c++ and I tried to write a simple code using std::thread (code is in attachment). I found info, that the code won't build without -pthread/-lpthread g++ option. I build code with every position of this flags and with std=c++11/std=c++0x, but I've got the same error:
+ Bug is only for 13.10. I'm learning c++ and I tried to write a simple code using std::thread (code is in attachment). I found info, that the code won't build without -pthread/-lpthread g++ option. I build code with every position of this flags and with std=c++11/std=c++0x, but I've got the same error:
shkiper at server:~/C++$ g++ thread.cpp -pthread -std=c++11 -o thread
shkiper at server:~/C++$ ./thread
terminate called after throwing an instance of 'std::system_error'
- what(): Enable multithreading to use std::thread: Operation not permitted
+ what(): Enable multithreading to use std::thread: Operation not permitted
Аварийный останов (сделан дамп памяти)
- shkiper at server:~/C++$
+ shkiper at server:~/C++$
I tryed to build this code on live cd - same error.
It bullds and works on ubuntu <13.10.
I think, g++ doesn't links pthread lib:
shkiper at server:~/C++$ ldd thread
- linux-vdso.so.1 => (0x00007fff4172b000)
- libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff895b72000)
- libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff89595c000)
- libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff895594000)
- libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff895290000)
- /lib64/ld-linux-x86-64.so.2 (0x00007ff895e95000)
+ linux-vdso.so.1 => (0x00007fff4172b000)
+ libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff895b72000)
+ libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff89595c000)
+ libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff895594000)
+ libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff895290000)
+ /lib64/ld-linux-x86-64.so.2 (0x00007ff895e95000)
shkiper at server:~/C++ ll /usr/lib/x86_64-linux-gnu/ | grep thread
lrwxrwxrwx 1 root root 26 авг. 23 18:27 libfftw3f_threads.so.3 -> libfftw3f_threads.so.3.3.2
-rw-r--r-- 1 root root 26992 дек. 10 2012 libfftw3f_threads.so.3.3.2
lrwxrwxrwx 1 root root 25 дек. 10 2012 libfftw3_threads.so.3 -> libfftw3_threads.so.3.3.2
-rw-r--r-- 1 root root 26992 дек. 10 2012 libfftw3_threads.so.3.3.2
lrwxrwxrwx 1 root root 27 авг. 23 18:27 libgpgme-pthread.so.11 -> libgpgme-pthread.so.11.10.0
-rw-r--r-- 1 root root 207088 июля 30 12:43 libgpgme-pthread.so.11.10.0
lrwxrwxrwx 1 root root 26 сент. 18 16:44 libgthread-2.0.so.0 -> libgthread-2.0.so.0.3793.0
-rw-r--r-- 1 root root 6088 сент. 18 16:45 libgthread-2.0.so.0.3793.0
-rw-r--r-- 1 root root 1801210 авг. 1 02:52 libpthread.a
-rw-r--r-- 1 root root 4756 авг. 1 02:52 libpthread_nonshared.a
-rw-r--r-- 1 root root 252 авг. 1 02:52 libpthread.so
lrwxrwxrwx 1 root root 23 авг. 23 18:27 libssh_threads.so.4 -> libssh_threads.so.4.2.4
-rw-r--r-- 1 root root 6200 мая 3 19:54 libssh_threads.so.4.2.4
lrwxrwxrwx 1 root root 39 авг. 23 18:27 libthread_db.so -> /lib/x86_64-linux-gnu/libthread_db.so.1
lrwxrwxrwx 1 root root 22 февр. 2 2013 libthreadutil.so.6 -> libthreadutil.so.6.0.2
-rw-r--r-- 1 root root 26464 февр. 2 2013 libthreadutil.so.6.0.2
shkiper at server:~/C++$
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: g++ 4:4.8.1-2ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-7.14-generic 3.11.1
Uname: Linux 3.11.0-7-generic x86_64
ApportVersion: 2.12.4-0ubuntu1
Architecture: amd64
Date: Fri Sep 20 18:58:19 2013
InstallationDate: Installed on 2013-08-23 (28 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130822)
MarkForUpload: True
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
--
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to gcc-defaults in Ubuntu.
https://bugs.launchpad.net/bugs/1228201
Title:
g++ doesn't compile simple code, using thread header
Status in “gcc-defaults” package in Ubuntu:
New
Bug description:
Bug is only for 13.10. I'm learning c++ and I tried to write a simple code using std::thread (code is in attachment). I found info, that the code won't build without -pthread/-lpthread g++ option. I build code with every position of this flags and with std=c++11/std=c++0x, but I've got the same error:
shkiper at server:~/C++$ g++ thread.cpp -pthread -std=c++11 -o thread
shkiper at server:~/C++$ ./thread
terminate called after throwing an instance of 'std::system_error'
what(): Enable multithreading to use std::thread: Operation not permitted
Аварийный останов (сделан дамп памяти)
shkiper at server:~/C++$
I tryed to build this code on live cd - same error.
It bullds and works on ubuntu <13.10.
I think, g++ doesn't links pthread lib:
shkiper at server:~/C++$ ldd thread
linux-vdso.so.1 => (0x00007fff4172b000)
libstdc++.so.6 => /usr/lib/x86_64-linux-gnu/libstdc++.so.6 (0x00007ff895b72000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007ff89595c000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff895594000)
libm.so.6 => /lib/x86_64-linux-gnu/libm.so.6 (0x00007ff895290000)
/lib64/ld-linux-x86-64.so.2 (0x00007ff895e95000)
shkiper at server:~/C++ ll /usr/lib/x86_64-linux-gnu/ | grep thread
lrwxrwxrwx 1 root root 26 авг. 23 18:27 libfftw3f_threads.so.3 -> libfftw3f_threads.so.3.3.2
-rw-r--r-- 1 root root 26992 дек. 10 2012 libfftw3f_threads.so.3.3.2
lrwxrwxrwx 1 root root 25 дек. 10 2012 libfftw3_threads.so.3 -> libfftw3_threads.so.3.3.2
-rw-r--r-- 1 root root 26992 дек. 10 2012 libfftw3_threads.so.3.3.2
lrwxrwxrwx 1 root root 27 авг. 23 18:27 libgpgme-pthread.so.11 -> libgpgme-pthread.so.11.10.0
-rw-r--r-- 1 root root 207088 июля 30 12:43 libgpgme-pthread.so.11.10.0
lrwxrwxrwx 1 root root 26 сент. 18 16:44 libgthread-2.0.so.0 -> libgthread-2.0.so.0.3793.0
-rw-r--r-- 1 root root 6088 сент. 18 16:45 libgthread-2.0.so.0.3793.0
-rw-r--r-- 1 root root 1801210 авг. 1 02:52 libpthread.a
-rw-r--r-- 1 root root 4756 авг. 1 02:52 libpthread_nonshared.a
-rw-r--r-- 1 root root 252 авг. 1 02:52 libpthread.so
lrwxrwxrwx 1 root root 23 авг. 23 18:27 libssh_threads.so.4 -> libssh_threads.so.4.2.4
-rw-r--r-- 1 root root 6200 мая 3 19:54 libssh_threads.so.4.2.4
lrwxrwxrwx 1 root root 39 авг. 23 18:27 libthread_db.so -> /lib/x86_64-linux-gnu/libthread_db.so.1
lrwxrwxrwx 1 root root 22 февр. 2 2013 libthreadutil.so.6 -> libthreadutil.so.6.0.2
-rw-r--r-- 1 root root 26464 февр. 2 2013 libthreadutil.so.6.0.2
shkiper at server:~/C++$
ProblemType: Bug
DistroRelease: Ubuntu 13.10
Package: g++ 4:4.8.1-2ubuntu2
ProcVersionSignature: Ubuntu 3.11.0-7.14-generic 3.11.1
Uname: Linux 3.11.0-7-generic x86_64
ApportVersion: 2.12.4-0ubuntu1
Architecture: amd64
Date: Fri Sep 20 18:58:19 2013
InstallationDate: Installed on 2013-08-23 (28 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Alpha amd64 (20130822)
MarkForUpload: True
SourcePackage: gcc-defaults
UpgradeStatus: No upgrade log present (probably fresh install)
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/gcc-defaults/+bug/1228201/+subscriptions
More information about the foundations-bugs
mailing list