* Error compiling 64bits gcc 3.2 compiler on Solaris 2.8
@ 2002-10-03 7:33 Ziying Sherwin
2002-10-03 8:07 ` Rupert Wood
0 siblings, 1 reply; 2+ messages in thread
From: Ziying Sherwin @ 2002-10-03 7:33 UTC (permalink / raw)
To: gcc-help
We are trying to install gcc 3.2 64 bits compiler on our Solaris 2.8
machine. Currently we are using gcc 2.95.2. We attempted to install gcc 3
64 bit compiler several time, but encountered some problems each time. This
time, we stil have problems compiling true 64 bit compiler. Here is how we
do it:
1. Using gcc 2.95.2 compile a 32 bits gcc 3.2 compiler:
/gcc_3.2.dir/configure \
--prefix=/depot/package/gcc_3.2_32bit \
--enable-languages=c,c++,f77,objc \
--enable-threads
make bootstrap
make check
make install
2. Using the newly compiled 32 bits gcc 3.2 compiler to compile a 64 bits
compiler:
/gcc_3.2.dir/configure \
--prefix=/depot/package/gcc_3.2_64bit \
--enable-languages=c,c++,f77,objc \
--enable-threads \
--with-as=/usr/ccs/bin/as \
--with-ld=/usr/ccs/bin/ld \
--disable-nls
sparcv9-sun-solaris2
make bootstrap
make check
make install
3. Using the newly compiled 64 bits gcc 3.2 compiler to compile a real
64 bits compiler:
/gcc_3.2.dir/configure \
--prefix=/depot/package/gcc_3.2 \
--enable-threads \
--with-as=/usr/ccs/bin/as \
--with-ld=/usr/ccs/bin/ld \
--enable-languages=c,c++,f77,objc \
--disable-nls \
sparcv9-sun-solaris2
make bootstrap [failed here]
We got error messages at this point:
/bin/sh /site4/gcc_3.2.dir/gcc/move-if-change tmp-check.h tree-check.h
echo timestamp > s-check
stage1/xgcc -Bstage1/ -B/depot/package/gcc_3.2/sparcv9-sun-solaris2/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I/site4/gcc_3.2.dir/gcc -I/site4/gcc_3.2.dir/gcc/. -I/site4/gcc_3.2.dir/gcc/config -I/site4/gcc_3.2.dir/gcc/../include /site4/gcc_3.2.dir/gcc/print-rtl.c
-o print-rtl.o
stage1/xgcc -Bstage1/ -B/depot/package/gcc_3.2/sparcv9-sun-solaris2/bin/ -c -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -I. -I. -I/site4/gcc_3.2.dir/gcc -I/site4/gcc_3.2.dir/gcc/. -I/site4/gcc_3.2.dir/gcc/config -I/site4/gcc_3.2.dir/gcc/../include /site4/gcc_3.2.dir/gcc/errors.c -o
errors.o
stage1/xgcc -Bstage1/ -B/depot/package/gcc_3.2/sparcv9-sun-solaris2/bin/ -DIN_GCC -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long -DHAVE_CONFIG_H -DGENERATOR_FILE -o genflags \
genflags.o rtl.o read-rtl.o bitmap.o ggc-none.o gensupport.o print-rtl.o errors.o ../libiberty/libiberty.a
ld: warning: file ../libiberty/libiberty.a(hashtab.o): wrong ELF class: ELFCLASS32
Undefined first referenced
symbol in file
htab_create read-rtl.o
_obstack_begin genflags.o
_sch_toupper genflags.o
obstack_free read-rtl.o
htab_find read-rtl.o
_sch_istable genflags.o
xstrdup read-rtl.o
ld: fatal: Symbol referencing errors. No output written to genflags
collect2: ld returned 1 exit status
make[2]: *** [genflags] Error 1
make[2]: Leaving directory `/tmp/gccbuild/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/tmp/gccbuild/gcc'
make: *** [bootstrap] Error 2
Any ideas? Thanks.
Ziying Sherwin
P.S. I am not on the mailing list, please send your suggestion to
sherwin@nlm.nih.gov
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Error compiling 64bits gcc 3.2 compiler on Solaris 2.8
2002-10-03 7:33 Error compiling 64bits gcc 3.2 compiler on Solaris 2.8 Ziying Sherwin
@ 2002-10-03 8:07 ` Rupert Wood
0 siblings, 0 replies; 2+ messages in thread
From: Rupert Wood @ 2002-10-03 8:07 UTC (permalink / raw)
To: Ziying Sherwin; +Cc: gcc-help
Ziying Sherwin wrote:
> We are trying to install gcc 3.2 64 bits compiler on our Solaris 2.8
> machine.
Why do you want this? The 32-bit compiler can generate 64-bit code if you
pass the '-m64' flag. I'd be very surprised if there were any performance
improvements or if you ever hit the memory cap running the 32-bit
compiler.
> 1. Using gcc 2.95.2 compile a 32 bits gcc 3.2 compiler:
>
> /gcc_3.2.dir/configure \
> --prefix=/depot/package/gcc_3.2_32bit \
> --enable-languages=c,c++,f77,objc \
> --enable-threads
> make bootstrap
> make check
> make install
You could --with-cpu=ultrasparc to the configure to set the default target
CPU (although that might now be the default - I don't recall).
> 2. Using the newly compiled 32 bits gcc 3.2 compiler to compile a 64 bits
> compiler:
>
> /gcc_3.2.dir/configure \
> --prefix=/depot/package/gcc_3.2_64bit \
> --enable-languages=c,c++,f77,objc \
> --enable-threads \
> --with-as=/usr/ccs/bin/as \
> --with-ld=/usr/ccs/bin/ld \
> --disable-nls
> sparcv9-sun-solaris2
> make bootstrap
> make check
> make install
Note that because you are 'make bootstrap'ping here, the output of this
second step will be a 'real' 64-bit compiler.
If you had really just intended to use this to build a third GCC, you only
needed the C language. You'd save a lot of time not building the runtimes
libraries for the other three.
> ld: warning: file ../libiberty/libiberty.a(hashtab.o): wrong ELF class:
> ELFCLASS32
I think this is actually a failure from step 2, not step 3.
The problem is that the bootstrap compiler (32 bits) is used to build
libiberty. To build stage 2, stage 1's new 64-bit xgcc attempts to link
the libiberty built by the bootstrap compile. You told it that it is doing
a 64-bit native build so it assumes that the bootstrap compiler generates
64-bit code. You haven't configured --disable-multilib, so the first step
compiler will generate 64-bit code if you pass '-m64'; you could try
defining
CFLAGS="-m64 -O2 -g"
or similar for the second step. Another approach would be to rename the
32-bit libiberty, reconfigure and rebuilt it using the stage1 compiler and
then restart the bootstrap.
Good luck,
Rup.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2002-10-03 15:07 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-10-03 7:33 Error compiling 64bits gcc 3.2 compiler on Solaris 2.8 Ziying Sherwin
2002-10-03 8:07 ` Rupert Wood
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).