What's new

Entware conflicting Firmware and Optware library

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

zd59

Regular Contributor
Hello!

I've upgraded my Optware packages on my AC86u with merlinFW.
minidlna refuse to start:
minidlnad: error while loading shared libraries: libavformat.so.58: wrong ELF class: ELFCLASS32

Found conflicting library - FW is of version 58 and opkg is version 59:
/tmp/mnt/entware/entware/lib/libavformat.so.59.16.100
/tmp/mnt/entware/entware/lib/libavformat.so.59 - link to above
/usr/lib/libavformat.so.58

How to convince minidlna to grab the right one? The lower version is on a read only folder.
 
Hello!

I've upgraded my Optware packages on my AC86u with merlinFW.
minidlna refuse to start:
minidlnad: error while loading shared libraries: libavformat.so.58: wrong ELF class: ELFCLASS32

Found conflicting library - FW is of version 58 and opkg is version 59:
/tmp/mnt/entware/entware/lib/libavformat.so.59.16.100
/tmp/mnt/entware/entware/lib/libavformat.so.59 - link to above
/usr/lib/libavformat.so.58

How to convince minidlna to grab the right one? The lower version is on a read only folder.
Forget to mention that FW minidlna is version 1.2, and installed Optwares minidlna is version 1.3
 
I can't find any references to libavformat.so.58 in the Entware minidlnad binary, only references to libavformat.so.59.

The firmware-supplied version of minidlnad does link libavformat.so.58 so that makes me think you are executing the firmware version of minidlnad instead of the Entware version.

What are you doing that causes this error message to appear?
 
/opt/etc/init.d/S90minidlna - here is daemon named "minidlnad"

There is only one minidlnad on the system, so can not start firmwares one from CLI:

Code:
# which minidlnad
/opt/sbin/minidlnad

firmware minidlna works fine - Asus GUI setting, the first line of a log file:
Starting MiniDLNA version 1.2.1.
I can watch movies on connected Windows machine (VLC)

Setting firmware minidlna OFF in GUI:
1650387427825.png


then

Code:
# find / -name libavformat*
/tmp/mnt/entware/entware/lib/libavformat.so.59.16.100
/tmp/mnt/entware/entware/lib/libavformat.so.59
/usr/lib/libavformat.so.58


Code:
# /opt/sbin/minidlnad
/opt/sbin/minidlnad: error while loading shared libraries: libavformat.so.58: wrong ELF class: ELFCLASS32
 
There is only one minidlnad on the system, so can not start firmwares one from CLI:
Sorry, you are correct. The firmware version is called minidlna and the Entware version is called minidlnad.

Code:
# /opt/sbin/minidlnad
/opt/sbin/minidlnad: error while loading shared libraries: libavformat.so.58: wrong ELF class: ELFCLASS32
Try this:
Code:
/opt/etc/init.d/S90minidlna start
If that doesn't work try updating your Entware packages again.
Code:
opkg update; opkg upgrade
 
Sorry, you are correct. The firmware version is called minidlna and the Entware version is called minidlnad.


Try this:
Code:
/opt/etc/init.d/S90minidlna start
If that doesn't work try updating your Entware packages again.
Thanks, but the original reason for me to directly execute minidlnad is failure to run the one you suggest.
The result "FAILED" is not descriptive, so to get the cause I exec minidlnad directly. That show a lib version conflict.
 
Can you post the output of these commands please.
Code:
set | grep PATH
Code:
sh -x /opt/etc/init.d/S90minidlna start
 
Code:
# set | grep PATH
CHECK_OPT_PATH='0'
PATH='/opt/bin:/opt/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin'

