Bug 27127 - internal compiler error when compiling libjava with jc1
Summary: internal compiler error when compiling libjava with jc1
Status: RESOLVED INVALID
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 3.4.6
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-04-12 08:37 UTC by Rainer Canava
Modified: 2006-04-13 12:25 UTC (History)
3 users (show)

See Also:
Host: sparc-sun-solaris2.8
Target: sparc-sun-solaris2.8
Build: sparc-sun-solaris2.8
Known to work:
Known to fail:
Last reconfirmed:


Attachments
Class.s, as built by gcj/jc1 before failure (93 bytes, text/plain)
2006-04-12 08:38 UTC, Rainer Canava
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Canava 2006-04-12 08:37:01 UTC
I'm trying to build gcc on solaris8 sparc. after the command below, Class.d is 0 bytes in size. I don't see any other temporary files left behind by -save-temps

rainer@arinna:~/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libjava$ /export/home/rainer/gcc-3.4.6/gcc/gcj -v -save-temps -B/export/home/rainer/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libjava/ -B/export/home/rainer/gcc-3.4.6/gcc/ --encoding=UTF-8 -Wno-deprecated -fclasspath= -fbootclasspath=/export/home/rainer/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libjava -g -O2 -m64 -MD -MT java/lang/Class.lo -MF java/lang/Class.d -c ../../.././libjava/java/lang/Class.java -fPIC -o java/lang/.libs/Class.o
Reading specs from /export/home/rainer/gcc-3.4.6/gcc/specs
Reading specs from /export/home/rainer/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libjava/libgcj.spec
rename spec lib to liborig
Configured with: ./configure --prefix=/usr/local/gcc-4.1.0 --program-suffix=4.1.0 --with-gnu-ld=/usr/local/bin/ld --with-gnu-as=/usr/local/bin/as
Thread model: posix
gcc version 3.4.6
 /export/home/rainer/gcc-3.4.6/gcc/jc1 ../../.././libjava/java/lang/Class.java -fuse-divide-subroutine -fcheck-references -fuse-boehm-gc -fkeep-inline-functions -mptr64 -mstack-bias -mno-v8plus -mcpu=v9 -quiet -dumpbase Class.java -m64 -auxbase-strip java/lang/.libs/Class.o -g -O2 -Wno-deprecated -version -fencoding=UTF-8 -fclasspath= -fbootclasspath=/export/home/rainer/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libjava -fPIC -MD_ -MT java/lang/Class.lo -MF java/lang/Class.d -o Class.s
GNU Java version 3.4.6 (sparc-sun-solaris2.8)
        compiled by GNU C version 3.4.2.
GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072
Class path starts here:
    ./
    /export/home/rainer/gcc-3.4.6/sparc-sun-solaris2.8/sparcv9/libjava/ (system)
../../.././libjava/java/lang/Class.java: In class `java.lang.Class':
../../.././libjava/java/lang/Class.java: In method `java.lang.Class.getDeclaredFields()':
../../.././libjava/java/lang/Class.java:85: internal compiler error: in size_binop, at fold-const.c:1601
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
Comment 1 Rainer Canava 2006-04-12 08:38:35 UTC
Created attachment 11247 [details]
Class.s, as built by gcj/jc1 before failure
Comment 2 Eric Botcazou 2006-04-12 09:06:40 UTC
This is known to work, please make sure to read carefully the instructions at
  http://gcc.gnu.org/install/specific.html#x-x-solaris2

In particular, use the recommended config shell and do not build in the source directory.  And --with-gnu-as=/usr/local/bin/as --with-gnu-ld=/usr/local/bin/ld is not the correct syntax, please see http://gcc.gnu.org/install/configure.html.

Also make sure to bootstrap ("gmake bootstrap") and not simply build the compiler.
Comment 3 Rainer Canava 2006-04-13 12:25:30 UTC
make bootstrap succeeded after setting -L and -D to the directory where libiconv was installed. Setting CONFIG_SHELL might have helped.