Filebot 4.8.5 on RPi2 - MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so

Support for Ubuntu and other Desktop Linux distributions
Post Reply
thunderhawk
Posts: 4
Joined: 23 Oct 2019, 23:26

Filebot 4.8.5 on RPi2 - MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so

Post by thunderhawk »

Hi,

when I run the fn:sysinfo I've got this output:

Code: Select all

FileBot 4.8.5 (r6224)
JNA Native: 5.2.2
MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/media/TOSHIBA/AAA_CUSTOM/FileBot_4.8.5-portable/jar/filebot.jar])
Apache Commons VFS: [zip, rar]
FFprobe: 4.2-static
Chromaprint: fpcalc version 1.4.3
Extended Attributes: OK
Unicode Filesystem: OK
Script Bundle: 2019-05-15 (r565)
Groovy: 2.5.6
JRE: Java(TM) SE Embedded Runtime Environment 1.8.0_121
JVM: 32-bit Java HotSpot(TM) Embedded Client VM
CPU/MEM: 4 Core / 181 MB Max Memory / 10 MB Used Memory
OS: Linux (arm)
HW: Linux osmc 4.14.78-4-osmc #1 SMP PREEMPT Wed Dec 12 17:58:11 UTC 2018 armv7l GNU/Linux
DATA: /media/TOSHIBA/AAA_CUSTOM/FileBot_4.8.5-portable/data/osmc
Package: PORTABLE
License: UNREGISTERED
Done ヾ(@⌒ー⌒@)ノ
I tried to put filebot_4.7.9 armhf libmediainfo version (that currently works) but I still got this error message.

Anyone can help me?

Thanks
T.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot 4.8.5 on RPi2 - MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so

Post by rednoah »

1.
:?: What device are you using? What OS are you based on?

:idea: If you're using Raspbian, or any Debian variant, please use the apt repository for FileBot and platform-dependent dependencies: viewtopic.php?f=11&t=6028


2.
thunderhawk wrote: 23 Oct 2019, 23:33 I tried to put filebot_4.7.9 armhf libmediainfo version (that currently works) but I still got this error message.
What makes you think it works? Did it work in the past with older versions of FileBot?

The error message indicates that it just doesn't work:

Code: Select all

MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/media/TOSHIBA/AAA_CUSTOM/FileBot_4.8.5-portable/jar/filebot.jar])

ARM based devices are tricky. Binaries may very well not be compatible with different Linux variants due to ABI or just not be compatible with certain ARM processors.


:idea: You can check the filebot.sh to make sure it's picking the correct library folder for your platform. But since JNA is working, that's probably already happening.

:idea: You can try to make your own libmediainfo.so build (very difficult) or just try older releases for different Linuxes from the MediaInfo main page, and maybe one of them will be compatible. It's a bit of a long shot though.
:idea: Please read the FAQ and How to Request Help.
thunderhawk
Posts: 4
Joined: 23 Oct 2019, 23:26

Re: Filebot 4.8.5 on RPi2 - MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so

Post by thunderhawk »

Hi Rednoah,

thanks for your answer, here are mine:
1.
:?: What device are you using? What OS are you based on?
Raspberry RPi2 Linux osmc 4.14.78-4-osmc
If you're using Raspbian, or any Debian variant, please use the apt repository for FileBot and platform-dependent dependencies: viewtopic.php?f=11&t=6028
I downloaded both filebot 4.7.9 and 4.8.5 portable version, I prefer this solution because I've got more control on what happens on my system
2.
thunderhawk wrote: ↑Today, 01:33
I tried to put filebot_4.7.9 armhf libmediainfo version (that currently works) but I still got this error message.
What makes you think it works? Did it work in the past with older versions of FileBot?

The error message indicates that it just doesn't work:
CODE: SELECT ALL

MediaInfo: net.filebot.mediainfo.MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so: Unable to load library 'mediainfo': Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/media/TOSHIBA/AAA_CUSTOM/FileBot_4.8.5-portable/jar/filebot.jar])

ARM based devices are tricky. Binaries may very well not be compatible with different Linux variants due to ABI or just not be compatible with certain ARM processors.
I suppose that because if libmediainfo.so packaged with 4.7.9 version works correctly, why not use it with 4.8.5 version? It's a library that already works on my system.
You can check the filebot.sh to make sure it's picking the correct library folder for your platform. But since JNA is working, that's probably already happening.
I've also checked it and done some adjustment to filebot.sh script, for example I changed line 54 from

Code: Select all

LIBRARY_PATH="$PACKAGE_LIBRARY_PATH:$LD_LIBRARY_PATH"
to

Code: Select all

LIBRARY_PATH="$PACKAGE_LIBRARY_PATH"
because LD_LIBRARY_PATH variable was empty (maybe you can explain me why).
You can try to make your own libmediainfo.so build (very difficult) or just try older releases for different Linuxes from the MediaInfo main page, and maybe one of them will be compatible. It's a bit of a long shot though.
I've done this test with same result.

Looking to error code

Code: Select all

Native library (linux-arm/libmediainfo.so) not found in resource path ([file:/media/TOSHIBA/AAA_CUSTOM/FileBot_4.8.5-portable/jar/filebot.jar])
it seems that the code looks for libmediainfo in filebot.jar resources and not in library path, do you agree?

Thanks again,
T.
User avatar
rednoah
The Source
Posts: 22991
Joined: 16 Nov 2011, 08:59
Location: Taipei
Contact:

Re: Filebot 4.8.5 on RPi2 - MediaInfoException: Unable to load arm (32-bit) native library libmediainfo.so

Post by rednoah »

thunderhawk wrote: 24 Oct 2019, 06:35 I downloaded both filebot 4.7.9 and 4.8.5 portable version, I prefer this solution because I've got more control on what happens on my system
Alright, I guess you can use apt get packages specifically compiled for your platform and ABI, and make life easy, or you can fiddle around with the portable version and it's dependencies manually, and make life hard. ;)

thunderhawk wrote: 24 Oct 2019, 06:35 I suppose that because if libmediainfo.so packaged with 4.7.9 version works correctly, why not use it with 4.8.5 version? It's a library that already works on my system.
Linux is not a homogenous environment, especially not on armv7 platforms, so dependencies are included on a best-effort basis only. Might work out of the box. Might not and require fiddling around with dependencies. Looks like the newer version of libmediainfo.so bundled in newer versions of FileBot packages is for some reason not compatible with this Debian build anymore, even though older versions might have been.

:idea: The included binaries work on (i.e. are tested on) Synology NAS and QNAP NAS devices, and probably other stripped-down headless Linux boxes. OSMC is based on Debian, so the ABI might differ significantly, and thus incompatibilities arise, making it necessary to rely on Debian packages compiled specifically for your platform.

:idea: If you run apt install mediainfo and then copy the newly installed libmediainfo.so into into the filebot-portable/lib/armv7l folder you can probably make it work that way. This will also ensure that you have all the transitive dependencies that libmediainfo.so might have. (on this note, the included libmediainfo.so may simply be missing transitive dependencies, so just doing apt install mediainfo might make the included binaries work)
:idea: Please read the FAQ and How to Request Help.
Post Reply