Open danielwsutton opened 4 years ago
If you remove the line '-ljli'
from binding.gyp
this build issue is resolved.
Or if you downgrade jdk to 1.8.
I search for a long time to figure out what jli is for, but couldn't find anything...
I forked, with this change : https://github.com/danielwsutton/node-java/commit/91192d13e6961493eabb96526a9ccc5118005492
However, now i'm running into another error when i go to actually import and use node-java,
dyld: lazy symbol binding failed: Symbol not found: _JNI_CreateJavaVM
based on that i think the '-ljli'
is required... so really the only solution i have found that works is downgrading jdx to 1.8....
on JDK 1.8 JRE exist > /Library/Java/JavaVirtualMachines/jdk1.8.0_231.jdk/Contents/Home/jre/lib/jli on JDK 12 it does not... and apparently there never will....
so what exactly can we do here if we want to use node-java on JDK 12+ ?
similar issue, i'll take a look > https://github.com/joeferner/node-java/issues/497
lib_dir="${jre_dir}/jli"
I forked this change, https://github.com/danielwsutton/node-java/commit/1e30ba786a6965fd8df2b643a5d962b06891d4fb
From:
lib_dir="${jre_dir}/jli"
To:
if [[ -f ${jre_dir}/jli/libjli.dylib ]]; then lib_dir="${jre_dir}"/jli; else lib_dir="${jre_dir}"; fi
So far it seems to be working,
I testing on adoptopenjdk8 and adoptopenjdk12 , your mileage may vary,
I did run into a new issue, but can't seem to repro it locally, only when running it on aws,
CXX(target) Release/obj.target/nodejavabridge_bindings/src/utils.o
../src/utils.cpp:488:16: error: no member named 'GetBackingStore' in 'v8::ArrayBuffer'
memcpy(ab->GetBackingStore()->Data(), elems, length);
~~ ^
So might not be 100% yet
The above issue with no member named 'GetBackingStore' was resolved by using node 14.8.0
It seems like when you switch to a new version of Java, it forces you into a newer version of Node as well.