[Openal] Problems with ALSA and the Sample implementation

Chris Robinson chris.kcat at gmail.com
Thu Jul 26 20:10:48 PDT 2007


On Thursday 26 July 2007 05:36:53 pm Troy Yee wrote:
> My first issue came when trying to make (after autoconf.sh and
> configure). I'm building 32-bit apps on a x86_64 version of Red
> Hat Enterprise Linux 4, Update 4.  I encountered an error with
> an undefined symbol (PTHREAD_MUTEX_RECURSIVE) in al_mutexlib.c. 
> This symbol should come from <pthread.h> but apparently only
> if the symbol __USE_UNIX98 is defined.  I'm not sure how that
> symbol is meant to get defined... presumably by setting some
> other symbol or by including the appropriate file prior to
> <pthread.h>.

Hmm. It appears defining _GNU_SOURCE, which is defined during the cmake build 
process, will also allow PTHREAD_MUTEX_RECURSIVE, which I suppose makes it 
set __USE_UNIX98 somewhere. I'm not quite sure which should be explicitly 
used, and where (in the cflags or in al_threadlib.c).

> My second problem came when attempting to configure with ALSA
> explicitly enabled.  The log resulting from executing configure
> indicated that it failed to find ALSA.  The reason for the
> failure was a failed compilation because a type in
> <alsa/asoundlib.h> was 'incompletely defined'.  I think this
> is because the <time.h> file is not included prior to the
> definition.  I modified the configure script to include
> <time.h> prior to <asoundlib.h> and the configure script
> then succeeded (with respect to ALSA support).  RHEL4 ships with
> alsa-lib-devel-1.0.6-5.RHEL4.  Is something broken with
> autogen.sh, configure, or RHEL4 ALSA here?

I'd wager to think RHEL4 ALSA. I've never had any problem, and a header should 
include system libs it needs to define types it uses. Is there any way you 
can upgrade ALSA? Gentoo stable seems to be currently using 1.0.14-rc2.

> alcOpenDevice(NULL) fails.  If I have no
> .openalrc file, I get no informational messages.  If I have
> .openalrc with (define devices '(alsa)) and (define alsa-out-
> device "plug:dmix") I get the following from ALSA
>    ALSA lib pcm_dmix.c:868:(snd_pcm_dmix_open) unable to open slave.

Do you have OSS support working in other apps? It's odd that it fails with 
no .openalrc, since it should (at worst) open a Null devince which just 
discards output. But it should also try SDL and a wave writer, which are 
unlikely to fail. Try using:
(define alsa-out-device "default")
Do you have an .asoundrc file, by chance?



More information about the Openal mailing list