[SOLVED] Can not get JNA Native to work (and therefore also not MediaInfo)

Support for Synology NAS, QNAP NAS and other Embedded Linux systems
Post Reply
xIntenso
Posts: 23
Joined: 14 Jan 2018, 23:39

[SOLVED] Can not get JNA Native to work (and therefore also not MediaInfo)

Post by xIntenso » 22 Jul 2018, 14:02

After updating to the latest FileBot release, I also found out that there is finally a MediaInfo release for my platform (rtd1296/aarch64), yay!

However, after installing it, it still does not work. When I run the sysinfo script, I get the following result:

Code: Select all

filebot -script 'fn:sysinfo'

------------------------------------------

FileBot 4.8.2 (r5736)
JNA Native: java.lang.UnsatisfiedLinkError: Could not find JNA native support
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load aarch64 (64-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
Apache Commons VFS: [zip, rar]
Chromaprint: 1.4.3
ffprobe: 2.7.1
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-07-15 (r530)
Groovy: 2.5.0
JRE: Java(TM) SE Runtime Environment 1.8.0_181
JVM: 64-bit Java HotSpot(TM) 64-Bit Server VM
CPU/MEM: 4 Core / 435 MB Max Memory / 12 MB Used Memory
OS: Linux (aarch64)
HW: Linux [CENSORED] 4.4.59+ #23739 SMP Sat May 19 03:08:07 CST 2018 aarch64 GNU/Linux synology_rtd1296_ds218play
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
License: FileBot License [CENSORED] (Valid-Until: 2068-07-21)
Done ヾ(@⌒ー⌒@)ノ
------------------------------------------

[Process completed]
I have tried getting the JNA Native files from this source. I downloaded the linux-aarch64.jar file, extracted libjnidispatch.so from it, but no matter where I place it, the error remains unchanged.

Does anyone know how I can get JNA to work? The used device is a Synology DS218play, with DSM 6.2

Thanks in advance!
Last edited by xIntenso on 23 Jul 2018, 00:36, edited 1 time in total.

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Can not get JNA Native to work (and therefore also not MediaInfo)

Post by rednoah » 22 Jul 2018, 16:19

Interesting. It's now called aarch64 and not armv8 anymore? You can probably fix it yourself by renaming the lib/armv8 folder to match uname -m.

Where is the armv8 folder? find / -name armv8 can tell.


EDIT:

JNA should work out of the box with the next release.
:idea: Please read the FAQ and How to Request Help.

xIntenso
Posts: 23
Joined: 14 Jan 2018, 23:39

Re: Can not get JNA Native to work (and therefore also not MediaInfo)

Post by xIntenso » 22 Jul 2018, 19:50

I renamed the armv8 folder located in /volume1/@appstore/filebot/lib/ to aarch64, and voilà, it worked just like you said it would. :D

I was kind of confused as well by the machine being classified as AArch64, since this website maintaining a list of Synology architectures lists my CPU as ARMv8. Apparently AArch64 is a 64-bit subset of ARMv8-A, which seems to be the cause for this mixup.

Everything is working perfectly now though, and thank you for making it so I won't possibly have to adjust this every release. ;)

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SOLVED] Can not get JNA Native to work (and therefore also not MediaInfo)

Post by rednoah » 23 Jul 2018, 06:10

No worries, I'm not sure if armv8 was ever actually tested by anyone. I don't own a ARMv8 device myself, but my Raspberry Pi and QNAP NAS are both ARMv8 and report aarch64 arch. It's probably more of a convention that has established itself now in the Linux world.
:idea: Please read the FAQ and How to Request Help.

robwiel
Posts: 40
Joined: 18 Mar 2013, 22:41

Re: [SOLVED] Can not get JNA Native to work (and therefore also not MediaInfo)

Post by robwiel » 12 Dec 2018, 12:19

Hi, have very similar problem for 212+ synology. Testing 4.8.5 however JNA and MediaInfo/ffprobe wont work.

Code: Select all

[email protected]:/volume1/Files/filebot$  filebot -script fn:sysinfo
FileBot 4.8.5 (r5976)
JNA Native: java.lang.UnsatisfiedLinkError: Could not find JNA native support
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native
Apache Commons VFS: [zip, rar]
FFprobe: java.io.IOException: Cannot run program "/volume1/@appstore/MediaServer/bin/ffprobe": error=2, No such file or directory
Chromaprint: 1.3.1
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2018-11-29 (r539)
Groovy: 2.5.4
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_181
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 1 Core / 247 MB Max Memory / 12 MB Used Memory
OS: Linux (arm)
HW: Linux DS 2.6.32.12 #23824 Fri Sep 7 12:47:49 CST 2018 armv5tel GNU/Linux synology_88f6282_212+
DATA: /volume1/@appstore/filebot/data/admin
Package: SPK
License: FileBot License PX**** (Valid-Until: 2068-07-16)
Done ヾ(@⌒ー⌒@)ノ
Also only folders in @appstore/filebot/lib are:
aarch64
armv71
i686
x86_64

so no armv5 (or arm5tel) that I think would work for my model

User avatar
rednoah
The Source
Posts: 18538
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: [SOLVED] Can not get JNA Native to work (and therefore also not MediaInfo)

Post by rednoah » 13 Dec 2018, 07:53

1.
Unfortunately, armv5tel is not supported by libmediainfo and I'm not sure if anybody ever managed to cross-compile a working binary. FileBot will mostly work regardless, but if you use custom formats, then bindings such as {vc} won't work.

You may be able to extract a working jnidispatch.so though from the JNA jar archive (maybe linux-armel refers to armv5tel?) which may or may not help you get this working:
http://repo1.maven.org/maven2/net/java/ ... -4.5.2.jar


2.
ffprobe is part of the official Media Server package, so this one should be easy to install via the Package Center:
https://www.synology.com/en-global/dsm/ ... ediaServer
:idea: Please read the FAQ and How to Request Help.

joneng
Posts: 8
Joined: 14 Nov 2019, 17:32

Re: [SOLVED] Can not get JNA Native to work (and therefore also not MediaInfo)

Post by joneng » 01 Jun 2020, 18:34

rednoah wrote:
13 Dec 2018, 07:53
1.
Unfortunately, armv5tel is not supported by libmediainfo and I'm not sure if anybody ever managed to cross-compile a working binary. FileBot will mostly work regardless, but if you use custom formats, then bindings such as {vc} won't work.

You may be able to extract a working jnidispatch.so though from the JNA jar archive (maybe linux-armel refers to armv5tel?) which may or may not help you get this working:
http://repo1.maven.org/maven2/net/java/ ... -4.5.2.jar
I had the same errors returned by filebot -script 'fn:sysinfo', i.e.
JNA Native: java.lang.UnsatisfiedLinkError: Could not find JNA native support
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Could not initialize class com.sun.jna.Native

extracting libjnidispatch.so from http://repo1.maven.org/maven2/net/java/ ... -4.5.2.jar to /volume1/@appstore/filebot/lib/armv5tel resolved this for me; I now see
JNA Native: 5.2.2
MediaInfo: 19.09

thanks rednoah

Post Reply