alsa-util 1.1.0 arm 交叉编译问题 [英] alsa-util 1.1.0 arm cross compile issue
问题描述
我正在尝试为 arm-linux 平台构建 alsa-util-1.1.0,通过反复试验,我设法使用以下命令编译了 alsa-lib 和 alsa-util:
alsa-lib:
CC=arm-linux-gnueabihf-gcc ./configure --host=arm-linux -prefix=/home/username/20160311_alsa_work/alsa/install --disable-python
alsa-util:
CC=arm-linux-gnueabihf-gcc ./configure --prefix=/home/username/20160311_alsa_work/alsa/install --host=arm-linux --with-alsa-inc-prefix=/home/username/20160311_alsa_work/alsa/install/include --with-alsa-prefix=/home/username/20160311_alsa_work/alsa/install/lib --disable-alsamixer --disable-xmlto --disable-nls --disable-bat --with-udev-rules-dir=/home/username/20160311_alsa_work/alsa/install/lib/udev --with-asound-state-dir=/home/username/20160311_alsa_work/alsa/install/var/lib/alsa --disable-alsaconf
这与本指南非常相似:Alsa 音频交叉编译和使用>
编译看起来没问题,make install
把所有东西都放在正确的文件夹中.然后我将所有库和 bin 复制到我的目标 rootfs 并尝试执行 arecord -l
arecord 的输出为:
**** CAPTURE 硬件设备列表 ****ALSA lib conf.c:3750:(snd_config_update_r) 无法访问文件/home/username/20160311_alsa_work/alsa/install/share/alsa/alsa.confALSA lib control.c:954:(snd_ctl_open_noupdate) 无效的 CTL hw:0arecord: device_list:277: control open (0): 没有那个文件或目录
我的配置选项显然有问题,但我看不到任何其他更改它们的方法......任何想法???
我需要为我的 arm-linux 目标交叉编译并安装到目标的 rootfs,但具有相对于 rootfs 的根目录的所有路径,而不是应该仅用于构建的前缀.
有关信息:我使用 --with-udev-rules-dir=
和 --with-asound-state-dir=
选项,否则安装将尝试将文件复制到我的构建机器目录.
--prefix
必须是在目标设备上看到的路径.
要将文件安装到主机上的不同路径,请使用DESTDIR
:
make install DESTDIR=/home/me/whatever
I am trying to build alsa-util-1.1.0 for an arm-linux platform, through trial and error I managed to compile alsa-lib and alsa-util ok using these commands:
alsa-lib:
CC=arm-linux-gnueabihf-gcc ./configure --host=arm-linux -prefix=/home/username/20160311_alsa_work/alsa/install --disable-python
alsa-util:
CC=arm-linux-gnueabihf-gcc ./configure --prefix=/home/username/20160311_alsa_work/alsa/install --host=arm-linux --with-alsa-inc-prefix=/home/username/20160311_alsa_work/alsa/install/include --with-alsa-prefix=/home/username/20160311_alsa_work/alsa/install/lib --disable-alsamixer --disable-xmlto --disable-nls --disable-bat --with-udev-rules-dir=/home/username/20160311_alsa_work/alsa/install/lib/udev --with-asound-state-dir=/home/username/20160311_alsa_work/alsa/install/var/lib/alsa --disable-alsaconf
This is quite similar to this guide: Alsa audio cross compile and use
The compilation seems ok and the make install
puts everything in the right folders. I then copy all the libs and bins to my targets rootfs and try execute arecord -l
The output of arecord is:
**** List of CAPTURE Hardware Devices ****
ALSA lib conf.c:3750:(snd_config_update_r) Cannot access file /home/username/20160311_alsa_work/alsa/install/share/alsa/alsa.conf
ALSA lib control.c:954:(snd_ctl_open_noupdate) Invalid CTL hw:0
arecord: device_list:277: control open (0): No such file or directory
There is obviously something wrong with my configure options but I cannot see any other way to change them... any ideas???
I need to cross-compile for my arm-linux target and install to the target's rootfs but have all the paths relative to root of the rootfs and not the prefix which should only be used for building.
For info:
I use the --with-udev-rules-dir=
and --with-asound-state-dir=
options because otherwise the install will try copy files to my build machines directories.
--prefix
must be the path as seen on the target device.
To install the files into a different path on the host, use DESTDIR
:
make install DESTDIR=/home/me/whatever
这篇关于alsa-util 1.1.0 arm 交叉编译问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!