and there is no traces of conflicting library there:
Code:
# sh -x /opt/etc/init.d/S90minidlna start
+ ENABLED=yes
+ PROCS=minidlnad
+ ARGS=-f /opt/etc/minidlna.conf
+ PREARGS=
+ DESC=minidlnad
+ PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ . /opt/etc/init.d/rc.func
+ ACTION=start
+ CALLER=
+ ansi_red=\033[1;31m
+ ansi_white=\033[1;37m
+ ansi_green=\033[1;32m
+ ansi_yellow=\033[1;33m
+ ansi_blue=\033[1;34m
+ ansi_bell=\007
+ ansi_blink=\033[5m
+ ansi_std=\033[m
+ ansi_rev=\033[7m
+ ansi_ul=\033[4m
+ start
+ [  != yes -a  = cron ]
+ [ yes != yes ]
+ echo -e -n \033[1;37m Starting minidlnad... \033[m
 Starting minidlnad... + pidof minidlnad
+ [ -n  ]
+
+ COUNTER=0
+ LIMIT=10
+ minidlnad -f /opt/etc/minidlna.conf
+ pidof minidlnad
+ [ -z 21587 -a 0 -le 10 ]
+
+ pidof minidlnad
+ [ -z  ]
+ echo -e             \033[1;31m failed. \033[m
             failed.
+ logger Failed to start minidlnad from .
+ return 255

I also
Code:
export LD_LIBRARY_PATH=' /opt/lib'
as the right library is there.

But failure is the same.
 
Code:
# set | grep PATH
CHECK_OPT_PATH='0'
PATH='/opt/bin:/opt/sbin:/bin:/usr/bin:/sbin:/usr/sbin:/mmc/sbin:/mmc/bin:/mmc/usr/sbin:/mmc/usr/bin:/opt/sbin:/opt/bin:/opt/usr/sbin:/opt/usr/bin'

and there is no traces of conflicting library there:
Code:
# sh -x /opt/etc/init.d/S90minidlna start
+ ENABLED=yes
+ PROCS=minidlnad
+ ARGS=-f /opt/etc/minidlna.conf
+ PREARGS=
+ DESC=minidlnad
+ PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
+ . /opt/etc/init.d/rc.func
+ ACTION=start
+ CALLER=
+ ansi_red=\033[1;31m
+ ansi_white=\033[1;37m
+ ansi_green=\033[1;32m
+ ansi_yellow=\033[1;33m
+ ansi_blue=\033[1;34m
+ ansi_bell=\007
+ ansi_blink=\033[5m
+ ansi_std=\033[m
+ ansi_rev=\033[7m
+ ansi_ul=\033[4m
+ start
+ [  != yes -a  = cron ]
+ [ yes != yes ]
+ echo -e -n \033[1;37m Starting minidlnad... \033[m
Starting minidlnad... + pidof minidlnad
+ [ -n  ]
+
+ COUNTER=0
+ LIMIT=10
+ minidlnad -f /opt/etc/minidlna.conf
+ pidof minidlnad
+ [ -z 21587 -a 0 -le 10 ]
+
+ pidof minidlnad
+ [ -z  ]
+ echo -e             \033[1;31m failed. \033[m
             failed.
+ logger Failed to start minidlnad from .
+ return 255

I also
Code:
export LD_LIBRARY_PATH=' /opt/lib'
as the right library is there.

But failure is the same.
the path is without space --> '/opt/lib'
 
Well I've just installed it on my RT-AX86U and it starts up without any errors. I'd guess that there's some dependent package which needs to be updated.
Code:
# opkg info minidlna
Package: minidlna
Version: 1.3.0-1
Depends: libc, libssp, librt, libpthread, libpthread, libexif, libjpeg, libsqlite3, libffmpeg, libid3tag, libflac, libvorbis, libiconv-full, libintl-full, libffmpegthumbnailer, libopusfile
Status: install user installed
Section: multimedia
Architecture: aarch64-3.10
Size: 151131
Filename: minidlna_1.3.0-1_aarch64-3.10.ipk
Conffiles:
/opt/etc/minidlna.conf 8703cd57ac2cb3773afce71fdb47a450982997ea5ff7c15a0d5b0a06c4a4b595
Description: MiniDLNA (aka ReadyDLNA) is server software with the aim of
being fully compliant with DLNA/UPnP-AV clients.
Installed-Time: 1650393025
Rich (BB code):
# ldd /opt/sbin/minidlnad
        linux-vdso.so.1 (0x0000007fb65a5000)
        libjpeg.so.62 => /opt/lib/libjpeg.so.62 (0x0000007fb651c000)
        libpng16.so.16 => /opt/lib/libpng16.so.16 (0x0000007fb64d3000)
        libid3tag.so.0 => /opt/lib/libid3tag.so.0 (0x0000007fb64a9000)
        libz.so.1 => /opt/lib/libz.so.1 (0x0000007fb6483000)
        libsqlite3.so.0 => /opt/lib/libsqlite3.so.0 (0x0000007fb6348000)
        libavformat.so.59 => /opt/lib/libavformat.so.59 (0x0000007fb612e000)
        libavcodec.so.59 => /opt/lib/libavcodec.so.59 (0x0000007fb53ec000)
        libavutil.so.57 => /opt/lib/libavutil.so.57 (0x0000007fb5273000)
        libexif.so.12 => /opt/lib/libexif.so.12 (0x0000007fb5213000)
        libiconv.so.2 => /opt/lib/libiconv.so.2 (0x0000007fb511f000)
        libFLAC.so.8 => /opt/lib/libFLAC.so.8 (0x0000007fb50c1000)
        libvorbis.so.0.4.9 => /opt/lib/libvorbis.so.0.4.9 (0x0000007fb5087000)
        libogg.so.0 => /opt/lib/libogg.so.0 (0x0000007fb506e000)
        libffmpegthumbnailer.so.4 => /opt/lib/libffmpegthumbnailer.so.4 (0x0000007fb5023000)
        libopusfile.so.0 => /opt/lib/libopusfile.so.0 (0x0000007fb5007000)
        libpthread.so.0 => /opt/lib/libpthread.so.0 (0x0000007fb4fd9000)
        libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x0000007fb4fb4000)
        libc.so.6 => /opt/lib/libc.so.6 (0x0000007fb4e44000)
        libm.so.6 => /opt/lib/libm.so.6 (0x0000007fb4d80000)
        libdl.so.2 => /opt/lib/libdl.so.2 (0x0000007fb4d6c000)
        libbz2.so.1.0 => /opt/lib/libbz2.so.1.0 (0x0000007fb4d4b000)
        libgnutls.so.30 => /opt/lib/libgnutls.so.30 (0x0000007fb4aef000)
        libswresample.so.4 => /opt/lib/libswresample.so.4 (0x0000007fb4acc000)
        libmp3lame.so.0 => /opt/lib/libmp3lame.so.0 (0x0000007fb4a46000)
        libopus.so.0 => /opt/lib/libopus.so.0 (0x0000007fb49e2000)
        libx264.so.161 => /opt/lib/libx264.so.161 (0x0000007fb4769000)
        libavfilter.so.8 => /opt/lib/libavfilter.so.8 (0x0000007fb447b000)
        libstdc++.so.6 => /opt/lib/libstdc++.so.6 (0x0000007fb42cf000)
        /opt/lib/ld-linux-aarch64.so.1 (0x0000007fb6577000)
        libnettle.so.8 => /opt/lib/libnettle.so.8 (0x0000007fb427c000)
        libhogweed.so.6 => /opt/lib/libhogweed.so.6 (0x0000007fb4223000)
        libgmp.so.10 => /opt/lib/libgmp.so.10 (0x0000007fb419d000)
        libswscale.so.6 => /opt/lib/libswscale.so.6 (0x0000007fb412c000)
        libpostproc.so.56 => /opt/lib/libpostproc.so.56 (0x0000007fb4114000)
 
The strange discovery:
I looked into /opt/sbin/minidlnad, searching for a string libavformat.
There is libavformat.so.58 - THE VERSION FROM FIRMWARE!
 
The strange discovery:
I looked into /opt/sbin/minidlnad, searching for a string libavformat.
There is libavformat.so.58 - THE VERSION FROM FIRMWARE!
That's the first thing I checked (post #5). It looks like you're running an old version. Perhaps with mixed Entware package levels installed.
Code:
# strings /opt/sbin/minidlnad | grep libavf
libavformat.so.59
 
Well I've just installed it on my RT-AX86U and it starts up without any errors. I'd guess that there's some dependent package which needs to be updated.
Code:
# opkg info minidlna
Package: minidlna
Version: 1.3.0-1
Depends: libc, libssp, librt, libpthread, libpthread, libexif, libjpeg, libsqlite3, libffmpeg, libid3tag, libflac, libvorbis, libiconv-full, libintl-full, libffmpegthumbnailer, libopusfile
Status: install user installed
Section: multimedia
Architecture: aarch64-3.10
Size: 151131
Filename: minidlna_1.3.0-1_aarch64-3.10.ipk
Conffiles:
/opt/etc/minidlna.conf 8703cd57ac2cb3773afce71fdb47a450982997ea5ff7c15a0d5b0a06c4a4b595
Description: MiniDLNA (aka ReadyDLNA) is server software with the aim of
being fully compliant with DLNA/UPnP-AV clients.
Installed-Time: 1650393025
Rich (BB code):
# ldd /opt/sbin/minidlnad
        linux-vdso.so.1 (0x0000007fb65a5000)
        libjpeg.so.62 => /opt/lib/libjpeg.so.62 (0x0000007fb651c000)
        libpng16.so.16 => /opt/lib/libpng16.so.16 (0x0000007fb64d3000)
        libid3tag.so.0 => /opt/lib/libid3tag.so.0 (0x0000007fb64a9000)
        libz.so.1 => /opt/lib/libz.so.1 (0x0000007fb6483000)
        libsqlite3.so.0 => /opt/lib/libsqlite3.so.0 (0x0000007fb6348000)
        libavformat.so.59 => /opt/lib/libavformat.so.59 (0x0000007fb612e000)
        libavcodec.so.59 => /opt/lib/libavcodec.so.59 (0x0000007fb53ec000)
        libavutil.so.57 => /opt/lib/libavutil.so.57 (0x0000007fb5273000)
        libexif.so.12 => /opt/lib/libexif.so.12 (0x0000007fb5213000)
        libiconv.so.2 => /opt/lib/libiconv.so.2 (0x0000007fb511f000)
        libFLAC.so.8 => /opt/lib/libFLAC.so.8 (0x0000007fb50c1000)
        libvorbis.so.0.4.9 => /opt/lib/libvorbis.so.0.4.9 (0x0000007fb5087000)
        libogg.so.0 => /opt/lib/libogg.so.0 (0x0000007fb506e000)
        libffmpegthumbnailer.so.4 => /opt/lib/libffmpegthumbnailer.so.4 (0x0000007fb5023000)
        libopusfile.so.0 => /opt/lib/libopusfile.so.0 (0x0000007fb5007000)
        libpthread.so.0 => /opt/lib/libpthread.so.0 (0x0000007fb4fd9000)
        libgcc_s.so.1 => /opt/lib/libgcc_s.so.1 (0x0000007fb4fb4000)
        libc.so.6 => /opt/lib/libc.so.6 (0x0000007fb4e44000)
        libm.so.6 => /opt/lib/libm.so.6 (0x0000007fb4d80000)
        libdl.so.2 => /opt/lib/libdl.so.2 (0x0000007fb4d6c000)
        libbz2.so.1.0 => /opt/lib/libbz2.so.1.0 (0x0000007fb4d4b000)
        libgnutls.so.30 => /opt/lib/libgnutls.so.30 (0x0000007fb4aef000)
        libswresample.so.4 => /opt/lib/libswresample.so.4 (0x0000007fb4acc000)
        libmp3lame.so.0 => /opt/lib/libmp3lame.so.0 (0x0000007fb4a46000)
        libopus.so.0 => /opt/lib/libopus.so.0 (0x0000007fb49e2000)
        libx264.so.161 => /opt/lib/libx264.so.161 (0x0000007fb4769000)
        libavfilter.so.8 => /opt/lib/libavfilter.so.8 (0x0000007fb447b000)
        libstdc++.so.6 => /opt/lib/libstdc++.so.6 (0x0000007fb42cf000)
        /opt/lib/ld-linux-aarch64.so.1 (0x0000007fb6577000)
        libnettle.so.8 => /opt/lib/libnettle.so.8 (0x0000007fb427c000)
        libhogweed.so.6 => /opt/lib/libhogweed.so.6 (0x0000007fb4223000)
        libgmp.so.10 => /opt/lib/libgmp.so.10 (0x0000007fb419d000)
        libswscale.so.6 => /opt/lib/libswscale.so.6 (0x0000007fb412c000)
        libpostproc.so.56 => /opt/lib/libpostproc.so.56 (0x0000007fb4114000)
Thanks a lot.
Solved.

At mine there was listed libavformat.so.58. and some missing libs.
Uninstall and then install minidlna solved that.
opkg --force-reinstall did not help.

I think the root cause of a problem is the exact same package name in Entware repository from previous and current (13th april 2022) version.
They recompiled the same source from ReadyMedia with included refreshed libraries.
And opkg --force-reinstall also do not work as it should. Could be, that it reinstall locally saved package, as the new one on remote repository have the same name.
That is the reason, I spent so much time to make it work again.
Lesion for future - never to use --force-reinstall
 
Last edited:

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Staff online

Top