[alsa-devel] Building the alsa library
Hi,
I have been trying to solve a difficult issue using the ALSA library. To solve it, I need to be able to debug into the ALSA library.
I tried to build it from the sources, from the alsa-lib-1.1.9 library source to be specific.
Problems:
Using the build procedure in the INSTALL file, it appeared to build but I could not find a libasound.so file anywhere.
I also tried the recommended procedure for static linking, also from the INSTALL file. That gives a ./src/.libs/libasound.a file (indeed, this gets generated on a dynamic link as well, which I don't understand). However, linking with that produces (after adding back a few missing libs): samiam@samiam-linux-pc:~/scratch$ ./hello This is a test program ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory) ALSA lib pcm.c:2564:(snd_pcm_open_noupdate) Unknown PCM default Program complete IE., it is linking pulse audio? Or do I need another .a file from the library collection? Notes: here is the .a files from the alsa-lib build: samiam@samiam-linux-pc:~/projects/alsa/alsa-lib-1.1.9$ find . -name *.a ./src/pcm/.libs/libpcm.a ./src/seq/.libs/libseq.a ./src/rawmidi/.libs/librawmidi.a ./src/ucm/.libs/libucm.a ./src/timer/.libs/libtimer.a ./src/topology/.libs/libtopology.a ./src/hwdep/.libs/libhwdep.a ./src/mixer/.libs/libmixer.a ./src/control/.libs/libcontrol.a ./src/.libs/libasound.a Here is the test file I am building (hello.c): #include <stdio.h> #include <alsa/asoundlib.h> int main(void) { snd_pcm_t *pcm_handle; printf("This is a test program\n"); snd_pcm_open(&pcm_handle, "default", SND_PCM_STREAM_PLAYBACK, 0); printf("Program complete\n");
} Here is the line used to compile it: gcc -static -o hello hello.c libasound.a -pthread -lm -ldl Thanks in advance. Scott Franco
Dne 15. 06. 19 v 22:41 scott andrew franco napsal(a):
Hi,
I have been trying to solve a difficult issue using the ALSA library. To solve it, I need to be able to debug into the ALSA library.
I tried to build it from the sources, from the alsa-lib-1.1.9 library source to be specific.
Problems:
Using the build procedure in the INSTALL file, it appeared to build but I could not find a libasound.so file anywhere.
I also tried the recommended procedure for static linking, also from the INSTALL file. That gives a ./src/.libs/libasound.a file (indeed, this gets generated on a dynamic link as well, which I don't understand). However, linking with that produces (after adding back a few missing libs): samiam@samiam-linux-pc:~/scratch$ ./hello This is a test program ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
Your config files (perhaps from the distribution?) refer to the ALSA pulse plugin which is in the alsa-plugins package. Fix the configuration files or compile alsa-plugins, too.
Jaroslav
Thanks!
--------- Original Message --------- Subject: Re: [alsa-devel] Building the alsa library From: "Jaroslav Kysela" perex@perex.cz Date: 6/16/19 5:11 am To: "scott andrew franco" samiam@moorecad.com, alsa-devel@alsa-project.org
Dne 15. 06. 19 v 22:41 scott andrew franco napsal(a):
Hi,
I have been trying to solve a difficult issue using the ALSA library. To solve it, I need to be able to debug into the ALSA library.
I tried to build it from the sources, from the alsa-lib-1.1.9 library source to be specific.
Problems:
Using the build procedure in the INSTALL file, it appeared to build but I could not find a libasound.so file anywhere.
I also tried the recommended procedure for static linking, also from the INSTALL file. That gives a ./src/.libs/libasound.a file (indeed, this gets generated on a dynamic link as well, which I don't understand). However, linking with that produces (after adding back a few missing libs): samiam@samiam-linux-pc:~/scratch$ ./hello This is a test program ALSA lib conf.c:3558:(snd_config_hooks_call) Cannot open shared library libasound_module_conf_pulse.so (/usr/lib/alsa-lib/libasound_module_conf_pulse.so: libasound_module_conf_pulse.so: cannot open shared object file: No such file or directory)
Your config files (perhaps from the distribution?) refer to the ALSA pulse plugin which is in the alsa-plugins package. Fix the configuration files or compile alsa-plugins, too.
Jaroslav
-- Jaroslav Kysela perex@perex.cz Linux Sound Maintainer; ALSA Project; Red Hat, Inc. _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel
participants (2)
-
Jaroslav Kysela
-
scott andrew franco