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

fatal error: jni.h: No such file or directory #41

Open
Alessandro-Barbieri opened this issue Nov 1, 2019 · 1 comment
Open

fatal error: jni.h: No such file or directory #41

Alessandro-Barbieri opened this issue Nov 1, 2019 · 1 comment

Comments

@Alessandro-Barbieri
Copy link

configured with --with-java-extensions
my jni.h is in /usr/lib64/icedtea8/include/

Making all in java
make[3]: Entering directory '/var/tmp/portage/sys-cluster/genders-9999/work/genders-9999/src/extensions/java'
/bin/bash ../../../libtool  --tag=CC   --mode=compile gcc -DHAVE_CONFIG_H -I. -I../../../config     -Os -pipe -march=native -mfpmath=sse -fopenmp -pthread -fno-unroll-all-loops -fno-unroll-loops -fno-peel-loops -Wformat -Wformat-security -Warray-bounds -Wclobbered -Wvolatile-register-var -Wdate-time -Os -pipe -march=native -mfpmath=sse -fopenmp -pthread -fno-unroll-all-loops -fno-unroll-loops -fno-peel-loops -Wformat -Wformat-security -Warray-bounds -Wclobbered -Wvolatile-register-var -Wdate-time -floop-interchange -ftree-loop-distribute-patterns -fpredictive-commoning -ftree-loop-distribution -fsplit-paths -ftree-vectorize -ftree-partial-pre -fgcse-after-reload -fivopts -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -Wl,-O1 -Wl,--as-needed -Wl,-fuse-ld=gold -lpthread -lgomp -c -o Gendersjni.lo `test -f 'src/Gendersjni.c' || echo './'`src/Gendersjni.c
libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I../../../config -Os -pipe -march=native -mfpmath=sse -fopenmp -pthread -fno-unroll-all-loops -fno-unroll-loops -fno-peel-loops -Wformat -Wformat-security -Warray-bounds -Wclobbered -Wvolatile-register-var -Wdate-time -Os -pipe -march=native -mfpmath=sse -fopenmp -pthread -fno-unroll-all-loops -fno-unroll-loops -fno-peel-loops -Wformat -Wformat-security -Warray-bounds -Wclobbered -Wvolatile-register-var -Wdate-time -floop-interchange -ftree-loop-distribute-patterns -fpredictive-commoning -ftree-loop-distribution -fsplit-paths -ftree-vectorize -ftree-partial-pre -fgcse-after-reload -fivopts -Wimplicit-function-declaration -Wno-error=implicit-function-declaration -Wl,-O1 -Wl,--as-needed -Wl,-fuse-ld=gold -lpthread -lgomp -c src/Gendersjni.c  -fPIC -DPIC -o .libs/Gendersjni.o
src/Gendersjni.c:1:10: fatal error: jni.h: No such file or directory
    1 | #include <jni.h>
      |          ^~~~~~~
compilation terminated.
make[3]: *** [Makefile:497: Gendersjni.lo] Error 1
make[3]: Leaving directory '/var/tmp/portage/sys-cluster/genders-9999/work/genders-9999/src/extensions/java'
make[2]: *** [Makefile:380: all-recursive] Error 1
make[2]: Leaving directory '/var/tmp/portage/sys-cluster/genders-9999/work/genders-9999/src/extensions'
make[1]: *** [Makefile:380: all-recursive] Error 1
make[1]: Leaving directory '/var/tmp/portage/sys-cluster/genders-9999/work/genders-9999/src'
make: *** [Makefile:439: all-recursive] Error 1
@chu11
Copy link
Member

chu11 commented Nov 1, 2019

Normally for headers in non-standard locations, you have to set CPPFLAGS, did you try that?

  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
              you have headers in a nonstandard directory <include dir>

You have to set LDFLAGS too for wherever your libs are.

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