Jpy will not build on Mac OSX if the installed JDK has a libexec
directory and not a lib
directory
#118
Labels
bug
Something isn't working
I am attempting to install jpy into a python 3.12 development environment on Mac OSX M1. As is standard,
brew
is used to install most dependencies.jenv
is used to switch between JDKs -- including switchingJAVA_HOME
.Case 1 --
zulu64-21.0.1
JDK (BUILD WORKS)Here the Zulu JDK was installed from https://www.azul.com/downloads/?package=jdk#zulu.
The directory structure of Zulu is:
Note that there is a
lib
directory and nolibexec
directory.(Run these lines one at a time so that env vars get set right)
deactivate jenv global zulu64-21.0.1 rm -rf ./venv_zulu python3.12 -m venv ./venv_zulu source ./venv_zulu/bin/activate pip cache purge pip install jpy
It works:
Case 2 -- OpenJDK@17 (BUILD FAILS)
Here OpenJDK@17 is installed using
brew install openjdk@17
.The directory structure of OpenJDK is:
Note that there is a
libexec
directory and nolib
directory.(Run these lines one at a time so that env vars get set right)
deactivate jenv global 17.0.9 rm -rf ./venv_ojdk python3.12 -m venv ./venv_ojdk source ./venv_ojdk/bin/activate pip cache purge pip install jpy
It fails:
In this case when jpy tries to build against OpenJDK, it claims
JAVA_HOME
is not set.Soruce of the problem
The error message is coming from
jpy/setup.py
Line 104 in 14b19a7
jdk_home_dir
is None. This is coming fromjpy/jpyutil.py
Line 143 in 14b19a7
lib
dir without also checking for alibexec
dir.The text was updated successfully, but these errors were encountered: