Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make fail:can not find jni.h #1

Open
yueguangxuanyuan opened this issue Mar 14, 2016 · 6 comments
Open

make fail:can not find jni.h #1

yueguangxuanyuan opened this issue Mar 14, 2016 · 6 comments

Comments

@yueguangxuanyuan
Copy link

i'm sure that i have built java well. i can find jni.h when i use cmd "locate jni.h"
hope you can help me

@yueguangxuanyuan
Copy link
Author

In file included from ccfx/CCFinderXLib/CCFinderXLib.cpp:32:0:
ccfx/CCFinderXLib/../../GemX/ccfinderx_CCFinderX.h:2:17: fatal error: jni.h: No such file or directory
#include <jni.h>
^
compilation terminated.
make: *** [ccfx/CCFinderXLib/ccfx_CCFinderXLib_lib_CCFinderXLib_la-CCFinderXLib.lo] 错误 1

@gpoo
Copy link
Owner

gpoo commented Mar 14, 2016

Where is jni.h located in your system?

@gpoo
Copy link
Owner

gpoo commented Mar 14, 2016

Please, paste the output of

$ cd source/of/ccfinderx $ ./configure

There is a rule to check where JNI is located, and it should add it to the compiler flags.

@yueguangxuanyuan
Copy link
Author

sorry for bothering you. i am a newer in using these tools.(autoconf ...)

locate jni.h
/usr/lib/jvm/java-6-oracle/include/jni.h
/usr/lib/jvm/java-7-openjdk-amd64/include/jni.h
/usr/lib/jvm/java-7-oracle/include/jni.h

i have already set up java environment

then i check the result of ./configure .there are few mistakes
./configure: line 15304: AX_BOOST_BASE: command not found
./configure: line 15307: AX_JNI_INCLUDE_DIR: command not found

it's in ubuntu14.04
i install boost by apt-get (libboost-all-dev)

@gpoo
Copy link
Owner

gpoo commented Mar 17, 2016

For the macros AX_JNI_INCLUDE_DIR and AX_BOOST_BASE you need to install the package:
autoconf-archive.

After that, and if configure is successful, you should be able to build ccfinderx.

@gpoo
Copy link
Owner

gpoo commented Mar 17, 2016

By the way, if you happen to have that package installed, you should run:

$ libtoolize
$ aclocal -I m4 --install
$ autoconf
$ automake --foreign --add-missing
$ ./configure
$ make

As per the instructions in the README.md file.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants