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

Could NOT find JNI #220

Open
brmagalis opened this issue May 21, 2024 · 2 comments
Open

Could NOT find JNI #220

brmagalis opened this issue May 21, 2024 · 2 comments

Comments

@brmagalis
Copy link

I am attempting to install Beagle on a Mac M3 using source install, and I am receiving the following error:

(base) brittanyrifemagalis@MacBook-Pro ~ % git clone --depth=1 https://github.com/beagle-dev/beagle-lib.git
Cloning into 'beagle-lib'...
remote: Enumerating objects: 289, done.
remote: Counting objects: 100% (289/289), done.
remote: Compressing objects: 100% (240/240), done.
remote: Total 289 (delta 91), reused 137 (delta 36), pack-reused 0
Receiving objects: 100% (289/289), 2.80 MiB | 9.47 MiB/s, done.
Resolving deltas: 100% (91/91), done.
(base) brittanyrifemagalis@MacBook-Pro ~ % cd beagle-lib
(base) brittanyrifemagalis@MacBook-Pro beagle-lib % mkdir build
(base) brittanyrifemagalis@MacBook-Pro beagle-lib % cd build
(base) brittanyrifemagalis@MacBook-Pro build % cmake ..
-- The C compiler identification is AppleClang 15.0.0.15000309
-- The CXX compiler identification is AppleClang 15.0.0.15000309
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /Library/Developer/CommandLineTools/usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /Library/Developer/CommandLineTools/usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- BEAGLE_VERSION = 4.0.1
-- BEAGLE_PLUGIN_VERSION = 40
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT)
CMake Error at CMakeLists.txt:76 (message):
No JNI includes and libraries found

@xji3
Copy link
Member

xji3 commented May 21, 2024

@brmagalis Do you have JDK installed on your computer? You could setup environment variable JAVA_HOME to the JDK home. I am using azul zulu for arm build (https://www.azul.com/downloads/?package=jdk#zulu) and I set my JAVA_HOME by export JAVA_HOME=/Library/Java/JavaVirtualMachines/zulu-20.jdk/contents/Home. It seems that the newest version is 22 now, so you probably need to double check and edit the path to fit yours.

@brmagalis
Copy link
Author

So, I installed jdk and set the JAVA_HOME variable, but I am still having the same issue:

(base) brittanyrifemagalis@MacBook-Pro build % cmake ..
-- BEAGLE_VERSION = 4.0.1
-- BEAGLE_PLUGIN_VERSION = 40
xcode-select: error: tool 'xcodebuild' requires Xcode, but active developer directory '/Library/Developer/CommandLineTools' is a command line tools instance
-- Could NOT find JNI (missing: JAVA_INCLUDE_PATH JAVA_INCLUDE_PATH2 AWT)
CMake Error at CMakeLists.txt:76 (message):
No JNI includes and libraries found

-- Configuring incomplete, errors occurred!
(base) brittanyrifemagalis@MacBook-Pro build % echo $JAVA_HOME
/Library/Java/JavaVirtualMachines/jdk-22.jdk/Contents/Home

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