You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running current release on MacOS. I want to get java interface but ./configure showed jni headers not found and skipped build java interface.
checking for javac... javac
checking if javac works... yes
checking if javac supports -h... yes
checking for javac... /usr/bin/javac
checking jni headers... none
configure: No JNI header directory. Disabling build of Java interface.
checking whether the linear solver loader should be used... yes
checking for dlopen in -ldl... yes
I confirmed that jni.h in the path /Users/bill/Library/Java/JavaVirtualMachines/openjdk-16.0.2/Contents/Home/include and tried to add CPPFLAGS in ./configure
I have some faint memory of problems with the Java macros on recent macOS versions because of the version number changing from 10.x to 11.y. It's probably mentioned somewhere in the autoconf-archive bugtracking system.
macos_version=$(sw_vers -productVersion | sed -n -e 's/^[0-9]*.\([0-9]*\).[0-9]*/\1/p')
gives macos_version=0 on macOS 11.0.z, so that it goes into the wrong branch in the following if. Try hardcoding macos_version=11 at this line and see if that helps.
configure only checks here for the presence of jni.h in some locations relative to the Java installation, but doesn't use compiler search paths as you would influence with CPPFLAGS.
svigerske
added a commit
to coin-or-tools/BuildTools
that referenced
this issue
Oct 8, 2021
Running current release on MacOS. I want to get java interface but ./configure showed jni headers not found and skipped build java interface.
checking for javac... javac
checking if javac works... yes
checking if javac supports -h... yes
checking for javac... /usr/bin/javac
checking jni headers... none
configure: No JNI header directory. Disabling build of Java interface.
checking whether the linear solver loader should be used... yes
checking for dlopen in -ldl... yes
I confirmed that jni.h in the path /Users/bill/Library/Java/JavaVirtualMachines/openjdk-16.0.2/Contents/Home/include and tried to add CPPFLAGS in ./configure
./configure CPPFLAGS=-I/Users/bill/Library/Java/JavaVirtualMachines/openjdk-16.0.2/Contents/Home/include
but still get the same error and skipped java interface building
The text was updated successfully, but these errors were encountered: