* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
@ 2012-12-19 15:51 ` redi at gcc dot gnu.org
2012-12-19 20:36 ` redi at gcc dot gnu.org
` (8 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-19 15:51 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |NEW
Last reconfirmed| |2012-12-19
Component|bootstrap |libstdc++
Ever Confirmed|0 |1
--- Comment #1 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-19 15:51:25 UTC ---
I've been expecting this error ... someone needs to provide an implementation
of __sleep_for that works on mingw, maybe using the Sleep() function or
whatever alternative to ::sleep() and ::usleep() exists on that platform.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
2012-12-19 15:51 ` [Bug libstdc++/55741] " redi at gcc dot gnu.org
@ 2012-12-19 20:36 ` redi at gcc dot gnu.org
2012-12-20 8:33 ` ktietz at gcc dot gnu.org
` (7 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-19 20:36 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #2 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-19 20:35:46 UTC ---
Created attachment 29009
--> http://gcc.gnu.org/bugzilla/attachment.cgi?id=29009
check for and use Sleep()
Does this patch work?
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
2012-12-19 15:51 ` [Bug libstdc++/55741] " redi at gcc dot gnu.org
2012-12-19 20:36 ` redi at gcc dot gnu.org
@ 2012-12-20 8:33 ` ktietz at gcc dot gnu.org
2012-12-20 11:46 ` redi at gcc dot gnu.org
` (6 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-12-20 8:33 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
Kai Tietz <ktietz at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |ktietz at gcc dot gnu.org
--- Comment #3 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-12-20 08:33:06 UTC ---
Well, this is caused by the issue that configure doesn't detect nanosleep/sleep
without using libwinthread.a library. To solve this issue please use option
'--enable-libstdcxx-time=yes', that should solve your issue.
As this option is only valid for mingw-targets, if threading-model is 'posix',
the check in aclocal.m4 needs some extensions.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (2 preceding siblings ...)
2012-12-20 8:33 ` ktietz at gcc dot gnu.org
@ 2012-12-20 11:46 ` redi at gcc dot gnu.org
2012-12-20 12:12 ` ktietz at gcc dot gnu.org
` (5 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-20 11:46 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #4 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-20 11:45:56 UTC ---
The point of http://gcc.gnu.org/viewcvs?view=revision&revision=193769 was that
std::this_thread::sleep_for() is always available, even without
--enable-libstdcxx-time=yes, so the default configuration needs to bootstrap.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (3 preceding siblings ...)
2012-12-20 11:46 ` redi at gcc dot gnu.org
@ 2012-12-20 12:12 ` ktietz at gcc dot gnu.org
2012-12-20 12:59 ` redi at gcc dot gnu.org
` (4 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-12-20 12:12 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #5 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-12-20 12:11:43 UTC ---
(In reply to comment #4)
> The point of http://gcc.gnu.org/viewcvs?view=revision&revision=193769 was that
> std::this_thread::sleep_for() is always available, even without
> --enable-libstdcxx-time=yes, so the default configuration needs to bootstrap.
Well, patch has one issue about used type. Sleep expects 'unsigned long' as
argument. Rest of suggested patch works. The reason I mentioned --enable
option is that nanosleep isn't detected proper by configure test in case that
nanosleep is a function provided by POSIX-library pthread.
Nevertheless the hole thread-layer of cxx is one mingw just available together
with POSIX-library - and libwinpthread provides a cancel-able variant of
nanosleep.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (4 preceding siblings ...)
2012-12-20 12:12 ` ktietz at gcc dot gnu.org
@ 2012-12-20 12:59 ` redi at gcc dot gnu.org
2012-12-20 13:05 ` ktietz at gcc dot gnu.org
` (3 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-20 12:59 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #6 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-20 12:59:08 UTC ---
(In reply to comment #5)
> (In reply to comment #4)
> > The point of http://gcc.gnu.org/viewcvs?view=revision&revision=193769 was that
> > std::this_thread::sleep_for() is always available, even without
> > --enable-libstdcxx-time=yes, so the default configuration needs to bootstrap.
>
> Well, patch has one issue about used type. Sleep expects 'unsigned long' as
> argument.
Ah thanks, I didn't know what type DWORD is.
> Rest of suggested patch works.
Great, thanks. So if I change the type to unsigned long and commit it, can I
say you tested it? I don't like committing changes I can't test myself! Or if
you want to commit it then it's pre-approved by me.
> The reason I mentioned --enable
> option is that nanosleep isn't detected proper by configure test in case that
> nanosleep is a function provided by POSIX-library pthread.
This is the same on all platforms. I would like to revisit that for GCC 4.9 but
for 4.8 I just want std::this_thread::sleep_for() to work, even if it uses a
low resolution sleep function. The __sleep_for function is in the .so and
takes units of seconds and nanoseconds, so if we enable nanosleep automatically
in 4.9 then code compiled with 4.8 and linked to libstdc++.so from 4.9 will get
the nanosleep-capable version of __sleep_for() without needing to be
recompiled.
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (5 preceding siblings ...)
2012-12-20 12:59 ` redi at gcc dot gnu.org
@ 2012-12-20 13:05 ` ktietz at gcc dot gnu.org
2012-12-20 14:19 ` redi at gcc dot gnu.org
` (2 subsequent siblings)
9 siblings, 0 replies; 11+ messages in thread
From: ktietz at gcc dot gnu.org @ 2012-12-20 13:05 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #7 from Kai Tietz <ktietz at gcc dot gnu.org> 2012-12-20 13:05:35 UTC ---
(In reply to comment #6)
> (In reply to comment #5)
> > (In reply to comment #4)
> > > The point of http://gcc.gnu.org/viewcvs?view=revision&revision=193769 was that
> > > std::this_thread::sleep_for() is always available, even without
> > > --enable-libstdcxx-time=yes, so the default configuration needs to bootstrap.
> >
> > Well, patch has one issue about used type. Sleep expects 'unsigned long' as
> > argument.
>
> Ah thanks, I didn't know what type DWORD is.
>
> > Rest of suggested patch works.
>
> Great, thanks. So if I change the type to unsigned long and commit it, can I
> say you tested it? I don't like committing changes I can't test myself! Or if
> you want to commit it then it's pre-approved by me.
It is tested by me, if you change Sleep's argument to 'unsigned long' type. It
is approved by me. Thanks.
> > The reason I mentioned --enable
> > option is that nanosleep isn't detected proper by configure test in case that
> > nanosleep is a function provided by POSIX-library pthread.
>
> This is the same on all platforms. I would like to revisit that for GCC 4.9 but
> for 4.8 I just want std::this_thread::sleep_for() to work, even if it uses a
> low resolution sleep function. The __sleep_for function is in the .so and
> takes units of seconds and nanoseconds, so if we enable nanosleep automatically
> in 4.9 then code compiled with 4.8 and linked to libstdc++.so from 4.9 will get
> the nanosleep-capable version of __sleep_for() without needing to be
> recompiled.
Ok, looking forward to 4.9
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (6 preceding siblings ...)
2012-12-20 13:05 ` ktietz at gcc dot gnu.org
@ 2012-12-20 14:19 ` redi at gcc dot gnu.org
2012-12-20 14:37 ` redi at gcc dot gnu.org
2012-12-20 14:38 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-20 14:19 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |ASSIGNED
AssignedTo|unassigned at gcc dot |redi at gcc dot gnu.org
|gnu.org |
Target Milestone|--- |4.8.0
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (7 preceding siblings ...)
2012-12-20 14:19 ` redi at gcc dot gnu.org
@ 2012-12-20 14:37 ` redi at gcc dot gnu.org
2012-12-20 14:38 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-20 14:37 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
--- Comment #8 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-20 14:37:03 UTC ---
Author: redi
Date: Thu Dec 20 14:36:56 2012
New Revision: 194635
URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=194635
Log:
PR libstdc++/55741
* acinclude.m4 (GLIBCXX_ENABLE_LIBSTDCXX_TIME): Check for Sleep.
* config.h.in: Regenerate.
* configure: Regenerate.
* src/c++11/thread.cc (__sleep_for): Use Sleep if available.
Modified:
trunk/libstdc++-v3/ChangeLog
trunk/libstdc++-v3/acinclude.m4
trunk/libstdc++-v3/config.h.in
trunk/libstdc++-v3/configure
trunk/libstdc++-v3/src/c++11/thread.cc
^ permalink raw reply [flat|nested] 11+ messages in thread
* [Bug libstdc++/55741] [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc
2012-12-19 15:22 [Bug bootstrap/55741] New: [4.8 Regression] bootstrap fails in libstdc++-v3/src/c++11/thread.cc rainer@emrich-ebersheim.de
` (8 preceding siblings ...)
2012-12-20 14:37 ` redi at gcc dot gnu.org
@ 2012-12-20 14:38 ` redi at gcc dot gnu.org
9 siblings, 0 replies; 11+ messages in thread
From: redi at gcc dot gnu.org @ 2012-12-20 14:38 UTC (permalink / raw)
To: gcc-bugs
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=55741
Jonathan Wakely <redi at gcc dot gnu.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|ASSIGNED |RESOLVED
Resolution| |FIXED
--- Comment #9 from Jonathan Wakely <redi at gcc dot gnu.org> 2012-12-20 14:37:49 UTC ---
should be fixed
^ permalink raw reply [flat|nested] 11+ messages in thread