dev-rowbot
dev-rowbot

Reputation: 488

alsa-util 1.1.0 arm cross compile issue

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.

Upvotes: 3

Views: 4265

Answers (2)

Angelo Dureghello
Angelo Dureghello

Reputation: 330

I can cross-compile with alsamixer enabled, of course, ncursesw needs to be installed in the sysroot. If of any use, this are my config flags

-exec-prefix=/usr --datarootdir=/usr/share --includedir=${DIR_DIST}/targetfs/usr/include --with-alsa-prefix=${DIR_DIST}/targetfs/usr/lib --with-alsa-inc-prefix=${DIR_DIST}/targetfs/usr/include

Upvotes: 0

CL.
CL.

Reputation: 180020

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

Upvotes: 2

Related Questions