当前位置: 代码迷 >> 综合 >> alsa-lib(libasound.so) alsa-utils(amixer aplay)的编译移植
  详细解决方案

alsa-lib(libasound.so) alsa-utils(amixer aplay)的编译移植

热度:67   发布时间:2023-12-16 12:06:05.0

alsa-lib
这个的交叉编译和其他的一样,查看之前的库移植文章就好了

alsa-utils

问题1. configure时提示缺少libasound2
解决:先安装alsa-lib库。
问题2. configure出现错误:
checking for panel.h… no
configure: error: required curses helper header not found
解决:据搜索,是因为交叉编译alsa-utils默认会生成alsamixer,此时会用到ncurses,但即使交叉编译了ncurses库并加入alsa-utils调用路径,问题仍然存在。
网友有解释:因为ncurses交叉编译时不支持alsamixer,在交叉编译alsa-utils时加上configure选项:–disable-alsamixer,不再报上述错误。
问题3. make时报错:未找到xmlto命令
解决:apt-get安装xmlto工具,或者在configure时加上: –disable-xmlto

1:
sudo ./configure --host=mips-linux-gnu --prefix=$(pwd)/__install --enable-static
–enable-shared
CC=/opt/mips-gcc472-glibc216-32bit/bin//mips-linux-uclibc-gnu-gcc
CFLAGS="-I/home/linux/app/app/open_src/open_src/alsa_lib/alsa-lib-1.0.23/__install/include"
LDFLAGS="-L/home/linux/app/app/open_src/open_src/alsa_lib/alsa-lib-1.0.23/__install/lib"
-disable-alsamixer
### CFLAGS: -I(alsa-lib include pwd);
### LDFLAGS: -L(alsa_lib lib pwd);

2:
sudo make
3:
sudo make install

  相关解决方案