Installation Fact++: fatal error: jni.h: No such file or directory

130 views Asked by At

I'm installing the FACT++ library, but when I do the make I get this error:

cc1plus: warning: /usr/lib/jvm/java-11-openjdk-amd64/include/jni.h: not a directory
    In file included from Axioms.cpp:21:0:
    uk_ac_manchester_cs_factplusplus_FaCTPlusPlus.h:2:10: fatal error: jni.h: No such file or directory
     #include <jni.h>
          ^~~~~~~

when i locate jni.h it is here:

/usr/include/x86_64-linux-gnu/libavcodec/jni.h
/usr/lib/jvm/java-11-openjdk-amd64/include/jni.h

In my Makefile I put:

# global optimisation options
GCC_OPT_OPT = -finline-limit=1200 -ffast-math -W -Wall -Wextra -O3 -fomit-frame-pointer -fPIC

# GCC 3.3 optimisation options that are not included in -O3
GCC_33_OPT = -ftracer -fgcse-sm
# GCC 3.4 optimisation options that are not included in -O3
GCC_34_OPT = $(GCC_33_OPT) -fgcse-las -fpeel-loops
# GCC 4.0 optimisation options that are not included in -O3
GCC_40_OPT = $(GCC_34_OPT) -fmodulo-sched -ftree-loop-linear -ftree-loop-im -fweb\
 -ftree-loop-ivcanon -fivopts -ftree-vectorize -fvariable-expansion-in-unroller
# GCC 4.1 optimisation options that are not included in -O3
GCC_41_OPT = $(GCC_40_OPT) -funsafe-loop-optimizations
# GCC 4.2 optimisation options that are not included in -O3
GCC_42_OPT = $(GCC_41_OPT)
# GCC 4.3 optimisation options that are not included in -O3
GCC_43_OPT = $(GCC_42_OPT) -fmodulo-sched-allow-regmoves -fipa-cp -fvect-cost-model
# GCC 4.4 optimisation options that are not included in -O3
GCC_44_OPT = $(GCC_43_OPT)

# define architecture; it will affect file extentions, dynamic flags.
# now LINUX, WINDOWS(untested), MACOSX are supported
OS = LINUX

CC_OPT = -I/usr/lib/jvm/java-11-openjdk-amd64/include/jni.h -I/usr/lib/jvm

# ALL_DEF is an external defines
GENERAL_DEFINES = $(GCC_OPT_OPT) $(GCC_42_OPT) $(ALL_DEF) $(CC_OPT)

What have I missed?

1

There are 1 answers

0
Dmitry Tsarkov On

-I flag requires a directory, not a file, so your addition should be

CC_OPT = -I/usr/lib/jvm/java-11-openjdk-amd64/include -I/usr/lib/jvm