# openal-0.0.8 (openal 20060211_12) fails to build



## ColdfireMC (Sep 8, 2012)

hi.
 I'm trying to build audio/openal from ports but it fails. Here's a log

http://pastebin.com/x8q0PExa (don't know how to embed pastebins in this page sorry)

and here are compiler's error messages

```
In file included from /usr/local/include/alsa/asoundlib.h:51,
                 from backends/alc_backend_alsa.c:44:                                                                             
/usr/local/include/alsa/error.h:64:16: warning: anonymous variadic macros were introduced in C99                                  
/usr/local/include/alsa/error.h:65:16: warning: anonymous variadic macros were introduced in C99                                  
In file included from /usr/local/include/alsa/asoundlib.h:52,
                 from backends/alc_backend_alsa.c:44:
/usr/local/include/alsa/conf.h:126: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/conf.h:135: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/conf.h:142: warning: ISO C90 does not support 'long long'
In file included from /usr/local/include/alsa/asoundlib.h:81,
                 from backends/alc_backend_alsa.c:44:
/usr/local/include/alsa/pcm.h:477: error: expected identifier or '(' before '/' token
In file included from /usr/local/include/alsa/asoundlib.h:85,
                 from backends/alc_backend_alsa.c:44:
/usr/local/include/alsa/control.h:395: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:396: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:397: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:419: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:419: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:419: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:452: warning: ISO C90 does not support 'long long'
/usr/local/include/alsa/control.h:457: warning: ISO C90 does not support 'long long'
In file included from /usr/local/include/alsa/asoundlib.h:86,
                 from backends/alc_backend_alsa.c:44:
/usr/local/include/alsa/mixer.h:202: warning: comma at end of enumerator list
backends/alc_backend_alsa.c: In function 'openal_load_alsa_library':
backends/alc_backend_alsa.c:126: warning: implicit declaration of function 'dlvsym'
backends/alc_backend_alsa.c:126: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:126: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:127: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:127: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:128: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:128: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:129: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:129: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:130: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:130: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:131: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:131: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:132: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:132: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:133: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:133: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:134: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:134: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:137: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:137: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:138: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:138: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:139: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:139: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:140: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:140: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:141: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:141: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:142: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:142: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:143: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:143: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:144: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:144: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:145: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:145: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:146: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:146: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:147: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:147: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:148: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:148: warning: ISO C forbids assignment between function pointer and 'void *'
backends/alc_backend_alsa.c:149: warning: assignment makes pointer from integer without a cast
backends/alc_backend_alsa.c:149: warning: ISO C forbids assignment between function pointer and 'void *'
```

now I'm with a custom make.conf, but I repeat this with a default make.conf and nothing changed, but I will paste it here anyway


```
WITH_CUPS=YES
CUPS_OVERWRITE_BASE=YES
WITHOUT_LPR=YES
USE_OPENAL=alut
USE_TK=86
USE_TCL=86
# added by use.perl 2012-09-07 10:14:20
PERL_VERSION=5.16.0
```

I'm using FreeBSD 9.1-PRERELEASE, my ports tree is up to date(today)(I think)using cvsup

thanks


----------



## SirDice (Sep 10, 2012)

ColdfireMC said:
			
		

> ```
> USE_OPENAL=alut
> USE_TK=86
> USE_TCL=86
> ```


Remove these, they are not supposed to be used in make.conf.


----------



## ColdfireMC (Sep 10, 2012)

SirDice said:
			
		

> Remove these, they are not supposed to be used in make.conf.



Done; and I have removed freealut too, nothing happenned . Seems to be a problem with openal's(si) alsa backend... It is possible to completely remove alsa backend and use aRTS instead? Can this error be related with a specific alsa(utils/libs)version? 

I know that can use openal-soft, but I have adequate hardware to support real openal, I don't want to waste it.

Thanks for your help


----------



## ColdfireMC (Nov 1, 2012)

Openal is still not building, same error.


----------



## ColdfireMC (May 21, 2013)

FIXED!

audio/openal builds when the Alsa backend is disabled. To disable it, add --disable-alsa to a line of Makefile which passed configuration flags. It's a quick and dirty solution, but works.

For example this is my Makefile:


```
# Created by: Thomas Gellekum <tg@FreeBSD.org>
# $FreeBSD: audio/openal/Makefile 316287 2013-04-22 23:19:08Z bapt $

PORTNAME=	openal
PORTVERSION=	20060211
PORTREVISION=	12
CATEGORIES=	audio
MASTER_SITES=	http://openal.org/openal_webstf/downloads/
DISTVERSION=	0.0.8

MAINTAINER=	erik@bz.bzflag.bz
COMMENT=	A 3D positional spatialized sound library

CONFLICTS=	openal-soft-[0-9]*

USE_AUTOTOOLS=	libtool
GNU_CONFIGURE=	yes
CPPFLAGS+=	-I${LOCALBASE}/include
LDFLAGS+=	-L${LOCALBASE}/lib
CONFIGURE_ARGS=	--enable-capture
USE_GMAKE=	yes
USES=		pathfix pkgconfig
WANT_SDL=	yes
USE_LDCONFIG=	yes

OPTIONS_DEFINE=	ARTS ESOUND SDL VORBIS SMPEG
SMPEG_DESC=	smpeg support

.include <bsd.port.options.mk>

.if ${PORT_OPTIONS:MSMPEG}
WITH_SDL=	yes	# smpeg requires SDL
.endif

.if ${PORT_OPTIONS:MARTS}
LIB_DEPENDS+=	artsc.0:${PORTSDIR}/audio/arts
CONFIGURE_ARGS+=--enable-arts --disable-alsa
.else
CONFIGURE_ARGS+=--disable-arts
.endif

.if ${PORT_OPTIONS:MESD}
USE_GNOME+=	esound
CONFIGURE_ARGS+=--enable-esd
.else
CONFIGURE_ARGS+=--disable-esd
.endif

.if ${PORT_OPTIONS:MSDL}
USE_SDL+=	sdl
CONFIGURE_ENV+=	HAVESDL="${SDL_CONFIG}"
CONFIGURE_ARGS+=--enable-sdl
.else
CONFIGURE_ARGS+=--disable-sdl
.endif

.if ${PORT_OPTIONS:MVORBIS}
LIB_DEPENDS+=	vorbisfile.6:${PORTSDIR}/audio/libvorbis
CONFIGURE_ARGS+=--enable-vorbis
.else
CONFIGURE_ARGS+=--disable-vorbis
.endif

.if ${PORT_OPTIONS:MSMPEG}
LIB_DEPENDS+=	smpeg.1:${PORTSDIR}/multimedia/smpeg
CONFIGURE_ARGS+=--enable-smpeg
.else
CONFIGURE_ARGS+=--disable-smpeg
.endif

.if ${ARCH} == "i386"
OPTIONS+=	X86_ASM "Enable x86 assembly code" on
.if !defined(WITHOUT_X86_ASM)
BUILD_DEPENDS+=	nasm:${PORTSDIR}/devel/nasm
.endif
.endif

NOT_FOR_ARCHS=	ia64
NOT_FOR_ARCHS_REASON_ia64=	does not compile

post-patch:
	@${REINPLACE_CMD} -e 's/-pthread/${PTHREAD_LIBS}/; \
		s/x86_64\*/amd64\* | \*ia64\*/g; \
		/CPPFLAGS=/ d; s/ \*linux\*)/ \*bsd\*)/' ${WRKSRC}/configure
	@${REINPLACE_CMD} -e '/#include/ s|SDL/||' \
		${WRKSRC}/src/extensions/al_ext_mp3.c
	@${REINPLACE_CMD} -e 's|"mixaudio16_mmx_prk.h"|"arch/i386/mixaudio16_mmx_prk.h"|' \
		${WRKSRC}/src/mixaudio16.h
	@${REINPLACE_CMD} -e 's|@requirements@||; \
		s|Libs: |&${PTHREAD_LIBS} |;\
		s|Cflags: |&${PTHREAD_CFLAGS} |' \
		${WRKSRC}/admin/pkgconfig/openal.pc.in
.if defined(WITHOUT_X86_ASM)
	@${REINPLACE_CMD} -e '/^NASM=/ s|=.*|=no|' ${WRKSRC}/configure
.endif

post-install:
	@${CAT} ${PKGMESSAGE}

.include <bsd.port.mk>
```


----------

