need help to use jSMILE on ARM CPU

The engine.
Post Reply
mprovenzi
Posts: 2
Joined: Wed Oct 26, 2016 9:50 pm

need help to use jSMILE on ARM CPU

Post by mprovenzi »

Hello guys,

I want to implement a Bayesian Network with Java on my Raspberry Pi 3, which uses an ARMv8 64-bit processor (I am using a 32-bit image of Raspbian though). At first I wrote a code to try jSMILE library, but then came across this issue about the processor. In the line where I run

Code: Select all

Network BN = new Network();
it throws an exception:
java.lang.UnsatisfiedLinkError: lib/libjsmile.so: cannot open shared object file: No such file or directory (Possible cause: can't load IA 32-bit .so on a ARM-bit platform)
This means that your libjsmile.so was compiled in an Inter processor and can only run there, as far as I get it.

Searching for a solution, I came across the following post
http://support.bayesfusion.com/forum/vi ... .php?t=946

In there, the poster says he wants to run SMILE on an ARM Cortex v7 processor. Not exactly my case, as I am working with Java (and hence my interest relies on jSMILE) and on an ARMv8. Still, close enough, so if it's got any resolution it may be of some help.
At that time, jSMILE did not support ARM processors, but now, 4,5 years later, there might be some news regarding this issue.
The first reply, from a guy named Martjin, said he would contact Sumant (the original poster) via e-mail, and it was never again heard of either of them regarding this issue on the forum far as I could see.

I did try a few things on my own. I downloaded the file "smile_linux_x86_gcc_3_4_6.tar.gz", extracted the libsmile.a file and tried to regenerate the .so on the Raspberry running a

Code: Select all

gcc -shared -o libjsmile.so libsmile.a
command. I am not sure this makes much, or any, sense though. I am not exactly an expert on libraries. I then took the newly created libjsmile.so file and used it to replace the previous one. But now it seems that the JVM simply did not recognize it, for at the same line a different exception was thrown:
java.lang.UnsatisfiedLinkError: smile.Wrapper.nativeStaticInit()V
at smile.Wrapper.nativeStaticInit(Native Method)
at smile.Wrapper.<clinit>(Wrapper.java:36)
So my question is: is there any way I can get to use the jSMILE library on my Raspberry Pi? I really wish to use it, for it seemed to me to be the best option for my final year project.
I hope I have given the necessary information.
Any help will be much appreciated, thanks.
- MProvenzi
shooltz[BayesFusion]
Site Admin
Posts: 1417
Joined: Mon Nov 26, 2007 5:51 pm

Re: need help to use jSMILE on ARM CPU

Post by shooltz[BayesFusion] »

jSMILE is a Java wrapper for C++ library. You'll need a library compiled for Raspberry architecture (ARM). To compile a library for you we will need a virtual machine with Linux (Intel) and Raspberry Pi SDK installed. If you want to continue with SMILE, please prepare a VM and upload it to a location we can access.
mprovenzi
Posts: 2
Joined: Wed Oct 26, 2016 9:50 pm

Re: need help to use jSMILE on ARM CPU

Post by mprovenzi »

Thank you for your reply, shooltz. I am currently looking at other options and will get back in touch if need further help. Cheers.
Post Reply