libgcj/7966: install gcc3.2 on SCO 5.0.5--some bugs fixed, but libgcj can't be generated
marshalking@21cn.com
marshalking@21cn.com
Wed Sep 18 03:19:00 GMT 2002
>Number: 7966
>Category: libgcj
>Synopsis: install gcc3.2 on SCO 5.0.5--some bugs fixed, but libgcj can't be generated
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: unassigned
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Sep 18 02:16:02 PDT 2002
>Closed-Date:
>Last-Modified:
>Originator: marshalking
>Release: gcc version 3.2
>Organization:
>Environment:
uname -X
System = SCO_SV
Node = ab_sco
Release = 3.2v5.0.5
KernelID = 98/07/02
Machine = i80386
BusType = ISA
Serial = 2FI064463
Users = 16-user
OEM# = 0
Origin# = 1
NumCPU = 1
>Description:
# cd obj1
# ../libjava/configure
# make
bug 1:
gcj -B/pub/gcc-3.2/libjava/obj/ --encoding=UTF-8 -C -g -classpath '' -bootclasspath /pub/gcc-3.2/libjava/obj:.. \
-d /pub/gcc-3.2/libjava/obj ../java/lang/Class.java
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
.....
bug 2:
make[1]: Leaving directory `/pub/gcc-3.2/obj1'
Making all in libltdl
make[1]: Entering directory `/pub/gcc-3.2/obj1/libltdl'
make[1]: Leaving directory `/pub/gcc-3.2/obj1/libltdl'
Making all in testsuite
make[1]: Entering directory `/pub/gcc-3.2/obj1/testsuite'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/pub/gcc-3.2/obj1/testsuite'
Making all in gcj
make[1]: Entering directory `/pub/gcc-3.2/obj1/gcj'
make[1]: Leaving directory `/pub/gcc-3.2/obj1/gcj'
Making all in include
make[1]: Entering directory `/pub/gcc-3.2/obj1/include'
make[1]: Leaving directory `/pub/gcc-3.2/obj1/include'
make[1]: Entering directory `/pub/gcc-3.2/obj1'
/bin/sh ./libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I../libjava -I./include -I./gcj -I../libjava -Iinclude -I../libjava/include -I../libjava/../boehm-gc/include -I../libjava/libltdl -I../libjava/libltdl -I../libjava/.././libjava/../gcc -I../libjava/../zlib -I../libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -DPREFIX="\"/usr/local\"" -g -O2 -c ../libjava/jni.cc
c++ -DHAVE_CONFIG_H -I. -I../libjava -I./include -I./gcj -I../libjava -Iinclude -I../libjava/include -I../libjava/../boehm-gc/include -I../libjava/libltdl -I../libjava/libltdl -I../libjava/.././libjava/../gcc -I../libjava/../zlib -I../libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/local\" -g -O2 -Wp,-MD,.deps/jni.pp -c ../libjava/jni.cc -o jni.o
In file included from ../libjava/jni.cc:45:
../libjava/include/java-interp.h:25:17: ffi.h: No such file or directory
In file included from ../libjava/jni.cc:45:
../libjava/include/java-interp.h:120: `ffi_cif' was not declared in this scope
>How-To-Repeat:
1. Get GCC3.2 source
2. Make gcc3.2 on sco
mkdir <gcc-3.2's root path> to hold the source
# cd <gcc-3.2's root path>
# gzip -d *.gz
# tar xfv *.tar
# cd gcc-3.2
# mkdir obj
# cd obj
# ../libiberty/configure
# cp *.a ../libiberty/
# ../zlib/configure
# cp *.a ../zlib/
# ../gcc/configure --enable-threads --enable-shared --enable-languages=c,c++,java --enable-libgcj
it's recommended we use --enable-threads=posix, but actually it'll report lots of errors on SCO.
# make bootstrap
When error says:
In file included from ../gcc/rtl.c:142:
../gcc/machmode.def:77: `BITS_PER_UNIT' undeclared here (not in a function)"
follow "http://gcc.gnu.org/ml/gcc-bugs/2002-06/msg00238.html"
(I got the tip from Ben who told me to changed one line in gcc-3.2/gcc/config.gcc, line 1408
from [tm_file=i386/sco5.h] to [tm_file="i386/i386.h i386/att.h i386/sco5.h"], thanks for his help!)
# ../gcc/configure --enable-threads=posix --enable-shared --enable-languages=c,c++,java --enable-libgcj
Then I use UltraEdit to alter configure.in in the gcc-3.2's root path, get rid of all those ${libgcj} tokens.
# make bootstrap
This will take a long time...
# make
# make install
Now it seemed all ok, but don't get happy too early,
1. for g++, when you use destructor "delete()", it'll err.
I have to:
# cd obj
# ../libstdc++-v3/configure
says : "/bin/sh: ../libstdc++-v3/../install-sh: not found", it seems that the path has something wrong,
So I changed it to the absolute path like this: in the generated Makefile, line 50
INSTALL = ../libstdc++-v3/../install-sh -c =>INSTALL = /pub/gcc-3.2/install-sh -c
# make
# make install
After these steps, g++'s bug is fixed
2. for java, when I follow the instruction to adjust my environment
I found the libgcj was NOT generated, because when test the simple java code,
# gcj --main=HelloWorld -o HelloWorld HelloWorld.java
says: "gcj: libgcj.spec: No such file or directory"
Then I tried to build libgcj myself.
First fix the bug in libjava/configure.in, line 4079:
if test $ac_cv_header_locale_h = yes; then => if test "$ac_cv_header_locale_h" = yes; then
# md obj1
# cd obj1
# ../libjava/configure
# make
bug 1:
gcj -B/pub/gcc-3.2/libjava/obj/ --encoding=UTF-8 -C -g -classpath '' -bootclasspath /pub/gcc-3.2/libjava/obj:.. \
-d /pub/gcc-3.2/libjava/obj ../java/lang/Class.java
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
iconv_open cannot open conversion file /usr/lib/nls/conv/UTF-8_UCS-2
.....
bug 2:
make[1]: Leaving directory `/pub/gcc-3.2/obj1'
Making all in libltdl
make[1]: Entering directory `/pub/gcc-3.2/obj1/libltdl'
make[1]: Leaving directory `/pub/gcc-3.2/obj1/libltdl'
Making all in testsuite
make[1]: Entering directory `/pub/gcc-3.2/obj1/testsuite'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/pub/gcc-3.2/obj1/testsuite'
Making all in gcj
make[1]: Entering directory `/pub/gcc-3.2/obj1/gcj'
make[1]: Leaving directory `/pub/gcc-3.2/obj1/gcj'
Making all in include
make[1]: Entering directory `/pub/gcc-3.2/obj1/include'
make[1]: Leaving directory `/pub/gcc-3.2/obj1/include'
make[1]: Entering directory `/pub/gcc-3.2/obj1'
/bin/sh ./libtool --tag=CXX --mode=compile c++ -DHAVE_CONFIG_H -I. -I../libjava -I./include -I./gcj -I../libjava -Iinclude -I../libjava/include -I../libjava/../boehm-gc/include -I../libjava/libltdl -I../libjava/libltdl -I../libjava/.././libjava/../gcc -I../libjava/../zlib -I../libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -DPREFIX="\"/usr/local\"" -g -O2 -c ../libjava/jni.cc
c++ -DHAVE_CONFIG_H -I. -I../libjava -I./include -I./gcj -I../libjava -Iinclude -I../libjava/include -I../libjava/../boehm-gc/include -I../libjava/libltdl -I../libjava/libltdl -I../libjava/.././libjava/../gcc -I../libjava/../zlib -I../libjava/../libffi/include -I../libffi/include -fno-rtti -fnon-call-exceptions -fdollars-in-identifiers -D__NO_MATH_INLINES -ffloat-store -W -Wall -D_GNU_SOURCE -DPREFIX=\"/usr/local\" -g -O2 -Wp,-MD,.deps/jni.pp -c ../libjava/jni.cc -o jni.o
In file included from ../libjava/jni.cc:45:
../libjava/include/java-interp.h:25:17: ffi.h: No such file or directory
In file included from ../libjava/jni.cc:45:
../libjava/include/java-interp.h:120: `ffi_cif' was not declared in this scope
I still have some hopes in building libffi by myself, but when I use its configure, it finally says:
checking whether the C compiler (gcc -g -O2 -belf ) is a cross-compiler... no
checking whether we are using GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
configure: error: libffi has not been ported to i386-pc-sco3.2v5.0.5.
So I can't move forward in compiling GCJ on SCO any more.
Have GCJ group noticed that yet?
>Fix:
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the Gcc-bugs
mailing list