This is the mail archive of the java-patches@gcc.gnu.org mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Patch: Run JNI tests using interpreter


Hi Bryce,

  There's a problem with this patch:
--------------------------------- 8< -----------------------------------
Executing on host: /home/ranmath/src/gcc/build/i686-pc-linux-gnu/libjava/testsuite/../libtool --silent --tag=GCJ --mode=link /home/ranmath/src/gcc/build/gcc/gcj -B/home/ranmath/src/gcc/build/gcc/ --encoding=UTF-8 -B/home/ranmath/src/gcc/build/i686-pc-linux-gnu//libjava/ /home/ranmath/src/gcc/gcc-20040507/libjava/testsuite/libjava.jni/cxxtest.java   -no-install -fjni -L. -lcxxtest --main=cxxtest -g  -L/home/ranmath/src/gcc/build/i686-pc-linux-gnu//libjava/.libs -lm   -o cxxtest    (timeout = 300)
/usr/bin/ld: warning: libstdc++.so.6, needed by /home/ranmath/src/gcc/build/i686-pc-linux-gnu/libjava/testsuite/libcxxtest.so, not found (try using -rpath or -rpath-link)
/home/ranmath/src/gcc/build/i686-pc-linux-gnu/libjava/testsuite/libcxxtest.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'
collect2: ld returned 1 exit status
compiler exited with status 1
output is:
/usr/bin/ld: warning: libstdc++.so.6, needed by /home/ranmath/src/gcc/build/i686-pc-linux-gnu/libjava/testsuite/libcxxtest.so, not found (try using -rpath or -rpath-link)
/home/ranmath/src/gcc/build/i686-pc-linux-gnu/libjava/testsuite/libcxxtest.so: undefined reference to `__gxx_personality_v0@CXXABI_1.3'
collect2: ld returned 1 exit status

FAIL: linking cxxtest
--------------------------------- 8< -----------------------------------

You must also remove the additional "-L. -l$main" bit in
gcj_jni_test_one(). Only then do I see a proper JNI tests
run:

--------------------------------- 8< -----------------------------------
Index: jni.exp
===================================================================
--- jni.exp     2004-05-07 11:44:25.000000000 +0530
+++ jni.exp     2004-05-07 11:47:04.000000000 +0530
@@ -137,9 +137,7 @@ proc gcj_jni_test_one {file} {
     return 0
   }

-  # We use -l$main because the .so is named the same as the main
-  # program.
-  set args [list "additional_flags=-fjni -L. -l$main"]
+  set args [list "additional_flags=-fjni"]
   if {! [gcj_link $main $main $file $args]} {
     # FIXME
     return 0
--------------------------------- 8< -----------------------------------

My binutils version is 2.14.90.0.4 (on Red Hat Enterprise Linux 3).

Ranjit.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]