Raspberry Pi / JNA

1,154 views
Skip to first unread message

Kustaa Nyholm

unread,
May 24, 2012, 3:03:42 AM5/24/12
to jna-...@googlegroups.com
Mark is trying to use my PureJavaComm on Raspberry PI and
JNA fails to load libjnidispatch.so from the jna jar file
I guess. So probably it is not supported or what?

br Kusti


On 5/24/12 08:17, Mark wrote:
> Hi,
>
> I'm looking for a serial access class for the Raspberry Pi. So far RxTx
> has problems and crashes so I was looking at you class. Problem I have
> here is I get the following error message:
>
> Exception in thread "main" java.lang.UnsatisfiedLinkError: jnidispatch
> (/com/sun/jna/linux-arm/libjnidispatch.so) not found in resource path
> at com.sun.jna.Native.loadNativeLibraryFromJar(Native.java:708)
> at com.sun.jna.Native.loadNativeLibrary(Native.java:685)
> at com.sun.jna.Native.<clinit>(Native.java:109)
> at jtermios.linux.JTermiosImpl.<clinit>(JTermiosImpl.java:60)
> at jtermios.JTermios.<clinit>(JTermios.java:278)
> at
>
>purejavacomm.CommPortIdentifier.getPortIdentifier(CommPortIdentifier.java:
>89)
>
> at
>robotDataServer.SerialInterface.openSerialPort(SerialInterface.java:66)
> at robotDataServer.RobotToServerCommsThread.<init>(ServerCore.java:66)
> at robotDataServer.ServerCore.main(ServerCore.java:279)


--
Kustaa Nyholm
Research Manager, Software
Research and Technology Division
PLANMECA OY
Asentajankatu 6
00880 HELSINKI
FINLAND

Please note our new telephone and fax numbers!
Tel: +358 20 7795 572 (direct)
Fax: +358 20 7795 676
GSM: +358 40 580 5193
e-mail: kustaa...@planmeca.com





Timothy Wall

unread,
May 24, 2012, 6:51:36 AM5/24/12
to jna-...@googlegroups.com
Most likely their storage setup somehow precludes writing to java.io.tmpdir, so libjnidispatch.so can't be loaded from a temporary location. The solution would be to manually install libjnidispatch.so in LD_LIBRARY_PATH (which is probably a good idea anyway on a system like this).

There's no obvious reason why the linux-arm port shouldn't work out of the box, although any tweaks they made to the fundamental behavior of the linux distro could possibly have an effect.

Kustaa Nyholm

unread,
May 24, 2012, 7:04:11 AM5/24/12
to jna-...@googlegroups.com
Thanks, I'll pass this on!




Sven Köhler

unread,
Aug 26, 2013, 5:46:04 AM8/26/13
to jna-...@googlegroups.com
Depending on what Linux distribution is running on the Raspberry Pi, it might very well be a armel vs. armhf issue.
I have not able to find out whether the arm binary shipped with JNA 4.0 is armel or armhf, but I believe it's armel.
Reply all
Reply to author
Forward
0 new messages