From: Ruben V. B. <van...@gm...> - 2011-08-29 12:04:32
|
Kai and I, have, with the help of PcX and Frank, got to a point where a slightly patched libstdc++ configure can build adll with the necessary symbols. Kai is on holiday now, and I will be on holiday too in a few days, so don't expect any final word soon. I am experiencing a std::system_error: Operation not permitted. in a simple std::thread::join example. I have a hunch it is due to Frank's little patch to operator< (which i didn't apply) or something, but might as well be a winpthreads/mingw-w64 issue. I was planning on uploading the builds (none for mac due to a GCC build error there), but now I frankly don't see the point :( If anyone has an idea or has experienced and fixed this issue, I'll be glad to hear it! To be continued! Ruben |
From: PcX <xun...@gm...> - 2011-08-29 12:17:54
|
于 2011/8/29 20:04, Ruben Van Boxem 写道: > I am experiencing a std::system_error: Operation not permitted. in a > simple std::thread::join example. Can you supply some examples? Thanks. -- Best Regards, PcX |
From: Ruben V. B. <van...@gm...> - 2011-08-29 12:20:42
|
2011/8/29 PcX <xun...@gm...> > 于 2011/8/29 20:04, Ruben Van Boxem 写道: > > I am experiencing a std::system_error: Operation not permitted. in a > > simple std::thread::join example. > Can you supply some examples? > This is as simple as it gets (and as complicated as I can use std::thread :) ): #include <iostream> #include <thread> using namespace std; void f() { cout << "Hello from thread" << endl; } int main() { thread t(f); thread s(f); t.join(); s.join(); return 0; } Ruben > > Thanks. > > -- > Best Regards, > PcX > > > > ------------------------------------------------------------------------------ > EMC VNX: the world's simplest storage, starting under $10K > The only unified storage solution that offers unified management > Up to 160% more powerful than alternatives and 25% more efficient. > Guaranteed. http://p.sf.net/sfu/emc-vnx-dev2dev > _______________________________________________ > Mingw-w64-public mailing list > Min...@li... > https://lists.sourceforge.net/lists/listinfo/mingw-w64-public > |
From: PcX <xun...@gm...> - 2011-08-29 12:26:48
|
于 2011/8/29 20:20, Ruben Van Boxem 写道: > #include <iostream> > #include <thread> > > using namespace std; > > void f() > { > cout << "Hello from thread" << endl; > } > int main() > { > thread t(f); > thread s(f); > > t.join(); > s.join(); > return 0; > } I'm very annoyed. My built edition works well. g++ -std=c++0x test.cpp a.exe it shows Hello from thread Hello from thread -- Best Regards, PcX |
From: PcX <xun...@gm...> - 2011-08-29 12:29:45
|
于 2011/8/29 20:04, Ruben Van Boxem 写道: > std::system_error: Operation not permitted. Have you patched config/os/mingw32/error_constants.h ? -// operation_not_permitted = EPERM, +#ifdef HAVE_EPERM + operation_not_permitted = EPERM, +#endif -- Best Regards, PcX |
From: PcX <xun...@gm...> - 2011-08-29 12:40:27
|
于 2011/8/29 20:04, Ruben Van Boxem 写道: > To be continued! This is Kai's full patches Now haven't merge to the trunk ----------------------------------------------------------------------------------------------------- 2011-08-28 Kai Tietz<kt...@re...> * configure: Regenerated. * config.h.in: Regenerated. * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR) Add checks for ECHILD, ENOSPC, EPERM, ETIMEDOUT, and EWOULDBLOCK. * config/os/mingw32/error_constants.h (errc): Add enumerator values no_child_process, no_space_on_device, not_supported, operation_not_permitted, operation_would_block, timed_out, and value_too_large, Regression tested for x86_64-w64-mingw32 and i686-w64-mingw32. Ok for apply? Regards, Kai Index: configure =================================================================== --- configure (revision 178145) +++ configure (working copy) @@ -17650,9 +17650,174 @@ $as_echo "#define HAVE_ETXTBSY 1">>confdefs.h fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHILD">&5 +$as_echo_n "checking for ECHILD... ">&6; } +if test "${glibcxx_cv_system_error15+set}" = set; then : + $as_echo_n "(cached) ">&6 +else +cat confdefs.h -<<_ACEOF>conftest.$ac_ext +/* end confdefs.h. */ +#include<errno.h> +int +main () +{ +int i = ECHILD; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_system_error15=yes +else + glibcxx_cv_system_error15=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error15">&5 +$as_echo "$glibcxx_cv_system_error15">&6; } +if test x"$glibcxx_cv_system_error15" = x"yes"; then + +$as_echo "#define HAVE_ECHILD 1">>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOSPC">&5 +$as_echo_n "checking for ENOSPC... ">&6; } +if test "${glibcxx_cv_system_error16+set}" = set; then : + $as_echo_n "(cached) ">&6 +else + +cat confdefs.h -<<_ACEOF>conftest.$ac_ext +/* end confdefs.h. */ +#include<errno.h> +int +main () +{ +int i = ENOSPC; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_system_error16=yes +else + glibcxx_cv_system_error16=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error16">&5 +$as_echo "$glibcxx_cv_system_error16">&6; } +if test x"$glibcxx_cv_system_error16" = x"yes"; then + +$as_echo "#define HAVE_ENOSPC 1">>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EPERM">&5 +$as_echo_n "checking for EPERM... ">&6; } +if test "${glibcxx_cv_system_error17+set}" = set; then : + $as_echo_n "(cached) ">&6 +else + +cat confdefs.h -<<_ACEOF>conftest.$ac_ext +/* end confdefs.h. */ +#include<errno.h> +int +main () +{ +int i = EPERM; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_system_error17=yes +else + glibcxx_cv_system_error17=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error17">&5 +$as_echo "$glibcxx_cv_system_error17">&6; } +if test x"$glibcxx_cv_system_error17" = x"yes"; then + +$as_echo "#define HAVE_EPERM 1">>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETIMEDOUT">&5 +$as_echo_n "checking for ETIMEDOUT... ">&6; } +if test "${glibcxx_cv_system_error18+set}" = set; then : + $as_echo_n "(cached) ">&6 +else + +cat confdefs.h -<<_ACEOF>conftest.$ac_ext +/* end confdefs.h. */ +#include<errno.h> +int +main () +{ +int i = ETIMEDOUT; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_system_error18=yes +else + glibcxx_cv_system_error18=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error18">&5 +$as_echo "$glibcxx_cv_system_error18">&6; } +if test x"$glibcxx_cv_system_error18" = x"yes"; then + +$as_echo "#define HAVE_ETIMEDOUT 1">>confdefs.h + +fi +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EWOULDBLOCK">&5 +$as_echo_n "checking for EWOULDBLOCK... ">&6; } +if test "${glibcxx_cv_system_error19+set}" = set; then : + $as_echo_n "(cached) ">&6 +else + +cat confdefs.h -<<_ACEOF>conftest.$ac_ext +/* end confdefs.h. */ +#include<errno.h> +int +main () +{ +int i = EWOULDBLOCK; + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : + glibcxx_cv_system_error19=yes +else + glibcxx_cv_system_error19=no +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext + +fi + +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $glibcxx_cv_system_error19">&5 +$as_echo "$glibcxx_cv_system_error19">&6; } +if test x"$glibcxx_cv_system_error19" = x"yes"; then + +$as_echo "#define HAVE_EWOULDBLOCK 1">>confdefs.h + +fi + + + # For the streamoff typedef. Index: config.h.in =================================================================== --- config.h.in (revision 178145) +++ config.h.in (working copy) @@ -60,6 +60,9 @@ /* Define if ECANCELED exists. */ #undef HAVE_ECANCELED +/* Define if ECHILD exists. */ +#undef HAVE_ECHILD + /* Define if EIDRM exists. */ #undef HAVE_EIDRM @@ -72,6 +75,9 @@ /* Define if ENOLINK exists. */ #undef HAVE_ENOLINK +/* Define if ENOSPC exists. */ +#undef HAVE_ENOSPC + /* Define if ENOSR exists. */ #undef HAVE_ENOSR @@ -90,15 +96,24 @@ /* Define if EOWNERDEAD exists. */ #undef HAVE_EOWNERDEAD +/* Define if EPERM exists. */ +#undef HAVE_EPERM + /* Define if EPROTO exists. */ #undef HAVE_EPROTO /* Define if ETIME exists. */ #undef HAVE_ETIME +/* Define if ETIMEDOUT exists. */ +#undef HAVE_ETIMEDOUT + /* Define if ETXTBSY exists. */ #undef HAVE_ETXTBSY +/* Define if EWOULDBLOCK exists. */ +#undef HAVE_EWOULDBLOCK + /* Define to 1 if you have the<execinfo.h> header file. */ #undef HAVE_EXECINFO_H Index: config/os/mingw32/error_constants.h =================================================================== --- config/os/mingw32/error_constants.h (revision 178145) +++ config/os/mingw32/error_constants.h (working copy) @@ -79,13 +79,17 @@ // network_reset = ENETRESET, // network_unreachable = ENETUNREACH, // no_buffer_space = ENOBUFS, -// no_child_process = ECHILD, +#ifdef HAVE_ECHILD + no_child_process = ECHILD, +#endif // no_link = ENOLINK, no_lock_available = ENOLCK, // no_message_available = ENODATA, // no_message = ENOMSG, // no_protocol_option = ENOPROTOOPT, -// no_space_on_device = ENOSPC, +#ifdef HAVE_ENOSPC + no_space_on_device = ENOSPC, +#endif // no_stream_resources = ENOSR, no_such_device_or_address = ENXIO, no_such_device = ENODEV, @@ -96,12 +100,18 @@ // not_a_stream = ENOSTR, // not_connected = ENOTCONN, not_enough_memory = ENOMEM, -// not_supported = ENOTSUP, +#ifdef HAVE_ENOTSUP + not_supported = ENOTSUP, +#endif // operation_canceled = ECANCELED, // operation_in_progress = EINPROGRESS, -// operation_not_permitted = EPERM, +#ifdef HAVE_EPERM + operation_not_permitted = EPERM, +#endif // operation_not_supported = EOPNOTSUPP, -// operation_would_block = EWOULDBLOCK, +#ifdef EWOULDBLOCK + operation_would_block = EWOULDBLOCK, +#endif // owner_dead = EOWNERDEAD, permission_denied = EACCES, // protocol_error = EPROTO, @@ -113,12 +123,16 @@ // state_not_recoverable = ENOTRECOVERABLE, // stream_timeout = ETIME, // text_file_busy = ETXTBSY, -// timed_out = ETIMEDOUT, +#ifdef ETIMEDOUT + timed_out = ETIMEDOUT, +#endif too_many_files_open_in_system = ENFILE, too_many_files_open = EMFILE, too_many_links = EMLINK // too_many_symbolic_link_levels = ELOOP, - // value_too_large = EOVERFLOW, +#ifdef HAVE_EOVERFLOW + value_too_large = EOVERFLOW, +#endif // wrong_protocol_type = EPROTOTYPE }; Index: acinclude.m4 =================================================================== --- acinclude.m4 (revision 178145) +++ acinclude.m4 (working copy) @@ -1700,7 +1700,9 @@ m4_pushdef([n_syserr], [1])dnl m4_foreach([syserr], [EOWNERDEAD, ENOTRECOVERABLE, ENOLINK, EPROTO, ENODATA, ENOSR, ENOSTR, ETIME, EBADMSG, ECANCELED, - EOVERFLOW, ENOTSUP, EIDRM, ETXTBSY], + EOVERFLOW, ENOTSUP, EIDRM, ETXTBSY, + ECHILD, ENOSPC, EPERM, + ETIMEDOUT, EWOULDBLOCK], [m4_pushdef([SYSERR], m4_toupper(syserr))dnl AC_MSG_CHECKING([for syserr]) AC_CACHE_VAL([glibcxx_cv_system_error[]n_syserr], [ -- Best Regards, PcX |
From: Ruben V. B. <van...@gm...> - 2011-08-29 12:42:39
|
2011/8/29 PcX <xun...@gm...> > 于 2011/8/29 20:04, Ruben Van Boxem 写道: > >> To be continued! >> > This is Kai's full patches > There's a bit more, check the libstdc++/configure bit of my patch. And rev 4428 of mingw-w64 Ruben > Now haven't merge to the trunk > ------------------------------**------------------------------** > ------------------------------**----------- > > 2011-08-28 Kai Tietz<kt...@re...> > > * configure: Regenerated. > * config.h.in: Regenerated. > * acinclude.m4 (GLIBCXX_CHECK_SYSTEM_ERROR) Add > checks for ECHILD, ENOSPC, EPERM, ETIMEDOUT, and > EWOULDBLOCK. > * config/os/mingw32/error_**constants.h (errc): Add > enumerator values no_child_process, no_space_on_device, > not_supported, operation_not_permitted, operation_would_block, > timed_out, and value_too_large, > > Regression tested for x86_64-w64-mingw32 and i686-w64-mingw32. Ok for > apply? > > Regards, > Kai > > Index: configure > ==============================**==============================**======= > --- configure (revision 178145) > +++ configure (working copy) > @@ -17650,9 +17650,174 @@ > $as_echo "#define HAVE_ETXTBSY 1">>confdefs.h > > fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHILD">&5 > +$as_echo_n "checking for ECHILD... ">&6; } > +if test "${glibcxx_cv_system_error15+**set}" = set; then : > + $as_echo_n "(cached) ">&6 > +else > > +cat confdefs.h -<<_ACEOF>conftest.$ac_ext > +/* end confdefs.h. */ > +#include<errno.h> > +int > +main () > +{ > +int i = ECHILD; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + glibcxx_cv_system_error15=yes > +else > + glibcxx_cv_system_error15=no > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > > +fi > > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: > $glibcxx_cv_system_error15">&5 > +$as_echo "$glibcxx_cv_system_error15">&**6; } > +if test x"$glibcxx_cv_system_error15" = x"yes"; then > + > +$as_echo "#define HAVE_ECHILD 1">>confdefs.h > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ENOSPC">&5 > +$as_echo_n "checking for ENOSPC... ">&6; } > +if test "${glibcxx_cv_system_error16+**set}" = set; then : > + $as_echo_n "(cached) ">&6 > +else > + > +cat confdefs.h -<<_ACEOF>conftest.$ac_ext > +/* end confdefs.h. */ > +#include<errno.h> > +int > +main () > +{ > +int i = ENOSPC; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + glibcxx_cv_system_error16=yes > +else > + glibcxx_cv_system_error16=no > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + > +fi > + > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: > $glibcxx_cv_system_error16">&5 > +$as_echo "$glibcxx_cv_system_error16">&**6; } > +if test x"$glibcxx_cv_system_error16" = x"yes"; then > + > +$as_echo "#define HAVE_ENOSPC 1">>confdefs.h > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EPERM">&5 > +$as_echo_n "checking for EPERM... ">&6; } > +if test "${glibcxx_cv_system_error17+**set}" = set; then : > + $as_echo_n "(cached) ">&6 > +else > + > +cat confdefs.h -<<_ACEOF>conftest.$ac_ext > +/* end confdefs.h. */ > +#include<errno.h> > +int > +main () > +{ > +int i = EPERM; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + glibcxx_cv_system_error17=yes > +else > + glibcxx_cv_system_error17=no > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + > +fi > + > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: > $glibcxx_cv_system_error17">&5 > +$as_echo "$glibcxx_cv_system_error17">&**6; } > +if test x"$glibcxx_cv_system_error17" = x"yes"; then > + > +$as_echo "#define HAVE_EPERM 1">>confdefs.h > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ETIMEDOUT">&5 > +$as_echo_n "checking for ETIMEDOUT... ">&6; } > +if test "${glibcxx_cv_system_error18+**set}" = set; then : > + $as_echo_n "(cached) ">&6 > +else > + > +cat confdefs.h -<<_ACEOF>conftest.$ac_ext > +/* end confdefs.h. */ > +#include<errno.h> > +int > +main () > +{ > +int i = ETIMEDOUT; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + glibcxx_cv_system_error18=yes > +else > + glibcxx_cv_system_error18=no > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + > +fi > + > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: > $glibcxx_cv_system_error18">&5 > +$as_echo "$glibcxx_cv_system_error18">&**6; } > +if test x"$glibcxx_cv_system_error18" = x"yes"; then > + > +$as_echo "#define HAVE_ETIMEDOUT 1">>confdefs.h > + > +fi > +{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for EWOULDBLOCK">&5 > +$as_echo_n "checking for EWOULDBLOCK... ">&6; } > +if test "${glibcxx_cv_system_error19+**set}" = set; then : > + $as_echo_n "(cached) ">&6 > +else > + > +cat confdefs.h -<<_ACEOF>conftest.$ac_ext > +/* end confdefs.h. */ > +#include<errno.h> > +int > +main () > +{ > +int i = EWOULDBLOCK; > + ; > + return 0; > +} > +_ACEOF > +if ac_fn_c_try_compile "$LINENO"; then : > + glibcxx_cv_system_error19=yes > +else > + glibcxx_cv_system_error19=no > +fi > +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext > + > +fi > + > +{ $as_echo "$as_me:${as_lineno-$LINENO}: result: > $glibcxx_cv_system_error19">&5 > +$as_echo "$glibcxx_cv_system_error19">&**6; } > +if test x"$glibcxx_cv_system_error19" = x"yes"; then > + > +$as_echo "#define HAVE_EWOULDBLOCK 1">>confdefs.h > + > +fi > + > + > + > # For the streamoff typedef. > > > Index: config.h.in > ==============================**==============================**======= > --- config.h.in (revision 178145) > +++ config.h.in (working copy) > @@ -60,6 +60,9 @@ > /* Define if ECANCELED exists. */ > #undef HAVE_ECANCELED > > +/* Define if ECHILD exists. */ > +#undef HAVE_ECHILD > + > /* Define if EIDRM exists. */ > #undef HAVE_EIDRM > > @@ -72,6 +75,9 @@ > /* Define if ENOLINK exists. */ > #undef HAVE_ENOLINK > > +/* Define if ENOSPC exists. */ > +#undef HAVE_ENOSPC > + > /* Define if ENOSR exists. */ > #undef HAVE_ENOSR > > @@ -90,15 +96,24 @@ > /* Define if EOWNERDEAD exists. */ > #undef HAVE_EOWNERDEAD > > +/* Define if EPERM exists. */ > +#undef HAVE_EPERM > + > /* Define if EPROTO exists. */ > #undef HAVE_EPROTO > > /* Define if ETIME exists. */ > #undef HAVE_ETIME > > +/* Define if ETIMEDOUT exists. */ > +#undef HAVE_ETIMEDOUT > + > /* Define if ETXTBSY exists. */ > #undef HAVE_ETXTBSY > > +/* Define if EWOULDBLOCK exists. */ > +#undef HAVE_EWOULDBLOCK > + > /* Define to 1 if you have the<execinfo.h> header file. */ > #undef HAVE_EXECINFO_H > > Index: config/os/mingw32/error_**constants.h > ==============================**==============================**======= > --- config/os/mingw32/error_**constants.h (revision 178145) > +++ config/os/mingw32/error_**constants.h (working copy) > @@ -79,13 +79,17 @@ > // network_reset = ENETRESET, > // network_unreachable = ENETUNREACH, > // no_buffer_space = ENOBUFS, > -// no_child_process = ECHILD, > +#ifdef HAVE_ECHILD > + no_child_process = ECHILD, > +#endif > // no_link = ENOLINK, > no_lock_available = ENOLCK, > // no_message_available = ENODATA, > // no_message = ENOMSG, > // no_protocol_option = ENOPROTOOPT, > -// no_space_on_device = ENOSPC, > +#ifdef HAVE_ENOSPC > + no_space_on_device = ENOSPC, > +#endif > // no_stream_resources = ENOSR, > no_such_device_or_address = ENXIO, > no_such_device = ENODEV, > @@ -96,12 +100,18 @@ > // not_a_stream = ENOSTR, > // not_connected = ENOTCONN, > not_enough_memory = ENOMEM, > -// not_supported = ENOTSUP, > +#ifdef HAVE_ENOTSUP > + not_supported = ENOTSUP, > +#endif > // operation_canceled = ECANCELED, > // operation_in_progress = EINPROGRESS, > > -// operation_not_permitted = EPERM, > +#ifdef HAVE_EPERM > + operation_not_permitted = EPERM, > +#endif > // operation_not_supported = EOPNOTSUPP, > -// operation_would_block = EWOULDBLOCK, > +#ifdef EWOULDBLOCK > + operation_would_block = EWOULDBLOCK, > +#endif > // owner_dead = EOWNERDEAD, > permission_denied = EACCES, > // protocol_error = EPROTO, > @@ -113,12 +123,16 @@ > // state_not_recoverable = ENOTRECOVERABLE, > // stream_timeout = ETIME, > // text_file_busy = ETXTBSY, > -// timed_out = ETIMEDOUT, > +#ifdef ETIMEDOUT > + timed_out = ETIMEDOUT, > +#endif > too_many_files_open_in_system = ENFILE, > too_many_files_open = EMFILE, > too_many_links = EMLINK > // too_many_symbolic_link_levels = ELOOP, > - // value_too_large = EOVERFLOW, > +#ifdef HAVE_EOVERFLOW > + value_too_large = EOVERFLOW, > +#endif > // wrong_protocol_type = EPROTOTYPE > }; > > Index: acinclude.m4 > ==============================**==============================**======= > --- acinclude.m4 (revision 178145) > +++ acinclude.m4 (working copy) > @@ -1700,7 +1700,9 @@ > m4_pushdef([n_syserr], [1])dnl > m4_foreach([syserr], [EOWNERDEAD, ENOTRECOVERABLE, ENOLINK, EPROTO, > ENODATA, > ENOSR, ENOSTR, ETIME, EBADMSG, ECANCELED, > - EOVERFLOW, ENOTSUP, EIDRM, ETXTBSY], > + EOVERFLOW, ENOTSUP, EIDRM, ETXTBSY, > + ECHILD, ENOSPC, EPERM, > + ETIMEDOUT, EWOULDBLOCK], > [m4_pushdef([SYSERR], m4_toupper(syserr))dnl > AC_MSG_CHECKING([for syserr]) > AC_CACHE_VAL([glibcxx_cv_**system_error[]n_syserr], [ > > > > -- > Best Regards, > PcX > > |
From: PcX <xun...@gm...> - 2011-08-29 12:50:00
|
于 2011/8/29 20:42, Ruben Van Boxem 写道: > There's a bit more, check the libstdc++/configure bit of my patch. And > rev 4428 of mingw-w64 I note that mingw-w64 has rev 4430, and winpthread has rev 4429. You may test them? -- Best Regards, PcX |
From: Ruben V. B. <van...@gm...> - 2011-08-29 14:16:45
|
2011/8/29 PcX <xun...@gm...> > 于 2011/8/29 20:42, Ruben Van Boxem 写道: > > There's a bit more, check the libstdc++/configure bit of my patch. And rev > 4428 of mingw-w64 > > I note that mingw-w64 has rev 4430, and winpthread has rev 4429. > You may test them? > Hmm.. 4.6 with the posix thread patches and the libstdc++ patches also fail for me :( I'll see if my configure patch f*** it up. >:s Ruben > -- > Best Regards, > PcX > > |
From: Ruben V. B. <van...@gm...> - 2011-08-29 14:43:30
|
2011/8/29 Ruben Van Boxem <van...@gm...> > 2011/8/29 PcX <xun...@gm...> > >> 于 2011/8/29 20:42, Ruben Van Boxem 写道: >> >> There's a bit more, check the libstdc++/configure bit of my patch. And rev >> 4428 of mingw-w64 >> >> I note that mingw-w64 has rev 4430, and winpthread has rev 4429. >> You may test them? >> > > Hmm.. 4.6 with the posix thread patches and the libstdc++ patches also fail > for me :( I'll see if my configure patch f*** it up. >:s > > Ruben > I tried your build here: http://code.google.com/p/pcxprj/downloads/detail?name=MinGW_gcc4.6.2.20110826_static_enable_std_thread_test.7z&can=2&q= and compiling my little test program complains about not finding pthread.h. libpthread.a is present though. I found a glimmer of hope: adding -static to the link line makes it work. So there must be some mismatch between libstdc++ and winpthread staticness causing a static initialization order fiasco or something. This makes me think that libstdc++ uses a static version of winpthreads (or would it be libgcc?)... well anyways, there's one static and one shared version competing and causing the crash. I've dug up my GCC 4.7 build and am going to upload it now, with the warning that if you try std::thread, link with -static :) Ruben |
From: PcX <xun...@gm...> - 2011-08-29 15:13:41
|
于 2011/8/29 22:43, Ruben Van Boxem 写道: > and compiling my little test program complains about not finding > pthread.h. libpthread.a is present though. > > I found a glimmer of hope: adding -static to the link line makes it > work. So there must be some mismatch between libstdc++ and winpthread > staticness causing a static initialization order fiasco or something. > > This makes me think that libstdc++ uses a static version of > winpthreads (or would it be libgcc?)... well anyways, there's one > static and one shared version competing and causing the crash. I've > dug up my GCC 4.7 build and am going to upload it now, with the > warning that if you try std::thread, link with -static :) I have forgot to put the header files. As I built gcc and winpthreads with "--enable-static --disable-shared", with or without "-static" is the same for me. -- Best Regards, PcX |
From: Ruben V. B. <van...@gm...> - 2011-08-29 15:41:01
|
2011/8/29 PcX <xun...@gm...> > 于 2011/8/29 22:43, Ruben Van Boxem 写道: > > and compiling my little test program complains about not finding >> pthread.h. libpthread.a is present though. >> >> I found a glimmer of hope: adding -static to the link line makes it work. >> So there must be some mismatch between libstdc++ and winpthread staticness >> causing a static initialization order fiasco or something. >> >> This makes me think that libstdc++ uses a static version of winpthreads >> (or would it be libgcc?)... well anyways, there's one static and one shared >> version competing and causing the crash. I've dug up my GCC 4.7 build and am >> going to upload it now, with the warning that if you try std::thread, link >> with -static :) >> > I have forgot to put the header files. > As I built gcc and winpthreads with "--enable-static --disable-shared", > with or without "-static" is the same for me. > Yes, that's the difference. This needs fixing upstream though. This now only half works... enough for a bit of experimenting :) Ruben |