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]

[patch] jni.h not found during libjava testsuite runs



The current CVS trunk gives these failures on i686-linux for me:
Running /cvs/gcc/libjava/testsuite/libjava.jni/jni.exp ...
FAIL: calls.c compilation
FAIL: final_method.c compilation
FAIL: findclass.c compilation
FAIL: invoke.c compilation
FAIL: noclass.c compilation
FAIL: overload.c compilation
FAIL: register.c compilation
FAIL: simple_int.c compilation
FAIL: throwit.c compilation
FAIL: virtual.c compilation
FAIL: martin.c compilation
FAIL: field.c compilation

Looking at the first two failure, I noticed that jni.h could not be
found:
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Executing on host: /builds/gcc/gcc-3.1-devel/gcc/xgcc -B/builds/gcc/gcc-3.1-devel/gcc/ /cvs/gcc/libjava/testsuite/libjava.jni/calls.c  -shared -fPIC -I. -I/cvs/gcc/libjava/testsuite/../../include  -lm   -o libcalls.so    (timeout = 300)
In file included from /cvs/gcc/libjava/testsuite/libjava.jni/calls.c:2:
calls.h:6:17: jni.h: No such file or directory
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Running the command by hand with gcc -v shows:
#include "..." search starts here:
#include <...> search starts here:
 .
 /cvs/gcc/include
 /builds/gcc/gcc-3.1-devel/gcc/include
 /usr/local/include
 /opt/gcc-3.1-devel/lib/gcc-lib/i686-pc-linux-gnu/3.1/include
 /usr/include
End of search list.

The appended patch fixes the problem.  Ok to commit?

Andreas

2001-06-24  Andreas Jaeger  <aj@suse.de>

	* libjava.jni/jni.exp (gcj_jni_compile_c_to_so): Fix path for
	jni.h.

============================================================
Index: libjava/testsuite/libjava.jni/jni.exp
--- libjava/testsuite/libjava.jni/jni.exp	2001/06/14 17:46:53	1.1
+++ libjava/testsuite/libjava.jni/jni.exp	2001/06/24 19:33:04
@@ -13,7 +13,7 @@
   # Find the generated header.
   lappend options "additional_flags=-I."
   # Find jni.h.
-  lappend options "additional_flags=-I$srcdir/../../include"
+  lappend options "additional_flags=-I$srcdir/../include"
 
   set x [prune_warnings [target_compile $file $soname executable $options]]
   if {$x != ""} {

-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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