I
I
ipatin2016-02-25 08:55:31
linux
ipatin, 2016-02-25 08:55:31

Fatal error: jni.h: No such file or directory?

I'm trying to compile native MPI libraries from MPJ Express. The command sudo makegives an error:

[ 16%] Building C object CMakeFiles/nativempjdev.dir/mpjdev_natmpjdev_Comm.c.o
In file included from /usr/mpj/src/mpjdev/natmpjdev/lib/mpjdev_natmpjdev_Comm.c:37:0:
/usr/mpj/src/mpjdev/natmpjdev/lib/mpjdev_natmpjdev_Comm.h:2:17: fatal error: jni.h: No such file or directory
 #include <jni.h>
                 ^
compilation terminated.
make[2]: *** [CMakeFiles/nativempjdev.dir/mpjdev_natmpjdev_Comm.c.o] Error 1
make[1]: *** [CMakeFiles/nativempjdev.dir/all] Error 2
make: *** [all] Error 2

JDK installed. I tried to connect the path with the command sudo make -I /usr/lib/jvm/jdk1.8.0_73/include/
, the same error occurs.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Anton Ulanov, 2016-02-25
@antonsr98

-I$(JAVA_HOME)/include -I$(JAVA_HOME)/include/linux

D
Danila, 2016-02-25
@Ke1eth

Only not sudo make -I /usr/lib/jvm/jdk1.8.0_73/include/
but gcc -I /usr/lib/jvm/jdk1.8.0_73/include/
since this is a directive for the compiler, and therefore, in general, it would be written in the make file in the CC_OPT section.
For example, like this

CC_OPT   = -shared -DJNI_PACKAGE -I/usr/lib/jvm/jdk1.8.0_73/include -I/usr/lib/jvm/jdk1.8.0_73/include/linux

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question