* Bootstrap failure on Sparc Solaris2.8
@ 2003-05-23 13:59 Josh
2003-05-23 16:14 ` Eric Botcazou
0 siblings, 1 reply; 8+ messages in thread
From: Josh @ 2003-05-23 13:59 UTC (permalink / raw)
To: gcc
I've configured with the following options in a separate objects directory (gcc-objs), using gcc-3.2.3 as the starting compiler:
../gcc-3.3/configure --prefix=/compiler/gcc-3.3 \
--with-ld=/compiler/gcc-3.2.3/bin/ld
--with-gnu-ld \
--with-as=compiler/gcc-3.2.3/bin/as \
--with-gnu-as \
--disable-nls \
--enable-threads=posix
Then:
make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2 -fno-implicit-templates' boostrap-lean
The build goes through, completes stage3 compiler, then the following error in eh_alloc.cc:
/home/fird3/gcc-objs/gcc/xgcc -shared-libgcc -B/home/fird3/gcc-objs/gcc/ -nostdinc++ -L/home/fird3/gcc-objs/spar
c-sun-solaris2.8/sparcv9/libstdc++-v3/src -L/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3/src/.
libs -B/prod/fir/compile/sol8/gcc-3.3/sparc-sun-solaris2.8/bin/ -B/prod/fir/compile/sol8/gcc-3.3/sparc-sun-solar
is2.8/lib/ -isystem /prod/fir/compile/sol8/gcc-3.3/sparc-sun-solaris2.8/include -m64 -I../../../../../gcc-200305
19/libstdc++-v3/../gcc -I../../../../../gcc-20030519/libstdc++-v3/../include -I/home/fird3/gcc-objs/sparc-sun-so
laris2.8/sparcv9/libstdc++-v3/include/sparc-sun-solaris2.8 -I/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/l
ibstdc++-v3/include -I../../../../../gcc-20030519/libstdc++-v3/libsupc++ -g -O2 -m64 -fno-implicit-templates -Wa
ll -Wno-format -W -Wwrite-strings -fdiagnostics-show-location=once -ffunction-sections -fdata-sections -c ../../
../../../gcc-20030519/libstdc++-v3/libsupc++/eh_aux_runtime.cc -fPIC -DPIC -o eh_aux_runtime.o
../../../../../gcc-20030519/libstdc++-v3/libsupc++/eh_alloc.cc:81: error: too
many initializers for `_pthread_mutex::<anonymous struct>'
make[7]: *** [eh_alloc.lo] Error 1
make[7]: *** Waiting for unfinished jobs....
make[7]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3/libsupc++'
make[6]: *** [all-recursive] Error 1
make[6]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3'
make[5]: *** [all-recursive-am] Error 2
make[5]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/sparcv9/libstdc++-v3'
make[4]: *** [multi-do] Error 1
make[4]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/libstdc++-v3'
make[3]: *** [all-multi] Error 2
make[3]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/libstdc++-v3'
make[2]: *** [all-recursive-am] Error 2
make[2]: Leaving directory `/home/fird3/gcc-objs/sparc-sun-solaris2.8/libstdc++-v3'
make[1]: *** [all-target-libstdc++-v3] Error 2
make[1]: Leaving directory `/home/fird3/gcc-objs'
make: *** [bootstrap-lean] Error 2
Any insights? I tried configuring w/ --enable-threads=single, but that also fails, albeit a different point. Thanks in advance.
Regards,
Josh
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bootstrap failure on Sparc Solaris2.8
2003-05-23 13:59 Bootstrap failure on Sparc Solaris2.8 Josh
@ 2003-05-23 16:14 ` Eric Botcazou
0 siblings, 0 replies; 8+ messages in thread
From: Eric Botcazou @ 2003-05-23 16:14 UTC (permalink / raw)
To: Josh; +Cc: gcc
> I've configured with the following options in a separate objects directory
> (gcc-objs), using gcc-3.2.3 as the starting compiler: ../gcc-3.3/configure
> --prefix=/compiler/gcc-3.3 \
> --with-ld=/compiler/gcc-3.2.3/bin/ld
> --with-gnu-ld \
> --with-as=compiler/gcc-3.2.3/bin/as \
> --with-gnu-as \
> --disable-nls \
> --enable-threads=posix
>
> Then:
> make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2
> -fno-implicit-templates' boostrap-lean
Did you set CONFIG_SHELL before configuring? Do you use GNU make?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bootstrap failure on Sparc Solaris2.8
2003-05-28 20:43 Josh Loeb
@ 2003-05-28 20:53 ` Albert Chin
0 siblings, 0 replies; 8+ messages in thread
From: Albert Chin @ 2003-05-28 20:53 UTC (permalink / raw)
To: Josh Loeb; +Cc: gcc
On Wed, May 28, 2003 at 01:48:02PM -0400, Josh Loeb wrote:
> Yep, that's it. The versions here for types.h and pthread.h are
> 1.66 and 1.28 respectively. Unfortunately I don't have root
> privileges here but have put in a request to have it looked at.
> Thank you for helping with this. I can't help but wonder what else
> is "out" here though--do you know off hand if there's any reason NOT
> to have the systems administrators get the up-to-date header files,
> e.g., that the ones that are there might be correct for some reason
> for this system?
Please wrap lines to 70 chars.
You can find the sum(1) value for the installed version at
/var/sadm/install/contents. I'd suggest you checksum the files in
question against what the OS thinks they should be. Maybe someone
modified something.
--
albert chin (china@thewrittenword.com)
^ permalink raw reply [flat|nested] 8+ messages in thread
* Bootstrap failure on Sparc Solaris2.8
@ 2003-05-28 20:43 Josh Loeb
2003-05-28 20:53 ` Albert Chin
0 siblings, 1 reply; 8+ messages in thread
From: Josh Loeb @ 2003-05-28 20:43 UTC (permalink / raw)
To: Eric Botcazou, Josh Loeb; +Cc: gcc
Yep, that's it. The versions here for types.h and pthread.h are 1.66 and 1.28 respectively. Unfortunately I don't have root privileges here but have put in a request to have it looked at. Thank you for helping with this. I can't help but wonder what else is "out" here though--do you know off hand if there's any reason NOT to have the systems administrators get the up-to-date header files, e.g., that the ones that are there might be correct for some reason for this system?
Best, and thanks again,
Josh
-------Original Message-------
From: Eric Botcazou <ebotcazou@libertysurf.fr>
Sent: 05/28/03 11:43 AM
To: Josh Loeb <sundog@mindspring.com>
Subject: Re: Re: Re: Bootstrap failure on Sparc Solaris2.8
>
> > Here is the line from the pre-processed eh_alloc.ii file
>
> static __gthread_mutex_t emergency_mutex ={{0,0,0,0,0}, {{{0}}}, 0};
>
> It looks like __gthread_mutex_t is typedef'd from pthread_mutex_t, which
> on my system (in /usr/include/sys/types.h) is defined as follows (note
the
> first struct has four members, as compared to the five zeroes in the
first
> initializer above):
>
> typedef struct _pthread_mutex { /* = mutex_t in synch.h */
> struct {
> uint16_t __pthread_mutex_flag1;
> uint8_t __pthread_mutex_flag2;
> uint8_t __pthread_mutex_ceiling;
> uint32_t __pthread_mutex_type;
> } __pthread_mutex_flags;
> union {
> struct {
> uint8_t __pthread_mutex_pad[8];
> } __pthread_mutex_lock64;
> upad64_t __pthread_mutex_owner64;
> } __pthread_mutex_lock;
> upad64_t __pthread_mutex_data;
> } pthread_mutex_t;
>
> I don't know enough about how everything hangs together to know for sure
> that's what being used, but it looks like a possible culprit.
There is obviously a mismatch between /usr/include/pthread.h and
/usr/include/sys/types.h on your system.
My version of /usr/include/sys/types.h is
#pragma ident "@(#)types.h 1.68 02/06/10 SMI
and contains:
typedef struct _pthread_mutex { /* = mutex_t in synch.h */
struct {
uint16_t __pthread_mutex_flag1;
uint8_t __pthread_mutex_flag2;
uint8_t __pthread_mutex_ceiling;
uint16_t __pthread_mutex_type;
uint16_t __pthread_mutex_magic;
} __pthread_mutex_flags;
union {
struct {
uint8_t __pthread_mutex_pad[8];
} __pthread_mutex_lock64;
struct {
uint32_t __pthread_ownerpid;
uint32_t __pthread_lockword;
} __pthread_mutex_lock32;
upad64_t __pthread_mutex_owner64;
} __pthread_mutex_lock;
upad64_t __pthread_mutex_data;
} pthread_mutex_t;
and my version of /usr/include/pthread.h is
#pragma ident "@(#)pthread.h 1.29 01/07/07 SMI"
and contains (the unfixed macro)
#define PTHREAD_MUTEX_INITIALIZER {{0, 0, 0, 0, 0}, {{{0}}}, 0}
What are your versions?
> I'm wondering if I'm doing something wrong at config time or build time.
> Note as well, it appears that this is happening during the 64-bit
compile
> of libstdc++.
Maybe simply a Solaris 8 bug.
--
Eric Botcazou
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bootstrap failure on Sparc Solaris2.8
2003-05-27 18:08 Josh
@ 2003-05-27 19:13 ` Eric Botcazou
0 siblings, 0 replies; 8+ messages in thread
From: Eric Botcazou @ 2003-05-27 19:13 UTC (permalink / raw)
To: Josh; +Cc: gcc
> There is in fact a pthread.h header file in my $(objdir)/gcc/include
> directory
Ok, this means that at least one fix was applied to the header. Now could you
post the definitions of the two macros at stake, i.e
PTHREAD_MUTEX_INITIALIZER
and
PTHREAD_COND_INITIALIZER,
as they appear in this header file, including any surrounding #if/#endif?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bootstrap failure on Sparc Solaris2.8
@ 2003-05-27 18:08 Josh
2003-05-27 19:13 ` Eric Botcazou
0 siblings, 1 reply; 8+ messages in thread
From: Josh @ 2003-05-27 18:08 UTC (permalink / raw)
To: Eric Botcazou; +Cc: gcc
Eric--
There is in fact a pthread.h header file in my $(objdir)/gcc/include directory, as well as the block of code you list below in ${srcdir}/gcc/fixinc/inclhack.def...standing by for further instructions. ;>
--Josh
-------Original Message-------
From: Eric Botcazou <ebotcazou@libertysurf.fr>
Sent: 05/27/03 01:46 PM
To: Josh <sundog@mindspring.com>
Subject: Re: Bootstrap failure on Sparc Solaris2.8
>
> > I have now tried to bootstrap with the snapshot dated 20030526, with the
> same result: eh_alloc.cc fails at line 81, with or without LIBCXXFLAGS
> set. I probably shouldn't have, but I did, go in and change the files
> listed below, commenting out initializations of the __gthread_mutex_t
> type. This allowed the bootstrap to finish.
>
> In directory libstdc++-v3/include/libsupc++: eh_alloc.cc
> In directory libstdc++-v3/include/bits: stl_alloc.h, stl_threads.h
I should have thought about it earlier: there are these lines in
fixinc/inclhack.def:
/*
* Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing
* "0" for the last field of the pthread_mutex_t structure, which is
* of type upad64_t, which itself is typedef'd to int64_t, but with
* __STDC__ defined (e.g. by -ansi) it is a union. So change the
* initializer to "{0}" instead
*/
fix = {
hackname = solaris_mutex_init_2;
select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = pthread.h;
c_fix = format;
c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
"%0\n"
"#else\n"
"%1, {0}}%3\n"
"#endif";
c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[
\t]+{.*)"
",[ \t]*0}" "(|[ \t].*)$";
test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
"#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
"#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n"
"#define PTHREAD_RWLOCK_INITIALIZER\t"
"{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
};
which means that GCC is supposed to fix alone a problem that is very
similar
to the one you encountered.
Could you see if there is a pthread.h header file in
$(objdir)/gcc/include?
--
Eric Botcazou
>
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bootstrap failure on Sparc Solaris2.8
2003-05-27 17:08 Josh
@ 2003-05-27 17:51 ` Eric Botcazou
0 siblings, 0 replies; 8+ messages in thread
From: Eric Botcazou @ 2003-05-27 17:51 UTC (permalink / raw)
To: Josh; +Cc: gcc
> I have now tried to bootstrap with the snapshot dated 20030526, with the
> same result: eh_alloc.cc fails at line 81, with or without LIBCXXFLAGS
> set. I probably shouldn't have, but I did, go in and change the files
> listed below, commenting out initializations of the __gthread_mutex_t
> type. This allowed the bootstrap to finish.
>
> In directory libstdc++-v3/include/libsupc++: eh_alloc.cc
> In directory libstdc++-v3/include/bits: stl_alloc.h, stl_threads.h
I should have thought about it earlier: there are these lines in
fixinc/inclhack.def:
/*
* Sun Solaris defines PTHREAD_MUTEX_INITIALIZER with a trailing
* "0" for the last field of the pthread_mutex_t structure, which is
* of type upad64_t, which itself is typedef'd to int64_t, but with
* __STDC__ defined (e.g. by -ansi) it is a union. So change the
* initializer to "{0}" instead
*/
fix = {
hackname = solaris_mutex_init_2;
select = '@\(#\)pthread.h' "[ \t]+1.[0-9]+[ \t]+[0-9/]+ SMI";
files = pthread.h;
c_fix = format;
c_fix_arg = "#if __STDC__ - 0 == 0 && !defined(_NO_LONGLONG)\n"
"%0\n"
"#else\n"
"%1, {0}}%3\n"
"#endif";
c_fix_arg = "(^#define[ \t]+PTHREAD_(MUTEX|COND)_INITIALIZER[ \t]+{.*)"
",[ \t]*0}" "(|[ \t].*)$";
test_text =
'#ident "@(#)pthread.h 1.26 98/04/12 SMI"'"\n"
"#define PTHREAD_MUTEX_INITIALIZER\t{{{0},0}, {{{0}}}, 0}\n"
"#define PTHREAD_COND_INITIALIZER\t{{{0}, 0}, 0}\t/* DEFAULTCV */\n"
"#define PTHREAD_RWLOCK_INITIALIZER\t"
"{0, 0, 0, {0, 0, 0}, {0, 0}, {0, 0}}";
};
which means that GCC is supposed to fix alone a problem that is very similar
to the one you encountered.
Could you see if there is a pthread.h header file in $(objdir)/gcc/include?
--
Eric Botcazou
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: Bootstrap failure on Sparc Solaris2.8
@ 2003-05-27 17:08 Josh
2003-05-27 17:51 ` Eric Botcazou
0 siblings, 1 reply; 8+ messages in thread
From: Josh @ 2003-05-27 17:08 UTC (permalink / raw)
To: ebotcazou; +Cc: gcc
I have now tried to bootstrap with the snapshot dated 20030526, with the same result: eh_alloc.cc fails at line 81, with or without LIBCXXFLAGS set.
I probably shouldn't have, but I did, go in and change the files listed below, commenting out initializations of the __gthread_mutex_t type. This allowed the bootstrap to finish.
In directory libstdc++-v3/include/libsupc++: eh_alloc.cc
In directory libstdc++-v3/include/bits: stl_alloc.h, stl_threads.h
Thanks again.
--Josh
-------Original Message-------
From: Eric Botcazou <ebotcazou@libertysurf.fr>
Sent: 05/23/03 12:05 PM
To: Josh <sundog@mindspring.com>
Subject: Re: Bootstrap failure on Sparc Solaris2.8
>
> > I've configured with the following options in a separate objects
directory
> (gcc-objs), using gcc-3.2.3 as the starting compiler:
../gcc-3.3/configure
> --prefix=/compiler/gcc-3.3 \
> --with-ld=/compiler/gcc-3.2.3/bin/ld
> --with-gnu-ld \
> --with-as=compiler/gcc-3.2.3/bin/as \
> --with-gnu-as \
> --disable-nls \
> --enable-threads=posix
>
> Then:
> make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2
> -fno-implicit-templates' boostrap-lean
Did you set CONFIG_SHELL before configuring? Do you use GNU make?
--
Eric Botcazou
>
^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2003-05-28 19:22 UTC | newest]
Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-05-23 13:59 Bootstrap failure on Sparc Solaris2.8 Josh
2003-05-23 16:14 ` Eric Botcazou
2003-05-27 17:08 Josh
2003-05-27 17:51 ` Eric Botcazou
2003-05-27 18:08 Josh
2003-05-27 19:13 ` Eric Botcazou
2003-05-28 20:43 Josh Loeb
2003-05-28 20:53 ` Albert Chin
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).