chaos / genders

Genders is a static cluster configuration database used for cluster configuration management. It is used by a variety of tools and scripts for management of large clusters.
GNU General Public License v2.0
34 stars 12 forks source link

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

Open Alessandro-Barbieri opened 5 years ago

Alessandro-Barbieri commented 5 years ago

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 commented 5 years ago

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.