[alsa-devel] namehint problem...

Takashi Iwai tiwai at suse.de
Tue Jul 3 20:23:12 CEST 2007


At Tue, 03 Jul 2007 13:39:21 -0300,
Fausto Carvalho Marques SIlva wrote:
> 
> Compiling alsa-lib-1.0.14rc4 with the above options:
> 
> ./configure --disable-aload --disable-alisp --disable-instr 
> --disable-seq  --disable-hwdep  --disable-rawmidi  --with-debug=no 
> --with-pcm-plugins=hw --with-ctl-plugins=hw
> 
> 
> After the build of asound and a linking against a simple program:
> 
> #include <stdio.h>
> #include <stdlib.h>
> #include <alsa/asoundlib.h>
> 
> main (int argc, char *argv[])
> {
>     int i;
>     int err;
>     short buf[128];
>     snd_pcm_t *playback_handle;
>     snd_pcm_hw_params_t *hw_params;
> 
>     if ((err = snd_pcm_open (&playback_handle, argv[1], 
> SND_PCM_STREAM_PLAYBACK, 0)) < 0) {
>         fprintf (stderr, "cannot open audio device %s (%s)\n",
>                  argv[1],
>                  snd_strerror (err));
>         exit (1);
>     }
>     snd_pcm_close (playback_handle);
>     exit (0);
> }
> 
> 
> 
> gcc -o teste teste.c -I./include src/.libs/libasound.so.2.0.0  -ldl
> src/.libs/libasound.so.2.0.0: undefined reference to 
> `snd_hwdep_info_get_name'
> src/.libs/libasound.so.2.0.0: undefined reference to 
> `snd_rawmidi_info_get_name'
> src/.libs/libasound.so.2.0.0: undefined reference to 
> `snd_rawmidi_info_sizeof'
> src/.libs/libasound.so.2.0.0: undefined reference to 
> `snd_rawmidi_info_set_device'
> src/.libs/libasound.so.2.0.0: undefined reference to 
> `snd_hwdep_info_set_device'
> src/.libs/libasound.so.2.0.0: undefined reference to `snd_hwdep_info_sizeof'
> src/.libs/libasound.so.2.0.0: undefined reference to 
> `snd_rawmidi_info_set_stream'
> collect2: ld returned 1 exit status
> 
> 
> 
> After some verification discoverd that the problem is on 
> src/control/namehint.c that references this functions but the configure 
> removed
> rawmidi and hwdep. How can we resolve this problem?

We need simply add ifdefs around the function calls there.
I fixed on HG tree now.  Thanks for reporting!


Takashi


More information about the Alsa-devel mailing list