public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* RE: Error building 64 bit gcc in sparcv9-sun-solaris2.8
@ 2002-04-03 11:28 Karthikeyan M. D
  0 siblings, 0 replies; 4+ messages in thread
From: Karthikeyan M. D @ 2002-04-03 11:28 UTC (permalink / raw)
  To: gcc-help

Hi,
	Thanks for the reply. I did a cleanup only in toplevel libiberty
directory and not in pic directory inside and built libiberty with
stage1/xgcc and then did the bootstrap again, this time it failed in the
stage comparison saying the object files differs (error below), need the cp
directory to be rebuilt with stage2 xgcc.

Thanks,
Karthik

***********Error********************
Bootstrap complete - make "quickstrap" to redo last build,
"restage1" through "restage3" to rebuild specific stages,
or "cleanstrap" to redo the bootstrap from scratch.
Comparing stage2 and stage3 of the compiler
rm -f .bad_compare
case "compare" in compare | compare-lean ) stage=2 ;; * ) stage=`echo
compare | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
for file in *.o; do \
  tail +16c ./$file > tmp-foo1; \
  tail +16c stage$stage/$file > tmp-foo2 \
    && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $file differs >>
.bad_compare) || true; \
done
case "compare" in compare | compare-lean ) stage=2 ;; * ) stage=`echo
compare | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
for dir in tmp-foo intl cp; do \
  if [ "`echo $dir/*.o`" != "$dir/*.o" ] ; then \
    for file in $dir/*.o; do \
      tail +16c ./$file > tmp-foo1; \
      tail +16c stage$stage/$file > tmp-foo2 \
        && (cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1 || echo $file differs >>
.bad_compare) || true; \
    done; \
  else true; fi; \
done
rm -f tmp-foo*
case "compare" in compare | compare-lean ) stage=2 ;; * ) stage=`echo
compare | sed -e 's,^compare\([0-9][0-9]*\).*,\1,'` ;; esac; \
if [ -f .bad_compare ]; then \
  echo "Bootstrap comparison failure!"; \
  cat .bad_compare; \
  exit 1; \
else \
  case "compare" in \
    *-lean ) rm -rf stage$stage ;; \
    *) ;; \
  esac; true; \
fi
Bootstrap comparison failure!
alias.o differs
alloca.o differs
bb-reorder.o differs
bitmap.o differs
builtins.o differs
c-aux-info.o differs
c-common.o differs
c-convert.o differs
c-decl.o differs
c-dump.o differs
.....................
.....................
cp/tree.o differs
cp/typeck.o differs
cp/typeck2.o differs
cp/xref.o differs
*** Error code 1
make: Fatal error: Command failed for target `compare'
Current working directory /tmp/fs/gcc-sparc-64bit-obj/gcc
*** Error code 1
make: Fatal error: Command failed for target `bootstrap'
	

> -----Original Message-----
> From:	Rupert Wood [SMTP:me@rupey.net]
> Sent:	Wednesday, April 03, 2002 19:45
> To:	'Karthikeyan M. D'
> Cc:	gcc-help@gcc.gnu.org
> Subject:	RE: Error building 64 bit gcc in sparcv9-sun-solaris2.8
> 
> Karthik wrote:
> 
> > ld: warning: file ../libiberty/libiberty.a(getpwd.o): wrong ELF class:
> > ELFCLASS32
> 
> You told it the build system is sparcv9 so it assumed that the bootstrap
> compiler generated sparcv9 code. It didn't; your bootstrap compiler
> generates 32-bit sparc code. Hence the top level libiberty was generated
> as 32-bit and you're now attempting to link it to 64-bit code.
> 
> Clean out the top level libiberty directory and reconfigure and build
> using the xgcc you've just built, i.e. something along the lines of:
> 
>    CC="../gcc/stage1/xgcc -B../gcc/stage1/" \
>        <srcdir>/libiberty/configure <etc>
>    make CC="../gcc/stage1/xgcc -B../gcc/stage1/"
> 
> (or throw in stage1/ as necessary; can't remember)
> Go back and restart the bootstrap; it should then complete (or, at
> least, it has for me before from this situation.)
> 
> Other ways of building sparcv9:
> 
>   1. Install a multilibbed 32-bit gcc which understands -m64 (3+, I
>      think). Then:
> 
>       CC="gcc -m64" ../gcc-3.0/configure <etc> sparcv9-sun-solaris2.8
>       make bootstrap CC="gcc -m64"
> 
>      This will build the top level libiberty (and stage1) as 64-bit
>      straight off.
> 
>   2. Generate a cross-compiler to sparcv9 then use that as the build
>      compiler to bootstrap a 64-bit gcc. (Don't know if you'd need a
>      complete toolchain or not - never tried this.)
> 
> In my opinion, you'd probably do better with a multilibbed sparc
> compiler and the '-m64' switch than a sparcv9 compiler. But, as you say,
> lots of people build sparcv9. And if you want 64-bit sparc, you'd be
> better off with a gcc 3.1 snapshot; 3.0x has (I think) incomplete
> support for the 64-bit sparc ABI.
> 
> Rup.


This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify us immediately. You should not copy it or use it for any purpose, nor disclose it's contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Error building 64 bit gcc in sparcv9-sun-solaris2.8
       [not found] <616BE6A276E3714788D2AC35C40CD18D590FDF@whale.softwire.co.uk>
@ 2002-04-03  6:33 ` Rupert Wood
  0 siblings, 0 replies; 4+ messages in thread
From: Rupert Wood @ 2002-04-03  6:33 UTC (permalink / raw)
  To: 'Karthikeyan M. D'; +Cc: gcc-help

Karthik wrote:

> ld: warning: file ../libiberty/libiberty.a(getpwd.o): wrong ELF class:
> ELFCLASS32

You told it the build system is sparcv9 so it assumed that the bootstrap
compiler generated sparcv9 code. It didn't; your bootstrap compiler
generates 32-bit sparc code. Hence the top level libiberty was generated
as 32-bit and you're now attempting to link it to 64-bit code.

Clean out the top level libiberty directory and reconfigure and build
using the xgcc you've just built, i.e. something along the lines of:

   CC="../gcc/stage1/xgcc -B../gcc/stage1/" \
       <srcdir>/libiberty/configure <etc>
   make CC="../gcc/stage1/xgcc -B../gcc/stage1/"

(or throw in stage1/ as necessary; can't remember)
Go back and restart the bootstrap; it should then complete (or, at
least, it has for me before from this situation.)

Other ways of building sparcv9:

  1. Install a multilibbed 32-bit gcc which understands -m64 (3+, I
     think). Then:

      CC="gcc -m64" ../gcc-3.0/configure <etc> sparcv9-sun-solaris2.8
      make bootstrap CC="gcc -m64"

     This will build the top level libiberty (and stage1) as 64-bit
     straight off.

  2. Generate a cross-compiler to sparcv9 then use that as the build
     compiler to bootstrap a 64-bit gcc. (Don't know if you'd need a
     complete toolchain or not - never tried this.)

In my opinion, you'd probably do better with a multilibbed sparc
compiler and the '-m64' switch than a sparcv9 compiler. But, as you say,
lots of people build sparcv9. And if you want 64-bit sparc, you'd be
better off with a gcc 3.1 snapshot; 3.0x has (I think) incomplete
support for the 64-bit sparc ABI.

Rup.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: Error building 64 bit gcc in sparcv9-sun-solaris2.8
@ 2002-04-03  6:14 Karthikeyan M. D
  0 siblings, 0 replies; 4+ messages in thread
From: Karthikeyan M. D @ 2002-04-03  6:14 UTC (permalink / raw)
  To: gcc-help

Hi,
	The error was because gnu ranlib appear before /usr/ccs/bin/ranlib,
once I set the PATH properly it proceeded further but stuck in some other
place because of below error.

Thanks,
Karthik

stage1/xgcc -Bstage1/ -B/tmp/fs/gcc64/sparcv9-sun-solaris2.8/bin/  -DIN_GCC
-DSVR4   -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H
-o cc1 \
        c-parse.o c-lang.o c-errors.o c-lex.o c-pragma.o c-decl.o c-typeck.o
c-convert.o c-aux-info.o c-common.o c-format.o c-semantics.o c-dump.o
libcpp.a  toplev.o libbackend.a obstack.o alloca.o
../libiberty/libiberty.a
ld: elf error: file ../libiberty/libiberty.a(obstack.o): elf_getshdr:
Request error: class file/memory mismatch
ld: warning: file ../libiberty/libiberty.a(getpwd.o): wrong ELF class:
ELFCLASS32
ld: fatal: File processing errors. No output written to cc1
collect2: ld returned 1 exit status
*** Error code 1
make: Fatal error: Command failed for target `cc1'
Current working directory /tmp/fs/gcc-sparc-64bit-obj/gcc
*** Error code 1
make: Fatal error: Command failed for target `stage2_build'
Current working directory /tmp/fs/gcc-sparc-64bit-obj/gcc
*** Error code 1
make: Fatal error: Command failed for target `bootstrap'


> -----Original Message-----
> From:	Karthikeyan M. D 
> Sent:	Wednesday, April 03, 2002 18:08
> To:	'gcc-help@gcc.gnu.org'
> Subject:	Error building 64 bit gcc in sparcv9-sun-solaris2.8
> 
> Hi,
> 	I've read few people's mail who has built 64 bit gcc in sparc
> platform successfully and I tried building 64 bit gcc with both 3.0 source
> and 3.0.4 source in sparcv9-sun-solaris2.8 and got the below error in both
> the cases. I tried building with both gcc-3.0 (32 bit) and gcc-2.95.3 and
> got the the same error. I have all the latest GNU tools (make-3.79.1,
> autoconf, automake, autogen, flex, bison, etc.) The error says libgcc.a is
> an unknown file type, but when I do file command on that it says it is a
> library archive. I used the following commands to configure and build.
> 
> ../gcc-3.0/configure --prefix=/tmp/fs/gcc64 \
> 		      --enable-shared \
> 		      --enable-languages="c,c++" \
> 		      --with-as=/usr/ccs/bin/as \
> 		      --with-ld=/usr/ccs/bin/ld \
> 		       sparcv9-sun-solaris2.8
> 
> make bootstrap
> 
> Any help is highly appreciated.
> 
> Thanks,
> Karthik
> 
> *******Error************
> 
> make CC="stage1/xgcc -Bstage1/
> -B/tmp/fs/gcc64/sparcv9-sun-solaris2.8/bin/" \
>          STAGE_PREFIX=stage1/ \
>          CFLAGS="-g -O2" LDFLAGS="" WARN_CFLAGS="\$(GCC_WARN_CFLAGS)"
> STRICT_WARN="-Wtraditional -pedantic -Wno-long-long"
> libdir=/tmp/fs/gcc64/lib LANGUAGES="c gcov c++" MAKEOVERRIDES=
> OUTPUT_OPTION="-o \$@"
> make[1]: Entering directory `/tmp/fs/gcc-sparc-64bit-obj2/gcc'
> stage1/xgcc -Bstage1/ -B/tmp/fs/gcc64/sparcv9-sun-solaris2.8/bin/
> -DIN_GCC  -DSVR4  -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
> -Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long
> -DHAVE_CONFIG_H -DGENERATOR_FILE  -o gengenrtl \
>  gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case
> "alloca.o" in ?*) echo alloca.o ;; esac ` ` case "" in ?*) echo  ;; esac `
> ` case "" in ?*) echo  ;; esac ` ` case "" in ?*) echo  ;; esac ` ` case
> "" in ?*) echo  ;; esac ` 
> ld: fatal: file stage1/libgcc.a: unknown file type
> ld: fatal: library -lgcc: not found
> ld: fatal: file stage1/libgcc.a: unknown file type
> ld: fatal: library -lgcc: not found
> ld: fatal: File processing errors. No output written to gengenrtl
> collect2: ld returned 1 exit status
> make[1]: *** [gengenrtl] Error 1
> make[1]: Leaving directory `/tmp/fs/gcc-sparc-64bit-obj2/gcc'
> make: *** [stage2_build] Error 2
> 
> ______________________________________________________
> Karthikeyan M D
> Wilco International Systems (P) Ltd
> Email: dkarthik@wilco-int.com Web: www.wilco-int.com
> Phone: +91 40 340 8600 Extn.: 8422 Fax: +91 40 340 6980
> 
> 
> 


This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify us immediately. You should not copy it or use it for any purpose, nor disclose it's contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Error building 64 bit gcc in sparcv9-sun-solaris2.8
@ 2002-04-03  5:38 Karthikeyan M. D
  0 siblings, 0 replies; 4+ messages in thread
From: Karthikeyan M. D @ 2002-04-03  5:38 UTC (permalink / raw)
  To: gcc-help

Hi,
	I've read few people's mail who has built 64 bit gcc in sparc
platform successfully and I tried building 64 bit gcc with both 3.0 source
and 3.0.4 source in sparcv9-sun-solaris2.8 and got the below error in both
the cases. I tried building with both gcc-3.0 (32 bit) and gcc-2.95.3 and
got the the same error. I have all the latest GNU tools (make-3.79.1,
autoconf, automake, autogen, flex, bison, etc.) The error says libgcc.a is
an unknown file type, but when I do file command on that it says it is a
library archive. I used the following commands to configure and build.

../gcc-3.0/configure --prefix=/tmp/fs/gcc64 \
		      --enable-shared \
		      --enable-languages="c,c++" \
		      --with-as=/usr/ccs/bin/as \
		      --with-ld=/usr/ccs/bin/ld \
		       sparcv9-sun-solaris2.8

make bootstrap

Any help is highly appreciated.

Thanks,
Karthik

*******Error************

make CC="stage1/xgcc -Bstage1/ -B/tmp/fs/gcc64/sparcv9-sun-solaris2.8/bin/"
\
         STAGE_PREFIX=stage1/ \
         CFLAGS="-g -O2" LDFLAGS="" WARN_CFLAGS="\$(GCC_WARN_CFLAGS)"
STRICT_WARN="-Wtraditional -pedantic -Wno-long-long"
libdir=/tmp/fs/gcc64/lib LANGUAGES="c gcov c++" MAKEOVERRIDES=
OUTPUT_OPTION="-o \$@"
make[1]: Entering directory `/tmp/fs/gcc-sparc-64bit-obj2/gcc'
stage1/xgcc -Bstage1/ -B/tmp/fs/gcc64/sparcv9-sun-solaris2.8/bin/  -DIN_GCC
-DSVR4  -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes
-Wmissing-prototypes -Wtraditional -pedantic -Wno-long-long  -DHAVE_CONFIG_H
-DGENERATOR_FILE  -o gengenrtl \
 gengenrtl.o ` case "obstack.o" in ?*) echo obstack.o ;; esac ` ` case
"alloca.o" in ?*) echo alloca.o ;; esac ` ` case "" in ?*) echo  ;; esac ` `
case "" in ?*) echo  ;; esac ` ` case "" in ?*) echo  ;; esac ` ` case "" in
?*) echo  ;; esac ` 
ld: fatal: file stage1/libgcc.a: unknown file type
ld: fatal: library -lgcc: not found
ld: fatal: file stage1/libgcc.a: unknown file type
ld: fatal: library -lgcc: not found
ld: fatal: File processing errors. No output written to gengenrtl
collect2: ld returned 1 exit status
make[1]: *** [gengenrtl] Error 1
make[1]: Leaving directory `/tmp/fs/gcc-sparc-64bit-obj2/gcc'
make: *** [stage2_build] Error 2

______________________________________________________
Karthikeyan M D
Wilco International Systems (P) Ltd
Email: dkarthik@wilco-int.com Web: www.wilco-int.com
Phone: +91 40 340 8600 Extn.: 8422 Fax: +91 40 340 6980





This message is confidential and may also be legally privileged. If you are not the intended recipient, please notify us immediately. You should not copy it or use it for any purpose, nor disclose it's contents to any other person. The views and opinions expressed in this e-mail message are the author's own and may not reflect the views and opinions of Wilco International.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2002-04-03 15:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-04-03 11:28 Error building 64 bit gcc in sparcv9-sun-solaris2.8 Karthikeyan M. D
     [not found] <616BE6A276E3714788D2AC35C40CD18D590FDF@whale.softwire.co.uk>
2002-04-03  6:33 ` Rupert Wood
  -- strict thread matches above, loose matches on Subject: below --
2002-04-03  6:14 Karthikeyan M. D
2002-04-03  5:38 Karthikeyan M. D

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).