PATCH: GCC 3.2 suddenly fails every java test, CLASSPATH wrong
H. J. Lu
hjl@lucon.org
Thu Aug 15 12:14:00 GMT 2002
On Thu, Aug 15, 2002 at 08:52:45PM +0200, Mark Wielaard wrote:
> Hi,
>
> On Thu, 2002-08-15 at 17:05, H. J. Lu wrote:
> > On Thu, Aug 15, 2002 at 11:01:29AM -0400, Kaveh R. Ghazi wrote:
> > > All of a sudden, every test in the java testsuite is failing in GCC-3.2:
> > > http://gcc.gnu.org/ml/gcc-testresults/2002-08/msg00486.html
> > >
> > > It's not just me:
> > > http://gcc.gnu.org/ml/gcc-testresults/2002-08/msg00462.html
> > >
> > > In the logfile, all of the failures look like this:
> > >
> > > > Can't find default package `java.lang'. Check the CLASSPATH
> > > > environment variable and the access to the archives
> > > > 1 error
> > >
> > > [...]
> > I was wondering the same thing. This works
> >
> > http://gcc.gnu.org/ml/gcc-testresults/2002-08/msg00457.html
> >
> > because I have gcc 3.2 installed on that machine. All my other machines
> > failed. I thought it might be my new binutils :-). It has to be fixed.
>
> I just tested the official gcc-3.2.tar.gz release from ftp.gnu.org and
> it works for me.
>
> === libjava Summary ===
>
> # of expected passes 2075
> # of expected failures 18
> # of untested testcases 14
>
> See: http://gcc.gnu.org/ml/gcc-testresults/2002-08/msg00489.html
>
> This was on a i686-pc-linux-gnu machine running:
>
> Debian GNU/Linux testing/unstable
> Linux 2.4.18
> binutils Version: 2.12.90.0.15-1
> glibc Version: 2.2.5-13
>
> With the following configure flags:
> --enable-clocale=gnu --enable-shared --enable-threads=posix
> --enable-languages=c++,java --prefix=/usr/local/gcc32
>
> I know that at least for the CVS HEAD (3.3) you will need the above
> binutils on powerpc-unknown-linux-gnu and maybe other architectures.
>
> One thing that I always do before running 'make check -k' is a 'make
> install' because in the past the tests sometimes picked up the wrong
> libgcj.jar to test against. Maybe that is still needed. If you haven't
> done a 'make install' yet could you do that and then run make check in
> the libjava subdir? Otherwise try updating your binutils to 2.12.90.0.15
> or higher and rebuild everything with that.
"make install" shouldn't be required. It is a bug. This one works for
me.
H.J.
-------------- next part --------------
2002-08-15 H.J. Lu <hjl@gnu.org>
* lib/libjava.exp (gcc_version): Removed.
(libgcj_jar): New.
(libjava_init): Set libgcj_jar with find.
(libjava_arguments): Use libgcj_jar.
--- libjava/testsuite/lib/libjava.exp.release Sun May 19 21:51:07 2002
+++ libjava/testsuite/lib/libjava.exp Thu Aug 15 12:09:04 2002
@@ -112,7 +112,7 @@ proc libjava_init { args } {
global TOOL_EXECUTABLE
global original_ld_library_path
global env objdir
- global env gcc_version
+ global env libgcj_jar
global tool_root_dir
global libjava_libgcc_s_path
@@ -130,10 +130,9 @@ proc libjava_init { args } {
}
}
- # Determine the version so we can find the libgcj jar file.
- set text [eval exec "$GCJ_UNDER_TEST --version 2>@ stdout"]
- regexp -- "gcj \[^ \]+ (\[^ \]+) .*" $text ignore gcc_version
- verbose "jar file is libgcj-$gcc_version.jar"
+ # Find the libgcj jar file.
+ set libgcj_jar [eval exec "find $objdir/../ -name \"libgcj-*.jar\" 2>@ stdout"]
+ verbose "jar file is $libgcj_jar"
# FIXME: This finds libgcj.spec for the default multilib.
# If thread models differ between multilibs, this has to be moved
@@ -271,7 +270,7 @@ proc libjava_arguments {{mode compile}}
global runtests
global env
global tool_root_dir
- global gcc_version
+ global libgcj_jar
global libjava_libgcc_s_path
if [info exists LIBJAVA] {
@@ -337,9 +336,9 @@ proc libjava_arguments {{mode compile}}
verbose "LD_LIBRARY_PATH = $env(LD_LIBRARY_PATH)"
# Set the CLASSPATH environment variable
- verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$objdir/../libgcj-$gcc_version.jar"
+ verbose "CLASSPATH is .:$srcdir/$subdir:$objdir:$libgcj_jar"
global env
- set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$objdir/../libgcj-$gcc_version.jar"
+ set env(CLASSPATH) ".:$srcdir/$subdir:$objdir:$libgcj_jar"
if {$mode == "link"} {
global wrapper_file wrap_compile_flags;
More information about the Java
mailing list