Libplayer-aml breaking Ubuntu Focal packages

It seems the libplayer-aml replaces libasound2 without being compatible with existing Focal’s libasound2 package. This leads to any library or application that depend on libasound.so.2 to have trouble compiling or executing with “no version information available…”

Can someone share what customization have been done to libasound2 library by libplayer-aml that requires it to replace the Focal package.

Here are typical errors

Building a package that depends on libsdl2
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu/libSDL2.so: undefined reference to snd_device_name_hint@ALSA_0.9' /usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/../../../aarch64-linux-gnu/libSDL2.so: undefined reference to snd_pcm_readi@ALSA_0.9’
/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu/libSDL2.so: undefined reference to `snd_pcm_nonblock@ALSA_0.9’

… long list related to libasound2

/usr/bin/ld: /usr/lib/gcc/aarch64-linux-gnu/9/…/…/…/aarch64-linux-gnu/libSDL2.so: undefined reference to `snd_pcm_wait@ALSA_0.9’

$ aplay -l
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
**** List of PLAYBACK Hardware Devices ****
ALSA lib conf.c:3650:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
ALSA lib control.c:1375:(snd_ctl_open_noupdate) Invalid CTL hw:0
aplay: device_list:283: control open (0): No such file or directory

$ ffmpeg -decoders
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libavdevice.so.58)
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libavdevice.so.58)
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libSDL2-2.0.so.0)
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libSDL2-2.0.so.0)
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libsndio.so.7.0)
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libsndio.so.7.0)
ffmpeg: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by /lib/aarch64-linux-gnu/libflite.so.1)

same here. can’t run guvcview

Can you upgrade the system to latest release V1.0.4 ?

This issue already been fixed.

1 Like

Did a full upgrade as suggested, the issue is still present

~$ aplay -l
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)

~$ cat /etc/fenix-release 
# PLEASE DO NOT EDIT THIS FILE
BOARD=VIM3
VENDOR=Amlogic
VERSION=1.0.4
ARCH=arm64
INITRD_ARCH=arm64
INSTALL_TYPE=EMMC
IMAGE_VERSION=V1.0.4-210330
################ GIT VERSION ################
UBOOT_GIT_VERSION=khadas-vims-v1.0.4-release
LINUX_GIT_VERSION=khadas-vims-v1.0.4-release
FENIX_GIT_VERSION=v1.0.4
#############################################

~$ dpkg -S libasound.so.2
libplayer-aml: /usr/lib/aarch64-linux-gnu/libasound.so.2
libplayer-aml: /usr/lib/aarch64-linux-gnu/libasound.so.2.0.0

~$ apt show libplayer-aml
Package: libplayer-aml
Version: 2.1.0-4
Priority: optional
Section: kernel
Maintainer: Khadas <hello@khadas.com>
Installed-Size: 1,024 B
Conflicts: aml-libamcodec-905
Replaces: libasound2
Download-Size: 4,865 kB
APT-Manual-Installed: yes
APT-Sources: https://dl.khadas.com/repos/vim3 focal/main arm64 Packages
Description: libplayer aml.

Yes, this warning messages exist, but aplay -l works. Do you still have other problems? Can you tell which part still not working?

I replace libasound.so.2 to fix kplayer sound issue, I’m not sure whether it still broken alsa after my fix.

The primary issue for me is that building any application dependent on the libsdl2-2.0-0 or for that matter library that depends on libasound2 to fail during linking because of the replaced libasound.so.2 from libplayer-aml.
As an example compiling the following will fail
https://github.com/PlainJi/yuvPlayer

Because the libplayer-aml marked “Replaces: libasound2”, the libasound2 package skips the libasound.so.2

Here is the installed files from libasound2. Notice the missing
/usr/lib/aarch64-linux-gnu/libasound.so.2
/usr/lib/aarch64-linux-gnu/libasound.so.2.0.0

~$ dpkg -L libasound2
/.
/usr
/usr/lib
/usr/lib/aarch64-linux-gnu
/usr/share
/usr/share/doc
/usr/share/doc/libasound2
/usr/share/doc/libasound2/NEWS.Debian.gz
/usr/share/doc/libasound2/changelog.Debian.gz
/usr/share/doc/libasound2/copyright
/usr/share/doc/libasound2/examples
/usr/share/doc/libasound2/examples/asoundrc.txt

I even tried re-compiling libsdl2-2.0-0 but it fails due to version info.

In short everything will work fine if not building/re-building any package.

A better option if a custom libasound.so.2 is really needed by the libplayer-aml is to add the “libasound2.symbols” from libasound2 package to libplayer-aml. That is usually the expectation if a package is replacing another package.

1 Like

Hello @shyAm

Thanks for your informations, I will try to fix this issue.

Hello @shyAm

I tried to copy ibasound2.symbols to libplayer-aml, but it seems not work.

I have fixed this issue, I recompile the SDL packages based on the libasound.so.2.0.0 from libplayer-aml, but it is not a compelete solution, other packages based on libasound2 may also have issues and need to be recompiled base on the new library.

Update:

I have rebuild SDL with mali fbdev support, if you want to try you can check here:

2 Likes

Hello!

I connected bluetooth headphones to the vim3 board, but when I try to test them with “aplay something.wav” I receive the message:

aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)
aplay: /lib/aarch64-linux-gnu/libasound.so.2: no version information available (required by aplay)

and nothing plays, I hear nothing in the headphones.
I already did an upgrade but nothing changed. Any ideas? Any help will be greatly appreciated!

Can you try this?

$ sudo apt-get update
$ sudo apt-get install --reinstall libasound2

And try again.

1 Like

It indeed solved the problem, thanks a lot!