build errors for download gcc-2.95.3-tar.gz for host m68k-motorola-sysv
Beere, Chris
Chris.Beere@cwcom.cwplc.com
Fri Mar 23 06:37:00 GMT 2001
Hello,
The standard gnu C compiler on the Motorola delta series is 2.4.5,
a very old version. I downloaded 2.95.2 and tried to build it, it failed
miserably. I installed 2.8.1 and this built OK. I retried 2.95.2 using 2.8.1
and after fixing some problems in libiberty/setenv.c it almost went the
distance, failing in the compile of the C++ libraries. I had noticed a later
version 2.95.3 which I also tried. This had the same problems. The following
extracts from the make.log file after executing the make with:-
nohup make CFLAGS='-O' LIBCFLAGS='-g -O2' LIBCXXFLAGS='-g -O2
-fno-implicit-templates' bootstrap >>make.log 2>&1
gcc281 -c -DHAVE_CONFIG_H -g -O2 -I.
-I../../gcc-2.95.3/libiberty/../include
../../gcc-2.95.3/libiberty/setenv.c -o pic/setenv.o
gcc281 -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include
..
/../gcc-2.95.3/libiberty/setenv.c
../../gcc-2.95.3/libiberty/setenv.c: In function `setenv':
../../gcc-2.95.3/libiberty/setenv.c:70: syntax error before `size'
../../gcc-2.95.3/libiberty/setenv.c:71: syntax error before `namelen'
../../gcc-2.95.3/libiberty/setenv.c:72: syntax error before `vallen'
../../gcc-2.95.3/libiberty/setenv.c:76: `size' undeclared (first use in this
function)
../../gcc-2.95.3/libiberty/setenv.c:76: (Each undeclared identifier is
reported only once
../../gcc-2.95.3/libiberty/setenv.c:76: for each function it appears in.)
../../gcc-2.95.3/libiberty/setenv.c:79: `namelen' undeclared (first use in
this function)
../../gcc-2.95.3/libiberty/setenv.c:100: `vallen' undeclared (first use in
this function)
../../gcc-2.95.3/libiberty/setenv.c:123: `size_t' undeclared (first use in
this function)
../../gcc-2.95.3/libiberty/setenv.c:123: parse error before `len'
../../gcc-2.95.3/libiberty/setenv.c:124: `len' undeclared (first use in this
fun
ction)
../../gcc-2.95.3/libiberty/setenv.c: In function `unsetenv':
Error at line 70 was it complaining about register???? I defined '#define
register' to get rid of them.
Before 2.8.1 was installed stdlib.h did not exist. After 2.8.1 was installed
it did exist, but did not contain definitions for NULL and size_t.
I forced inclusion of sys/types.h snd stdio.h rather than stdlib.h.
I added #include <malloc.h> to stop warnings about use of malloc().
These changes allowed setenv to compile cleanly:-
gcc281 -c -DHAVE_CONFIG_H -g -O2 -I.
-I../../gcc-2.95.3/libiberty/../include
../../gcc-2.95.3/libiberty/setenv.c -o pic/setenv.o
gcc281 -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include
..
/../gcc-2.95.3/libiberty/setenv.c
test x"no" != xyes || \
gcc281 -c -DHAVE_CONFIG_H -g -O2 -I.
-I../../gcc-2.95.3/libiberty/../include
../../gcc-2.95.3/libiberty/sigsetmask.c -o pic/sigsetmask.o
gcc281 -c -DHAVE_CONFIG_H -g -O2 -I. -I../../gcc-2.95.3/libiberty/../include
..
/../gcc-2.95.3/libiberty/sigsetmask.c
Why did it complain about register? This is valid.
It then went on to build the compiler cleanly xgcc, stage1/xgcc and
stage2/xgcc. It failed again compiling the C++ libraries:-
/usr/gnu/gcc/build2953/gcc/xgcc -B/usr/gnu/gcc/build2953/gcc/
-B/usr/egcs/m68k
-motorola-sysv/bin/ -c -g -O2 -fno-implicit-templates -I.
-I../../../gcc-2.95.3/
libio -nostdinc++ ../../../gcc-2.95.3/libio/builtinbuf.cc -o
pic/builtinbuf.o
/usr/gnu/gcc/build2953/gcc/xgcc -B/usr/gnu/gcc/build2953/gcc/
-B/usr/egcs/m68k-m
otorola-sysv/bin/ -c -g -O2 -fno-implicit-templates -I.
-I../../../gcc-2.95.3/li
bio -nostdinc++ ../../../gcc-2.95.3/libio/builtinbuf.cc
In file included from ../../../gcc-2.95.3/libio/builtinbuf.h:32,
from ../../../gcc-2.95.3/libio/builtinbuf.cc:29:
../../../gcc-2.95.3/libio/streambuf.h: In method `void ios::clear(int = 0)':
../../../gcc-2.95.3/libio/streambuf.h:212: `class ios' has no member named
`_throw_failure'
../../../gcc-2.95.3/libio/streambuf.h: In method `void ios::set(int)':
../../../gcc-2.95.3/libio/streambuf.h:214: `class ios' has no member named
`_throw_failure'
../../../gcc-2.95.3/libio/streambuf.h: In method `void ios::setstate(int)':
../../../gcc-2.95.3/libio/streambuf.h:216: `class ios' has no member named
`_throw_failure'
../../../gcc-2.95.3/libio/streambuf.h: In method `ios::operator void *()
const':
../../../gcc-2.95.3/libio/streambuf.h:222: `class ios' has no member named
`fail'
../../../gcc-2.95.3/libio/streambuf.h: In method `int ios::operator !()
const':
../../../gcc-2.95.3/libio/streambuf.h:223: `class ios' has no member named
`fail'
../../../gcc-2.95.3/libio/streambuf.h: In method `void
ios::exceptions(int)':
../../../gcc-2.95.3/libio/streambuf.h:227: `class ios' has no member named
`_throw_failure'
../../../gcc-2.95.3/libio/streambuf.h: In method `class streambuf *
ios::rdbuf(streambuf *)':
../../../gcc-2.95.3/libio/streambuf.h:231: `class ios' has no member named
`clear'
make[2]: *** [builtinbuf.o] Error 1
make[2]: Leaving directory `/usr/gnu/gcc/build2953/m68k-motorola-/libio'
make[1]: *** [all-target-libio] Error 2
make[1]: Leaving directory `/usr/gnu/gcc/build2953'
make: *** [bootstrap] Error 2
The interesting text from streambuf.h is:-
#ifdef _IO_THROW
void _throw_failure() const { throw new ios::failure(this); }
#else
void _throw_failure() const { }
#endif
void clear(iostate state = 0) {
_state = _strbuf ? state : state|badbit;
if (_state & _exceptions) _throw_failure(); }
void set(iostate flag) { _state |= flag;
if (_state & _exceptions) _throw_failure(); }
void setstate(iostate flag) { _state |= flag; // ANSI
_throw_failure is a method not a member, why the error 'has no member named'
?
Will you enlighten me as to what the errors mean, and give me a possible fix
please?
I am trying to install C++ to learn the language so my C++ knowledge is
basic.
regards
Chris Beere
Email: chris.beere@cw.com
Phone: +44 (0) 1923 435817
Fax: +44 (0) 1923 435370
**********************************************************************
This message may contain information which is confidential or privileged.
If you are not the intended recipient, please advise the sender immediately
by reply e-mail and delete this message and any attachments
without retaining a copy.
**********************************************************************
More information about the Gcc-bugs
mailing list