[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2021-07-18 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

Andrew Pinski  changed:

   What|Removed |Added

 Status|WAITING |RESOLVED
 Resolution|--- |WONTFIX

--- Comment #23 from Andrew Pinski  ---
aix4.3 is no longer supported so closing as won't fix.
The support was removed in GCC 7.

[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2015-02-06 Thread skunk at iskunk dot org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #22 from Daniel Richard G. skunk at iskunk dot org ---
Still using AIX 4.3 here. The std::ctypechar error has been particularly
nettlesome, as it's beyond my ken and I can't work around it.


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2015-02-06 Thread dje at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

David Edelsohn dje at gcc dot gnu.org changed:

   What|Removed |Added

 Status|NEW |WAITING


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-23 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #20 from Jonathan Wakely redi at gcc dot gnu.org 2012-07-23 
08:11:48 UTC ---
The vtable should be defined in the same file as ctypechar::~ctype() i.e. in
libstdc++-v3/src/c++98/ctype.cc

You could try adding this to ctype.cc around line 54

  inline template class ctypechar;

That's a GCC extension that explicitly instantiates the vtable.


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-23 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #21 from Daniel Richard G. skunk at iskunk dot org 2012-07-23 
18:52:06 UTC ---
(In reply to comment #20)
 You could try adding this to ctype.cc around line 54

--- libstdc++-v3/src/c++98/ctype.cc.orig2012-01-23 18:12:01.2 -0500
+++ libstdc++-v3/src/c++98/ctype.cc2012-07-23 13:31:55.2 -0400
@@ -52,6 +52,8 @@

   const size_t ctypechar::table_size;

+  inline template class ctypechar;// added by skunk
+
   ctypechar::~ctype()
   { 
 _S_destroy_c_locale(_M_c_locale_ctype);


I rebuilt ctype.o and the libraries it goes into. Unfortunately, I still get
the link error. If I compare the output of nm -A on the old and new ctype.o
objects, I don't see a difference in the defined symbols.

The mangled form of vtable for std::ctypechar is _ZTVSt5ctypeIcE. If I
grep for that in nm -A ctype.o, I see

ctype.o:17c0 d _ZTVSt5ctypeIcE.P8

but no instances without the .P8 suffix. Looking through all the objects of
libstdc++, grep only turns up these:

ctype_configure_char.o: U _ZTVSt5ctypeIcE
ctype_configure_char.o:08a4 d _ZTVSt5ctypeIcE.P8

For comparison, I grepped for _ZTVNSt6locale5facetE, the mangled form of
vtable for std::locale::facet, and got the below:

time_members.o: U _ZTVNSt6locale5facetE
time_members.o:1778 d _ZTVNSt6locale5facetE.P8
codecvt.o: U _ZTVNSt6locale5facetE
codecvt.o:15d0 d _ZTVNSt6locale5facetE.P8
locale-inst.o: U _ZTVNSt6locale5facetE
locale-inst.o:00023974 d _ZTVNSt6locale5facetE.P8
wlocale-inst.o: U _ZTVNSt6locale5facetE
wlocale-inst.o:00023c2c d _ZTVNSt6locale5facetE.P8
numeric_members.o: U _ZTVNSt6locale5facetE
numeric_members.o:0e64 d _ZTVNSt6locale5facetE.P8
ctype.o: U _ZTVNSt6locale5facetE
ctype.o:17bc d _ZTVNSt6locale5facetE.P8
monetary_members.o: U _ZTVNSt6locale5facetE
monetary_members.o:1b80 d _ZTVNSt6locale5facetE.P8
locale_init.o: U _ZTVNSt6locale5facetE
locale_init.o:4a50 d _ZTVNSt6locale5facetE.P8
ctype_configure_char.o: U _ZTVNSt6locale5facetE
ctype_configure_char.o:08a0 d _ZTVNSt6locale5facetE.P8
locale.o:2b08 d _ZTVNSt6locale5facetE
locale.o:2b08 D _ZTVNSt6locale5facetE
locale.o:2b3c d _ZTVNSt6locale5facetE.P8


The fact of the symbol being a vtable for a template class appears to be
relevant. Maybe a different kind of explicit instantiation is needed?


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-22 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #19 from Daniel Richard G. skunk at iskunk dot org 2012-07-23 
04:20:33 UTC ---
The good news: The build gets past all of the pthreads-related errors described
here, so I think those two changes may be a workable solution.

The bad news: I'll still running up against this error:

/tmp/gcc-build/./prev-gcc/g++ -B/tmp/gcc-build/./prev-gcc/
-B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -nostdinc++
-B/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-B/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/libsupc++/.libs
-I/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/tg/freeport/src/gcc/gcc--4.7.1-tera/libstdc++-v3/libsupc++
-L/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-L/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/libsupc++/.libs   -g
-O2 -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o cc1
c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o
c-convert.o c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o
c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o
c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o
c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
default-c.o rs6000-c.o \
  cc1-checksum.o main.o  libbackend.a libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   
-L/tg/freeport/arch/aix32/lib -L/tg/freeport/arch/aix32/lib
-L/tg/freeport/arch/aix32/lib -lmpc -lmpfr -lgmp   -L../zlib -lz
ld: 0711-317 ERROR: Undefined symbol: vtable for std::ctypechar
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
gmake[3]: *** [cc1] Error 1
gmake[3]: Leaving directory `/tmp/gcc-build/gcc'
gmake[2]: *** [all-stage2-gcc] Error 2
gmake[2]: Leaving directory `/tmp/gcc-build'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/tmp/gcc-build'
gmake: *** [bootstrap-lean] Error 2


I really need help with this error---this seems to be along the lines of the
PatternCursor issue we saw the other day, only this one is more confusing. What
do you think is going on here?

(FWIW, the objects that want the missing symbol are the various instances of
ctype_configure_char.o, which appears to be built from
libstdc++-v3/config/os/aix/ctype_configure_char.cc. I *think* the std::ctype
template/class is defined in libstdc++-v3/include/bits/locale_facets.h.)


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-20 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #18 from Daniel Richard G. skunk at iskunk dot org 2012-07-20 
17:44:12 UTC ---
(In reply to comment #17)
 Between comment 5 (with missing ;;) and comment 14 it should work, I think.

Okay, I'm re-starting the build with those two changes (plus my omnibus patch)
applied to 4.7.1. Let's see where that goes over the weekend...


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-19 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #15 from Daniel Richard G. skunk at iskunk dot org 2012-07-19 
19:24:37 UTC ---
(In reply to comment #14)
 I still don't think it's the right thing to do, but does this help?

I'm trying this now, in conjunction with the patch posted at

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53348#c7

So far, your change seems to address the O2ggnu++0x.gch error in the original
report above, as I encountered that before actually making the change.

(Bootstrap time on this system is measured in days, and I'll probably need to
do a second go-around, so let me get back to you...)


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-19 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #16 from Daniel Richard G. skunk at iskunk dot org 2012-07-19 
21:10:28 UTC ---
Okay, spoke too soon; I encountered the same error later in the game, when
building the pthread variant of libstdc++-v3.

I'm going to try the build with a new patch, revisiting the code snippet in
comment #2:

--- libstdc++-v3/acinclude.m4(revision 189681)
+++ libstdc++-v3/acinclude.m4(working copy)
@@ -3282,13 +3282,18 @@

   AC_MSG_CHECKING([whether it can be safely assumed that mutex_timedlock is
available])

-  AC_TRY_COMPILE([#include unistd.h],
+  AC_TRY_COMPILE(
+[
+  #include stdlib.h
+  #include unistd.h
+],
 [
   // In case of POSIX threads check _POSIX_TIMEOUTS.
   #if (defined(_PTHREADS) \
(!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS = 0))
   #error
   #endif
+  return pthread_mutex_timedlock(NULL, NULL)
 ], [ac_gthread_use_mutex_timedlock=1], [ac_gthread_use_mutex_timedlock=0])

   AC_DEFINE_UNQUOTED(_GTHREAD_USE_MUTEX_TIMEDLOCK,
$ac_gthread_use_mutex_timedlock,


Since the code is being compiled as C++, linking is not necessary to get an
error in case the function is missing. Will this work any better as a solution
than my suggestion in comment #4? (Might an #ifndef WIN32 in there be
helpful?)


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-19 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #17 from Jonathan Wakely redi at gcc dot gnu.org 2012-07-19 
23:55:50 UTC ---
(In reply to comment #16)
 Will this work any better as a solution
 than my suggestion in comment #4?

No, it will fail on any non-posix platform, even if it provides a timed-lock
function on a mutex.

Just checking for _WIN32 doesn't help all the other platforms that are not
posix and are not win32

Between comment 5 (with missing ;;) and comment 14 it should work, I think.


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-07-16 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|ASSIGNED|NEW
 AssignedTo|redi at gcc dot gnu.org |unassigned at gcc dot
   ||gnu.org

--- Comment #14 from Jonathan Wakely redi at gcc dot gnu.org 2012-07-16 
21:33:34 UTC ---
I still don't think it's the right thing to do, but does this help?

--- a/libgcc/config/rs6000/gthr-aix.h
+++ b/libgcc/config/rs6000/gthr-aix.h
@@ -30,6 +30,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively.  If
not, see
 #include gthr-posix.h
 #else
 #include gthr-single.h
+#undef _GLIBCXX_HAS_GTHREADS
 #endif

 #endif /* GCC_GTHR_AIX_H */


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-06-10 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #13 from Daniel Richard G. skunk at iskunk dot org 2012-06-10 
22:39:36 UTC ---
Hi Jonathan,

I've checked and double-checked this, and was hoping you could offer some
insight:

I get the Undefined symbol: vtable for std::ctypechar error only when
bootstrapping. If I build 4.7.0 with a previously-built C-only 4.7.0 +
--disable-bootstrap, everything else the same, the build completes
successfully.

Can you make anything of that?


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-15 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #11 from Daniel Richard G. skunk at iskunk dot org 2012-05-16 
02:51:24 UTC ---
Okay, the bootstrap gets further this time. A couple of unrelated issues came
up which I was able to work around, but then I encountered this:

[...]
/tmp/gcc-build/./prev-gcc/g++ -B/tmp/gcc-build/./prev-gcc/
-B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -nostdinc++
-B/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-B/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/libsupc++/.libs
-I/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/home/src/gcc-4.7.0/libstdc++-v3/libsupc++
-L/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-L/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/libsupc++/.libs   -g
-O2 -DIN_GCC   -fno-exceptions -fno-rtti -W -Wall -Wno-narrowing
-Wwrite-strings -Wcast-qual -Wmissing-format-attribute -pedantic -Wno-long-long
-Wno-variadic-macros -Wno-overlength-strings   -DHAVE_CONFIG_H
-static-libstdc++ -static-libgcc -Wl,-bbigtoc -Wl,-bmaxdata:0x4000 -o cc1
c-lang.o c-family/stub-objc.o attribs.o c-errors.o c-decl.o c-typeck.o
c-convert.o c-aux-info.o c-objc-common.o c-parser.o tree-mudflap.o
c-family/c-common.o c-family/c-cppbuiltin.o c-family/c-dump.o
c-family/c-format.o c-family/c-gimplify.o c-family/c-lex.o c-family/c-omp.o
c-family/c-opts.o c-family/c-pch.o c-family/c-ppoutput.o c-family/c-pragma.o
c-family/c-pretty-print.o c-family/c-semantics.o c-family/c-ada-spec.o
default-c.o rs6000-c.o \
  cc1-checksum.o main.o  libbackend.a libcommon-target.a libcommon.a
../libcpp/libcpp.a ../libdecnumber/libdecnumber.a libcommon.a
../libcpp/libcpp.a   ../libiberty/libiberty.a ../libdecnumber/libdecnumber.a   
-L/tg/freeport/arch/aix32/lib -L/tg/freeport/arch/aix32/lib
-L/tg/freeport/arch/aix32/lib -lmpc -lmpfr -lgmp   -L../zlib -lz
ld: 0711-317 ERROR: Undefined symbol: vtable for std::ctypechar
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
collect2: error: ld returned 8 exit status
gmake[3]: *** [cc1] Error 1
gmake[3]: Leaving directory `/tmp/gcc-build/gcc'
gmake[2]: *** [all-stage2-gcc] Error 2
gmake[2]: Leaving directory `/tmp/gcc-build'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/tmp/gcc-build'
gmake: *** [bootstrap-lean] Error 2


If I add -Wl,-bnoquiet to that, I get

[...]
ld: 0711-318 ERROR: Undefined symbols were found.
The following symbols are in error:
 SymbolInpndx  TY CL Source-File(Object-File) OR
Import-File{Shared-object}
  RLD: Address  Section  Rld-type Referencing
Symbol

--
 vtable for std::ctypechar [16]ER PR
ctype_configure_char.cc(/tmp/gcc-build/prev-powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs/libstdc++.a[ctype_configure_char.o])
   08a4 .dataR_POS[775]  
_ZTVSt5ctypeIcE.P8
ER: The return code is 8.
ld: 0711-317 ERROR: Undefined symbol: vtable for std::ctypechar
collect2: error: ld returned 8 exit status


Seems like another issue in the vein of bug 52887. I can't make heads or tails
of C++ at this level; would another instantiation do the trick here?


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-15 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #12 from Jonathan Wakely redi at gcc dot gnu.org 2012-05-16 
03:05:51 UTC ---
IIRC that should already be instantiated


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-11 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #10 from Daniel Richard G. skunk at iskunk dot org 2012-05-12 
05:36:16 UTC ---
(In reply to comment #9)
 I won't be able to work on that until I'm back from holiday in two weeks, in
 the meanwhile --disable-libstdcxx-threads should allow you to bootstrap, or
 maybe just --disable-libstdcxx-pch

--disable-libstdcxx-pch isn't enough, alas:

[...]
libtool: compile:  /tmp/gcc-build/./gcc/xgcc -shared-libgcc
-B/tmp/gcc-build/./gcc -nostdinc++
-L/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/src
-L/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/src/.libs
-B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -B/opt/tg/powerpc-ibm-aix4.3.2.0/lib/
-isystem /opt/tg/powerpc-ibm-aix4.3.2.0/include -isystem
/opt/tg/powerpc-ibm-aix4.3.2.0/sys-include -pthread
-I/home/src/gcc-4.7.0/libstdc++-v3/../libgcc
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include
-I/home/src/gcc-4.7.0/libstdc++-v3/libsupc++ -Wall -Wextra -Wwrite-strings
-Wcast-qual -Wabi -fdiagnostics-show-location=once -ffunction-sections
-fdata-sections -frandom-seed=eh_alloc.lo -g -pthread -c
/home/src/gcc-4.7.0/libstdc++-v3/libsupc++/eh_alloc.cc  -DPIC -o eh_alloc.o
In file included from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0/bits/gthr-default.h:30:0,
 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0/bits/gthr.h:150,
 from
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include/ext/concurrence.h:36,
 from
/home/src/gcc-4.7.0/libstdc++-v3/libsupc++/eh_alloc.cc:37:
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0/bits/gthr-posix.h:
In function 'int __gthread_mutex_timedlock(__gthread_mutex_t*, const
__gthread_time_t*)':
/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0/bits/gthr-posix.h:789:69:
error: 'pthread_mutex_timedlock' was not declared in this scope
gmake[9]: *** [eh_alloc.lo] Error 1
gmake[9]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3/libsupc++'
gmake[8]: *** [all-recursive] Error 1
gmake[8]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3'
gmake[7]: *** [all] Error 2
gmake[7]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/pthread/libstdc++-v3'
gmake[6]: *** [multi-do] Error 1
gmake[6]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
gmake[5]: *** [all-multi] Error 2
gmake[5]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
gmake[4]: *** [all-recursive] Error 1
gmake[4]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
gmake[3]: *** [all] Error 2
gmake[3]: Leaving directory
`/tmp/gcc-build/powerpc-ibm-aix4.3.2.0/libstdc++-v3'
gmake[2]: *** [all-stage1-target-libstdc++-v3] Error 2
gmake[2]: Leaving directory `/tmp/gcc-build'
gmake[1]: *** [stage1-bubble] Error 2
gmake[1]: Leaving directory `/tmp/gcc-build'
gmake: *** [bootstrap-lean] Error 2


Will try with --disable-libstdcxx-threads ...


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-09 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #9 from Jonathan Wakely redi at gcc dot gnu.org 2012-05-09 
16:44:07 UTC ---
Hmm, I guess this is for the case where gthr-aix.h includes gthr-single.h,
which doesn't define the C++11 interface.  The configure script determined that
_GLIBCXX_HAS_GTHREADS should be defined, but then that only works if
gthr-posix.h gets included.

A fix (maybe not the right one) would be to add the C++11 types and functions
to gthr-single.h and make it define __GTHREADS_CXX0X, so that thread can be
be compiled and the types found, even if the resulting classes can't actually
be used in single-threaded mode.  Another option would be for gthr-aix.h to
#undef _GLBCXX_HAS_GTHREADS in the non-_THREAD_SAFE case, but I think that
would be wrong, changing a property that should be fixed at configure time into
one that depends on switches being used or not when the user compiles code.

I won't be able to work on that until I'm back from holiday in two weeks, in
the meanwhile --disable-libstdcxx-threads should allow you to bootstrap, or
maybe just --disable-libstdcxx-pch


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-08 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #8 from Daniel Richard G. skunk at iskunk dot org 2012-05-08 
18:18:04 UTC ---
I did a non-bootstrap build to speed things up a bit. (The system already has
GCC 4.5.2.)

First: Your patch needs a couple of ;; sprinkled in there :-)

Second: With the patch, after working around some unrelated integer-type
issues, I get the following error:

[...]
Making all in include
gmake[4]: Entering directory
`/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include'
mkdir -p ./powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch
/tmp/gcc-4.7.0/_build/./gcc/xgcc -shared-libgcc -B/tmp/gcc-4.7.0/_build/./gcc
-nostdinc++ -L/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src
-L/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/src/.libs
-B/opt/tg/powerpc-ibm-aix4.3.2.0/bin/ -B/opt/tg/powerpc-ibm-aix4.3.2.0/lib/
-isystem /opt/tg/powerpc-ibm-aix4.3.2.0/include -isystem
/opt/tg/powerpc-ibm-aix4.3.2.0/sys-include-x c++-header -nostdinc++ -g -O2
-I/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/powerpc-ibm-aix4.3.2.0
-I/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include
-I/tmp/gcc-4.7.0/libstdc++-v3/libsupc++ -O2 -g -std=gnu++0x
/tmp/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h \
-o powerpc-ibm-aix4.3.2.0/bits/stdc++.h.gch/O2ggnu++0x.gch
In file included from
/tmp/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:102:0:
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:62:13:
error: '__gthread_cond_t' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:67:5:
error: '__native_type' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:71:13:
error: '__native_type' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:141:5:
error: 'native_handle_type' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:
In member function 'std::cv_status
std::condition_variable::__wait_until_impl(std::unique_lockstd::mutex, const
std::chrono::time_point_Clock, _Duration)':
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:157:2:
error: '__gthread_time_t' was not declared in this scope
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:157:19:
error: expected ';' before '__ts'
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:163:28:
error: '_M_cond' was not declared in this scope
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:164:7:
error: '__ts' was not declared in this scope
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:164:11:
error: there are no arguments to '__gthread_cond_timedwait' that depend on a
template parameter, so a declaration of '__gthread_cond_timedwait' must be
available [-fpermissive]
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/condition_variable:164:11:
note: (if you use '-fpermissive', G++ will accept your code, but allowing the
use of an undeclared name is deprecated)
In file included from
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/future:41:0,
 from
/tmp/gcc-4.7.0/libstdc++-v3/include/precompiled/stdc++.h:104:
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: At
global scope:
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:63:13:
error: '__gthread_t' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:70:7:
error: 'native_handle_type' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:76:29:
error: expected ')' before '__id'
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:174:5:
error: 'native_handle_type' does not name a type
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In
constructor 'std::thread::id::id()':
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:73:23:
error: class 'std::thread::id' does not have any field named '_M_thread'
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In
function 'bool std::operator==(std::thread::id, std::thread::id)':
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:84:36:
error: 'class std::thread::id' has no member named '_M_thread'
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:84:51:
error: 'class std::thread::id' has no member named '_M_thread'
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread:84:60:
error: '__gthread_equal' was not declared in this scope
/tmp/gcc-4.7.0/_build/powerpc-ibm-aix4.3.2.0/libstdc++-v3/include/thread: In
function 'bool std::operator(std::thread::id, 

[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-07 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #7 from Daniel Richard G. skunk at iskunk dot org 2012-05-07 
21:09:43 UTC ---
(In reply to comment #6)
 Created attachment 27320 [details]
 diff of regenerated configure

Jonathan, thank you for the patch, and the regen.

I'm starting a new build to test the patch. This AIX machine runs rather slow,
so I'll need a few days to get back to you; please hold tight!


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-05 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #4 from Daniel Richard G. skunk at iskunk dot org 2012-05-05 
16:05:30 UTC ---
(In reply to comment #3)
 If you're using --enable-thread=posix then it should be defined.

I haven't used --enable-thread=posix, and if I invoke .../xgcc -v, I see
Thread model: aix. So it seems the test passes because _PTHREADS is not
defined.

Shouldn't the cpp conditional in the test be written as

#if !defined(_PTHREADS) || !defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS =
0

?


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

Jonathan Wakely redi at gcc dot gnu.org changed:

   What|Removed |Added

 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2012-05-05
 AssignedTo|unassigned at gcc dot   |redi at gcc dot gnu.org
   |gnu.org |
 Ever Confirmed|0   |1

--- Comment #5 from Jonathan Wakely redi at gcc dot gnu.org 2012-05-05 
17:40:29 UTC ---
Created attachment 27319
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27319
handle aix thread model

Ah, I see.  gthr-aix.h just does:

#ifdef _THREAD_SAFE
#include gthr-posix.h
#else
#include gthr-single.h
#endif

So it has everything in the posix thread model except the timedlock functions,
but doesn't match the case statement that only looks for posix.

Your suggestion would work for the posix and aix thread models, but would break
e.g. win32, where _PTHREADS won't be defined but mutexes always support
timeouts (not that anyone has actually added __ghtread_mutex_timedlock to
gthr-win32.h yet, but they should do)

I think the right thing to do is define _PTHREADS for the aix thread model,
could you test this patch?  I've assumed that _THREAD_SAFE might be needed to
enable some thread-related features on AIX, I don't know if that's true.

An alternative patch would simply change  the case statement to match
posix|aix)


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-05 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #6 from Jonathan Wakely redi at gcc dot gnu.org 2012-05-05 
18:13:57 UTC ---
Created attachment 27320
  -- http://gcc.gnu.org/bugzilla/attachment.cgi?id=27320
diff of regenerated configure

N.B. you'll either need to run autoreconf or apply this patch to configure


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #1 from Jonathan Wakely redi at gcc dot gnu.org 2012-05-04 
20:21:32 UTC ---
You'll need to figure out why the configure test passes, most of us who work on
that bit of code don't have access to AIX


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-04 Thread skunk at iskunk dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #2 from Daniel Richard G. skunk at iskunk dot org 2012-05-04 
20:33:46 UTC ---
(In reply to comment #1)
 You'll need to figure out why the configure test passes, most of us who work 
 on
 that bit of code don't have access to AIX

Below is the relevant excerpt from gcc-4.7.0/libstdc++-v3/acinclude.m4:

8
  AC_MSG_CHECKING([whether it can be safely assumed that mutex_timedlock is
available])

  AC_TRY_COMPILE([#include unistd.h],
[
  // In case of POSIX threads check _POSIX_TIMEOUTS.
  #if (defined(_PTHREADS) \
   (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS = 0))
  #error
  #endif
], [ac_gthread_use_mutex_timedlock=1], [ac_gthread_use_mutex_timedlock=0])

  AC_DEFINE_UNQUOTED(_GTHREAD_USE_MUTEX_TIMEDLOCK,
$ac_gthread_use_mutex_timedlock,
 [Define to 1 if mutex_timedlock is available.])

  if test $ac_gthread_use_mutex_timedlock = 1 ; then res_mutex_timedlock=yes ;
  else res_mutex_timedlock=no ; fi
  AC_MSG_RESULT([$res_mutex_timedlock])
8

Neither _PTHREADS nor _POSIX_TIMEOUTS appear anywhere in /usr/include/.

I'm a little mystified as to why this test is relying entirely on feature test
macros, instead of checking for the existence of pthread_mutex_timedlock
directly...


[Bug bootstrap/53238] Bootstrap failure: error: 'pthread_mutex_timedlock' was not declared in this scope

2012-05-04 Thread redi at gcc dot gnu.org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=53238

--- Comment #3 from Jonathan Wakely redi at gcc dot gnu.org 2012-05-04 
20:57:34 UTC ---
_PTHREADS gets defined immediately above that test:

  target_thread_file=`$CXX -v 21 | sed -n 's/^Thread model: //p'`
  case $target_thread_file in
posix)
  CXXFLAGS=$CXXFLAGS -DSUPPORTS_WEAK -DGTHREAD_USE_WEAK -D_PTHREADS
  esac

If you're using --enable-thread=posix then it should be defined.

pthread_mutex_timedlock is part of the POSIX Threads and Timeouts options, and
if that option is supported then _POSIX_TIMEOUTS must be defined.

http://pubs.opengroup.org/onlinepubs/009695399/functions/pthread_mutex_timedlock.html