Ubuntu 8.04 compile error solved with GCC 4.2.3
by Philippe C · in Technical Issues · 05/08/2008 (2:22 pm) · 16 replies
Hereafter the patch to apply on Torque because of the new version of GCC 4.2
If you have these errors duting compilation of openal :
Apply these patchs :
on ../torque/lib/openal/LINUX/al/alc_func.h
on ../torque/lib/openal/LINUX/al/al_func.h
If you have these errors duting compilation of openal :
--> Compiling lungif/gifalloc.c
Creating library out.GCC4.DEBUG/lungif_DEBUG.a
--> Compiling audio/audio.cc
In file included from ./platform/platformAL.h:25,
from ./platform/platformAudio.h:16,
from ./audio/audio.h:10,
from audio/audio.cc:6:
../lib/openal/LINUX/al/al_func.h:18: error: '<anonymous>' has incomplete type
../lib/openal/LINUX/al/al_func.h:18: error: invalid use of 'ALvoid'
audio/audio.cc: In function 'bool cullSource(U32*, F32)':
audio/audio.cc:252: error: too few arguments to function
audio/audio.cc: In function 'AUDIOHANDLE alxCreateSource(const Audio::Description*, const char*, const MatrixF*, AudioSampleEnvironment*)':
audio/audio.cc:731: error: too few arguments to function
audio/audio.cc: In function 'void alxLoopingUpdate()':
audio/audio.cc:1732: error: too few arguments to function
audio/audio.cc: In function 'void alxStreamingUpdate()':
audio/audio.cc:1833: error: too few arguments to function
audio/audio.cc: In function 'bool Audio::OpenALInit()':
audio/audio.cc:2414: error: too few arguments to function
audio/audio.cc:2419: error: too few arguments to function
audio/audio.cc:2441: error: too few arguments to function
make[1]: *** [out.GCC4.DEBUG/audio/audio.obj] Error 1
make: *** [default] Error 2Apply these patchs :
on ../torque/lib/openal/LINUX/al/alc_func.h
replace : AL_FUNCTION(ALCcontext*, alcGetCurrentContext, (ALCvoid), return NULL; ) by : AL_FUNCTION(ALCcontext*, alcGetCurrentContext, ( [b]void[/b] ), return NULL; )
on ../torque/lib/openal/LINUX/al/al_func.h
replace : AL_FUNCTION(ALenum, alGetError, ( ALvoid ), return AL_INVALID_VALUE; ) by : AL_FUNCTION(ALenum, alGetError, ([b] void [/b] ), return AL_INVALID_VALUE; )
#3
07/12/2008 (2:56 pm)
Thanks Phillipe
#4
11/08/2008 (10:21 pm)
Hey, i know this thread is somewhat old, but i would like to thank Philipee a bunch! This saved me some time for trying to search for it myself.
#5
12/29/2008 (11:12 am)
As would I - MUCH appreciated!
#6
01/11/2009 (3:41 pm)
Thank you; this also saved me a bunch of time :)
#7
BTW, it worked on my version of Torque (1.5.2)
02/09/2009 (8:30 pm)
Wow. This really worked. Thanks a lot!BTW, it worked on my version of Torque (1.5.2)
#8
07/15/2009 (12:41 pm)
Im't surprised too, realy work. Thanks a lot.
#9
10/25/2009 (3:33 pm)
It also works fine with gcc 4.4 ;) thx
#10
audio/audio.cc:731: error: ‘alGetError’ cannot be used as a function
audio/audio.cc: In function ‘void alxLoopingUpdate()’:
audio/audio.cc:1732: error: ‘alGetError’ cannot be used as a function
audio/audio.cc: In function ‘void alxStreamingUpdate()’:
audio/audio.cc:1833: error: ‘alGetError’ cannot be used as a function
audio/audio.cc: In function ‘bool Audio::OpenALInit()’:
audio/audio.cc:2414: error: ‘alGetError’ cannot be used as a function
audio/audio.cc:2419: error: ‘alGetError’ cannot be used as a function
audio/audio.cc:2441: error: ‘alGetError’ cannot be used as a function
make[1]: *** [out.GCC3.DEBUG/audio/audio.obj] Error 1
make: *** [default] Error 2
i made a lot of fixes about it but nothing help
can somebody help me please
01/28/2010 (11:02 pm)
i have a problem when i'm installing TGE1.5 on ubuntu 9.1 64bits and 32 bits (same problem) this is my terminal screenaudio/audio.cc:731: error: ‘alGetError’ cannot be used as a function
audio/audio.cc: In function ‘void alxLoopingUpdate()’:
audio/audio.cc:1732: error: ‘alGetError’ cannot be used as a function
audio/audio.cc: In function ‘void alxStreamingUpdate()’:
audio/audio.cc:1833: error: ‘alGetError’ cannot be used as a function
audio/audio.cc: In function ‘bool Audio::OpenALInit()’:
audio/audio.cc:2414: error: ‘alGetError’ cannot be used as a function
audio/audio.cc:2419: error: ‘alGetError’ cannot be used as a function
audio/audio.cc:2441: error: ‘alGetError’ cannot be used as a function
make[1]: *** [out.GCC3.DEBUG/audio/audio.obj] Error 1
make: *** [default] Error 2
i made a lot of fixes about it but nothing help
can somebody help me please
#11
02/09/2010 (9:33 pm)
I get the same error as Erick Johathan. I would like help also. Its for school.
#12
Please provide details on the environment you're trying to build in and the steps you've taken. If you'd like you can e-mail them to me, see my profile for the address.
@Erick
Which patches have you applied, if any?
02/10/2010 (11:51 am)
@BrianPlease provide details on the environment you're trying to build in and the steps you've taken. If you'd like you can e-mail them to me, see my profile for the address.
@Erick
Which patches have you applied, if any?
#13
quirkpowered.com/patches/tge152-openal.patch
Applying the patch:
Things I had to add: OpenAL from Creative's site, SDL from repository. Systems tested: Ubuntu 9.04 and 9.10.
The repository OpenAL from Ubuntu should probably work, but then some minor changes are needed to a couple of files.
In engine/targets.torque.mk, around line 575, change:
In mk/conf.UNIX.mk, search for "LFLAGS.GENERAL" and do this:
Then search for LINK.LIBS.VORBIS and change from:
02/10/2010 (4:22 pm)
Here's a patch to the pristine TGE 1.5.2 tree:quirkpowered.com/patches/tge152-openal.patch
Applying the patch:
wget http://quirkpowered.com/patches/tge152-openal.patch cd Torque1.5.2-Linux patch -p1 < ../tge152-openal.patchIf you have made any changes at all to the source, this won't go well.
Things I had to add: OpenAL from Creative's site, SDL from repository. Systems tested: Ubuntu 9.04 and 9.10.
The repository OpenAL from Ubuntu should probably work, but then some minor changes are needed to a couple of files.
In engine/targets.torque.mk, around line 575, change:
INCLUDES_LINUX = $(INCLUDES_BASE) -I/usr/local/include/AL -I../lib/xiph/include/theorato
INCLUDES_LINUX = $(INCLUDES_BASE) -I/usr/include/AL -I../lib/xiph/include/theoraOr wherever you happened to put OpenAl's headers. It should be either of these if you either built or installed from package, and it's the correct (latest) OpenAL version.
In mk/conf.UNIX.mk, search for "LFLAGS.GENERAL" and do this:
LFLAGS.GENERAL = -L/usr/local/libAgain change the path if your library was installed via a package.
Then search for LINK.LIBS.VORBIS and change from:
LINK.LIBS.VORBIS = -L=../lib/xiph/linux -logg -lvorbis -ltheorato
LINK.LIBS.VORBIS = -lopenal -L=../lib/xiph/linux -logg -lvorbis -ltheora
#14
www.torquepowered.com/community/forums/viewthread/110733
02/10/2010 (6:53 pm)
It's a bit simpler than all that for building on 8.10 and up (tested with 8.10 and 9.10):www.torquepowered.com/community/forums/viewthread/110733
#15
Yours is cleaner, though.
(Brian Perry got me started on it and I couldn't stop!)
02/10/2010 (7:32 pm)
Mine was for a special case - plugging in latest OpenAL, which produced quite a lot of little issues ;)Yours is cleaner, though.
(Brian Perry got me started on it and I couldn't stop!)
#16
It's my understanding that the original OpenAL is deprecated and that OpenAL Soft has more or less taken its place.
It should also be noted that the openal patch that you point to includes more than just openal fixes. In particular it includes an assembly change that has been reported to cause issues for at least some people, as referenced in the original posting of it here:
www.torquepowered.com/community/forums/viewthread/80939/1#comment-567724
Specifically: I have noticed so far is that the release build can not call any script functions
In general it's better to keep patches small and specific rather than bundling them into one larger whole. Specifically to avoid a potentially undesired change.
02/10/2010 (8:38 pm)
@Ronny,It's my understanding that the original OpenAL is deprecated and that OpenAL Soft has more or less taken its place.
It should also be noted that the openal patch that you point to includes more than just openal fixes. In particular it includes an assembly change that has been reported to cause issues for at least some people, as referenced in the original posting of it here:
www.torquepowered.com/community/forums/viewthread/80939/1#comment-567724
Specifically: I have noticed so far is that the release build can not call any script functions
In general it's better to keep patches small and specific rather than bundling them into one larger whole. Specifically to avoid a potentially undesired change.
Torque 3D Owner Jamin Collins