The Wayback Machine - https://web.archive.org/web/20220408061803/https://github.com/opencog/link-grammar/issues/524
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

Orcale JDK8 library loading config bug #524

Open
mosyp opened this issue Feb 23, 2017 · 1 comment
Open

Orcale JDK8 library loading config bug #524

mosyp opened this issue Feb 23, 2017 · 1 comment

Comments

@mosyp
Copy link
Contributor

@mosyp mosyp commented Feb 23, 2017

I'm using link-grammar-5.3.15.

This one didn't work for me:
https://github.com/opencog/link-grammar/blob/master/bindings/java/org/linkgrammar/LinkGrammar.java#L43
Even when I added /usr/local/lib to jvm props:

java.lang.UnsatisfiedLinkError: no liblink-grammar in java.library.path

I fixed it by replacing that line into:

System.load("/usr/local/lib/liblink-grammar-java.so");

Also, please not that in https://github.com/opencog/link-grammar/blob/master/bindings/java/org/linkgrammar/LinkGrammar.java#L43 jni is marked as link-grammar-java. However I checked my /usr/local/lib and found only liblink-grammar-java.so and other file with prefix liblink-...

UPD. I'm using ubuntu 16.04 and oracle jdk 8.

@linas
Copy link
Member

@linas linas commented Mar 14, 2017

Java usually handles the suffixes automatically -- .so for unix variants, or .dll for windows variants, or .dylib for MacOS variants ... including any of these suffixes explicitly would break compatibility with the different OS'es.

Is it possible that your version of oracle jdk is not correctly configured for Ubuntu? Perhaps there is some way to tell Java what suffixes should be searched for? Perhaps that search algorithm is missing or broken in jdk8? This code has been working fine on java 5 and java 6, dating back ten years now; the breakage is not the code, but some install/config issue.

@linas linas changed the title Java bindings Orcale JDK8 library loading config bug Jul 26, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
2 participants