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

Getting error for a native dependency in DL4J #659

Open
LobsterMan123 opened this issue Mar 19, 2023 · 7 comments
Open

Getting error for a native dependency in DL4J #659

LobsterMan123 opened this issue Mar 19, 2023 · 7 comments

Comments

@LobsterMan123
Copy link

First of all, I'd like to apologize if this help request is misplaced, but I would like to ask HGuillemet a question on something he helped another user with and he was knowledgeable about the issue. I unfortunately did not know how else to reach out and establish contact.

My issue is: I am trying to code with DL4J on Termux, a Linux emulator for Android and I was told that this is possible. When I compile my sample project with: mvn -Djavacpp.platform=android-arm clean package
it compiles nicely with no errors & builds my uber jar. However, it doesn't run, I instead get the error: "java.lang.UnsatisfiedLinkError: Could not find jniopenblas_nolapack in class, module, and library paths."

I read one of your troubleshooting responses to the above error and there was mention of including the line "org.bytedeco.javacv.platform" (I suppose including it in the compiling/jar-building process) and that everything would be packaged correctly and be found (no more error). I therefore modified my build/compile command to: mvn -DargLine="org.bytedeco.javacpp.pathsfirst=true -Djavacpp.platform=android-arm org.bytedeco.javacv.platform" -Dorg.bytedeco.javacpp.pathsfirst=true -Djavacpp.platform=android-arm clean package

but now it gives me a new error of "The forked VM terminated without saying properly goodbye. VM crash or System.exit called ?"

My pom file is found at: https://github.com/LobsterMan123/startingDL4J/blob/main/pom.xml

Would you please help me troubleshoot this? I want my project to compile with no errors and also run and not crash because dependencies cannot be found. Am I missing a dependency? Is my compile/build command wrong (i.e. not including the necessary arguments)?

Thank you and again I apologize if this message is misplaced but I would very much appreciate your help.

LM

@saudet
Copy link
Member

saudet commented Mar 19, 2023

It just sounds like you're not including all the JAR files in the class path. You'll need to make sure to include all the JAR files in your class path.

@LobsterMan123
Copy link
Author

LobsterMan123 commented Mar 19, 2023

Ok, but I don't have any "loose" standalone jar files in my possession. The way I have structured my pom file seen in the provided link, I have always obtained an uber jar file with everything needed in said uber jar. Having this prepared uber jar, I don't know how to specify jar files it's supposed to have inside of it. Should I obtain a standalone jar file for this "jniopenblas_nolapack" from someplace outside of the maven repository? If so, where do I get it from so that I can put it manually in the classpath as you describe? Thanks.

LM

PS: sorry if my questions are elementary but I've never had a run failure happen like this to me before

@saudet
Copy link
Member

saudet commented Mar 19, 2023

There might be some things that need to be adjusted to run with Java SE on Android 🤔

In any case, contributions are welcome! Please open a pull request if you figure out the issue.

@LobsterMan123
Copy link
Author

I'll definitely submit a pull request if I can identify the root issue.

LM

@saudet
Copy link
Member

saudet commented Mar 21, 2023

Please set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console.

@LobsterMan123
Copy link
Author

I resolved the "forked VM" crashing error. It turns out there was a small typo in the docs that omitted a "-D" in the "-DargLine=" argument enclosed in the double quotes. My project is building good, but the running is still resulting in an error that jniopenblas cannot be found. Thanks.

LM

@saudet
Copy link
Member

saudet commented Mar 21, 2023

Please set the "org.bytedeco.javacpp.logger.debug" system property to "true" to get more information on the console.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants