alsa-util 1.1.0 arm cross compile issue

╄→гoц情女王★ 提交于 2019-12-08 03:51:35

问题


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.


回答1:


--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


来源:https://stackoverflow.com/questions/36195926/alsa-util-1-1-0-arm-cross-compile-issue

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!