This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: extremely disappointing bootstrap problems building gcc on linux :( SOLVED !! :)
- From: John Sincock <jss at au dot mensa dot org>
- To: "gcc-help" <gcc-help at gcc dot gnu dot org>
- Cc: Dara Hazeghi <dhazeghi at yahoo dot com>
- Date: Wed, 4 Jun 2003 00:52:20 +0930
- Subject: Re: extremely disappointing bootstrap problems building gcc on linux :( SOLVED !! :)
- Reply-to: jss at au dot mensa dot org
Hi Dara (and others),
Your advice to try building g++ and the rest of the gcc 3.3 suite with
the plain old gcc (3.3) I've already successfully built... WORKED !!!!
So , thanks heaps :) Now i have nice new gcc 3.3 which has
not been tampered with by any Mandrake people etc. The only
part of gcc 3.3 I havent built is the ada compiler.
As for the cause of the problems compiling 3.2.2 and 3.3 -- with
2.95.3, 2.96 and 3.0.4 ... i still have no idea.
As i have mentioned before, my 2.95.3 is a not from an rpm, I compiled
it myself from the proper release tarball, and tested it with dejagnu, and
it was fine, so I really cant understand why there were problems using
my 2.95.3 :(
With 2.96 and 3.0.4 - which were installed from RPMs, I would suspect
that tinkering by Mandrake or Redhat people might have stuffed things
up a bit -- but then many more people would be having problems, so
that is probably not the answer.
The weekend before last, I installed a new hard disk, and so now
i have rearranged things and have lots of space to build stuff. -- so, if
anyone would like me to do some more experiments to try to work out
what the problem was, I would be happy to do them, as I also would
very much like to work out whether it is a minor gcc bug/configuration
problem or whether there is something weird going on with the compilers
I have previously installed etc.
I have probably taken up enough of your time though, and I think my
problem is more or less solved now that i have a working 3.3.
So if noone else is reporting similar problems, and you think the problem
is probably just some minor thing Ive stuffed up myself and you would like
to move on to other things affecting other people --- then, thats kewl.
And thanks again, :)
cheerios,
John
ps re your (Dara's) other suggestions:
1) The build dir was definitely not on my path.
2) re the wrong cc1 possibly being used to compile the g++ portion, i
added the -v option to the failed command line and the relevant response
was:
Reading specs from ./specs
gcc driver version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk) executing gcc version 3.3
I expect that is what you would have expected??? I know that by the
time the compilation fails at g++spec.c, there IS a new cc1 in the gcc
subdir ... but if the new cc1 should have been used to compile
g++spec.c surely the build process would have used it!!
Also, I should mention that I am using a script to switch between
my compilers, and I have now also got it renaming every cc1, except that
of the compiler i am building with - to "cc1-xxxx", so there is absolutely no
way that for example, the cc1 of 3.0.4 will ever be used by accident when
i have started the build with 2.96. My script also replaces all links etc
to other programs in the gcc suite, ie: c++ cpp g++ g77 f77 gcc
gcj, gcov, protoize, unprotoize, gccbug, /usr/bin/i586-mandrake-linux-gnu-gcc
etc etc etc, so that only the programs for the correct version of gcc can be
found in my PATH. I think i have been pretty careful with all of that, and
I am quite certain that I am switching between compilers properly, but
perhaps there is something else I am overlooking when switching
compilers? If there is a problem with my script to switch compilers, I
cant imagine how i am able to switch to gcc 3.3 and compile the rest of
the 3.3 suite without the same problem ocurring there ...
It is very strange...
Anyway, building with 2.96, the full output of the failed compile with -v
option is below FYI:
(SHLIB_LINK=' ./xgcc -B./ -B/usr/local/gcc/gcc-3.3-20030603/i686-pc-linux-gnu/bin/ -isystem /usr/local/gcc/gcc-3.3-20030603/i686-pc-linux-gnu/include -isystem /usr/local/gcc/gcc-3.3-20030603/i686-pc-linux-gnu/sys-include -O2 -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include -fPIC -g -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED -shared -nodefaultlibs -Wl,--soname=@shlib_so_name@.so.1 -Wl,--version-script=@shlib_map_file@ -o @shlib_dir@@shlib_so_name@.so.1 @multilib_flags@ @shlib_objs@ -lc && rm -f @shlib_base_name@.so && ln -s @shlib_dir@@shlib_so_name@.so.1 @shlib_base_name@.so' \
> SHLIB_MULTILIB=''; \
> gcc -c -v -g -DIN_GCC -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DSTANDARD_STARTFILE_PREFIX=\"../../../\" -DSTANDARD_EXEC_PREFIX=\"/usr/local/gcc/gcc-3.3-20030603/lib/gcc-lib/\" -DDEFAULT_TARGET_VERSION=\"3.3\" -DDEFAULT_TARGET_MACHINE=\"i686-pc-linux-gnu\" -DSTANDARD_BINDIR_PREFIX=\"/usr/local/gcc/gcc-3.3-20030603/bin/\" -DTOOLDIR_BASE_PREFIX=\"../../../../\" `test "X${SHLIB_LINK}" = "X" || test "yes" != "yes" || echo "-DENABLE_SHARED_LIBGCC"` `test "X${SHLIB_MULTILIB}" = "X" || echo "-DNO_SHARED_LIBGCC_MULTILIB"` \
> -I. -I. -I/usr/local/src/gcc/gcc-3.3/gcc -I/usr/local/src/gcc/gcc-3.3/gcc/. -I/usr/local/src/gcc/gcc-3.3/gcc/config -I/usr/local/src/gcc/gcc-3.3/gcc/../include /usr/local/src/gcc/gcc-3.3/gcc/cp/g++spec.c)
Reading specs from ./specs
gcc driver version 2.96 20000731 (Mandrake Linux 8.2 2.96-0.76mdk) executing gcc version 3.3
/usr/lib/gcc-lib/i586-mandrake-linux-gnu/2.96/cc1 -E -lang-c -quiet -v -I. -I. -I/usr/local/src/gcc/gcc-3.3/gcc -I/usr/local/src/gcc/gcc-3.3/gcc/. -I/usr/local/src/gcc/gcc-3.3/gcc/config -I/usr/local/src/gcc/gcc-3.3/gcc/../include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=0 -DIN_GCC -DHAVE_CONFIG_H -DSTANDARD_STARTFILE_PREFIX="../../../" -DSTANDARD_EXEC_PREFIX="/usr/local/gcc/gcc-3.3-20030603/lib/gcc-lib/" -DDEFAULT_TARGET_VERSION="3.3" -DDEFAULT_TARGET_MACHINE="i686-pc-linux-gnu" -DSTANDARD_BINDIR_PREFIX="/usr/local/gcc/gcc-3.3-20030603/bin/" -DTOOLDIR_BASE_PREFIX="../../../../" -DENABLE_SHARED_LIBGCC /usr/local/src/gcc/gcc-3.3/gcc/cp/g++spec.c -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long /home/jss/tmp/ccECnDaY.i
cc1: Unrecognized option `-E'
cc1: Unrecognized option `-lang-c'
cc1: Unrecognized option `-v'
cc1: Unrecognized option `-D__GNUC__=3'
cc1: Unrecognized option `-D__GNUC_MINOR__=3'
cc1: Unrecognized option `-D__GNUC_PATCHLEVEL__=0'
cc1: Unrecognized option `-DIN_GCC'
cc1: Unrecognized option `-DHAVE_CONFIG_H'
cc1: Unrecognized option `-DSTANDARD_STARTFILE_PREFIX="../../../"'
cc1: Unrecognized option `-DSTANDARD_EXEC_PREFIX="/usr/local/gcc/gcc-3.3-20030603/lib/gcc-lib/"'
cc1: Unrecognized option `-DDEFAULT_TARGET_VERSION="3.3"'
cc1: Unrecognized option `-DDEFAULT_TARGET_MACHINE="i686-pc-linux-gnu"'
cc1: Unrecognized option `-DSTANDARD_BINDIR_PREFIX="/usr/local/gcc/gcc-3.3-20030603/bin/"'
cc1: Unrecognized option `-DTOOLDIR_BASE_PREFIX="../../../../"'
cc1: Unrecognized option `-DENABLE_SHARED_LIBGCC'
/home/jss/tmp/ccECnDaY.i:1: warning: ISO C forbids an empty source file