How to install packages "libasound2-dev"

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

How to install packages "libasound2-dev"

1,538 Views
yumy
Contributor I

My board is  i.MX 8M Plus EVK,i am trying developing "speak" and "microphone" functionality

I follow IMX_LINUX_USERS_GUIDE 8.3.3 Audio Front End (AFE)

I downloaded AFE code,and try to compile then,but get error like this:

root@imx8mpevk:~/nxp-afe# make
#@echo "\nBuilding: build/obj/main.o"
aarch64-poky-linux-g++ -MT build/obj/main.o -MMD -MP -MF build/deps/main.Td -g3 -O3 -Wall -Wextra -Wstrict-aliasing -pedantic -Werror -Wunreachable-code -Wcast-align -Wcast-qual -Wctor-dtor-privacy -Winit-self -Wlogical-op -Wmissing-include-dirs -Wnoexcept -Woverloaded-virtual -Wredundant-decls -Wshadow -Wsign-promo -Wstrict-null-sentinel -Wswitch-default -Wundef -Wno-unused -Wno-parentheses -fdiagnostics-show-option -I src/ -I src/SignalProcessor -I src/AudioStream -I src/AFEUtilities -c -o build/obj/main.o src/main.cpp
src/main.cpp:5:10: fatal error: alsa/asoundlib.h: No such file or directory
5 | #include <alsa/asoundlib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.
make: *** [makefile:117: build/obj/main.o] Error 1

 

then, i try to $sudo apt-get install libasound2-dev, but not work

root@imx8mpevk:~/nxp-afe# sudo apt-get install libasound2-dev
Reading package lists... Done
Building dependency tree... Done
E: Unable to locate package libasound2-dev

then , i modify  <build directory>/conf/local.conf

MACHINE ??= 'imx8mpevk'
DISTRO ?= 'fsl-imx-xwayland'
EXTRA_IMAGE_FEATURES ?= "debug-tweaks"
USER_CLASSES ?= "buildstats"
PATCHRESOLVE = "noop"
BB_DISKMON_DIRS ??= "\
STOPTASKS,${TMPDIR},1G,100K \
STOPTASKS,${DL_DIR},1G,100K \
STOPTASKS,${SSTATE_DIR},1G,100K \
STOPTASKS,/tmp,100M,100K \
HALT,${TMPDIR},100M,1K \
HALT,${DL_DIR},100M,1K \
HALT,${SSTATE_DIR},100M,1K \
HALT,/tmp,10M,1K"
PACKAGECONFIG:append:pn-qemu-system-native = " sdl"
CONF_VERSION = "2"

DL_DIR ?= "${BSPDIR}/downloads/"
ACCEPT_FSL_EULA = "1"

# Switch to Debian packaging and include package-management in the image
PACKAGE_CLASSES = "package_deb"
EXTRA_IMAGE_FEATURES += "package-management"
IMAGE_INSTALL:append = "bluez5 bluez5-noinst-tools bluez5-obex openobex obexftp glibc-gconv-utf-16 glibc-utils git libasound2-dev "
CORE_IMAGE_EXTRA_INSTALL += "apt"

at IMAGE_INSTALL ,I added "libasound2-dev", but still not work 

$bitbake imx-image-full
Loading cache: 100% | | ETA: --:--:--
Loaded 0 entries from dependency cache.
Parsing recipes: 100% |#######################################################################################################################################################################################################| Time: 0:00:16
Parsing of 3440 .bb files complete (0 cached, 3440 parsed). 5303 targets, 361 skipped, 18 masked, 0 errors.
NOTE: Resolving any missing task queue dependencies
ERROR: Nothing RPROVIDES 'libasound2-dev' (but /opt/yocto/imx-6.1.36-2.1.0-build/sources/meta-imx/meta-sdk/dynamic-layers/qt6-layer/recipes-fsl/images/imx-image-full.bb RDEPENDS on or otherwise requires it)
NOTE: Runtime target 'libasound2-dev' is unbuildable, removing...
Missing or unbuildable dependency chain was: ['libasound2-dev']
ERROR: Required build target 'imx-image-full' has no buildable providers.
Missing or unbuildable dependency chain was: ['imx-image-full', 'libasound2-dev']

Summary: There were 2 ERROR messages, returning a non-zero exit code.

 

Please give me advice on how to download "libasound2-dev" packages,Thank you!

0 Kudos
Reply
2 Replies

1,518 Views
Dhruvit
NXP TechSupport
NXP TechSupport

Hi @yumy,

I hope you are doing well.

To include fsl-alsa-plugins in yocto image one can add i.MX audio support by adding the below package group.

CORE_IMAGE_EXTRA_INSTALL += " packagegroup-fsl-tools-audio \
                                                                  "

Thanks & Regards,
Dhruvit Vasavada

0 Kudos
Reply

1,333 Views
yumy
Contributor I

Hi,

I added the below package group in local.conf

CORE_IMAGE_EXTRA_INSTALL += " packagegroup-fsl-tools-audio \
                                                                  "

but not work, following is my error message

test.c:11:10: fatal error: alsa/asoundlib.h: No such file or directory
11 | #include <alsa/asoundlib.h>
| ^~~~~~~~~~~~~~~~~~
compilation terminated.

how can i include <alsa/asoundlib.h> on IMX8MQ-EVK

thanks

0 Kudos
Reply