OgreAL on Linux

CaseyB

08-12-2007 02:16:34

The current release of OpenAL is 1.1, but the latest Linux release is 0.8. I actually use a feature that is not in the 0.8 release so if you are going to use OgreAL on a Linux System you'll need to grab the SVN Head version and build it yourself.

The first thing you'll need to do is remove any versions of OpenAL that are on your system currently and verify that all of the libopenal.so files are gone form /usr/local/lib and /usr/lib and that the AL folder is no longer in /usr/local/include or /usr/include. Next you want to make sure that /usr/local/lib is in your /etc/ld.so.conf. Then you check out from the OpenAL SVN repo.

svn co http://opensource.creative.com/repos/openal/trunk openal

Change to the OpenAL-Sample directory

cd openal/OpenAL-Sample

And build and install Openal using the following commands.

./autogen.sh
./configure
make
sudo make install
sudo ldconfig


Now you'll need to completely rebuild OgreAL using the following commands:
./bootstrap
./configure
make
sudo make install

libolt

08-12-2007 04:31:23

I just purged my ubuntu openal/alut packages and built them from the latest SVN and it indeed fixes the problems I was having. The bonus is that OpenAL builds via CMake too. :)

Now if we can just prod them into a 1.1 release for *nix everything will be good.

Thanks for the heads up.

Mike

Game_Ender

08-12-2007 04:33:00

You have to clarify what you mean by "Linux", Linux is the name of kernel and generic name for all distros which use it. In this case I assume you mean something like Ubuntu only has 0.8, but I can't tell. Gentoo has openal 1.2, so you can't mean all linux distros.

EDIT: Apparently Ubuntu == Linux :?

libolt

08-12-2007 04:53:33

As CaseyB said the latest OpenAL release for Linux/*nix according to openal.org is 0.0.8 while the freealut release is 1.1.0. Now my Debian, Ubuntu and FreeBSD installs all use the released versions of openal/alut. Other distros may choose to use a certain snapshot of the SVN tree, but they're not an official release.

Mike

CaseyB

08-12-2007 08:24:16

EDIT: Apparently Ubuntu == Linux :?
Actually the box that I play with is Fedora, and it's at 0.8 as well.

slanning

08-12-2007 22:57:53

I actually was hacking on it last night on linux and with whatever Ubuntu has,
which I think is the 0.0.8 you're talking about. Here's notes on what I did
to get things kind of working (compiling and some tests working).


Downloaded it by svn,


$ svn co https://ogreal.svn.sourceforge.net/svnroot/ogreal/trunk/OgreAL-Eihort



$ cd OgreAL-Eihort
$ ./bootstrap
You should update your `aclocal.m4' by running aclocal.
' is already registered with AC_CONFIG_FILES.
../../lib/autoconf/status.m4:300: AC_CONFIG_FILES is expanded from...
configure.ac:38: the top level


(Note: ignore that first sentence, as bootstrap does what it says for you.)

This turned out to be because configure.ac is in DOS text format.
In fact, the Makefile.am are in DOS format also, so I ended up
doing this to convert any config* and Makefile* files from DOS
to Unix format:


$ find . -not -path '*.svn*' \
-exec perl -le'if($ARGV[0]=~/(Make|conf)/&&<>=~/\r\n/s){exit}else{exit 1}' {} \; \
-exec perl -i~ -pe's/\r\n/\n/g' {} \;


Try again:


$ ./bootstrap
You should update your `aclocal.m4' by running aclocal.
configure.ac: installing `./install-sh'
Demos/Basic_Demo/Makefile.am: installing `./depcomp'
configure.ac:38: required file `Demos/PlayPen_Demo/Makefile.in' not found


Panic? Nah... The directory Demos/PlayPen/ was named wrong,
it should've been called PlayPen_Demo like the others.
We have to let configure.ac know that:


$ diff -u configure.ac.~1~ configure.ac > ../playpen-conf.diff
$ cat ../playpen-conf.diff
--- configure.ac.~1~ 2007-12-08 00:26:28.000000000 +0100
+++ configure.ac 2007-12-08 00:35:23.000000000 +0100
@@ -46,7 +46,7 @@
Demos/Doppler_Demo/Makefile \
Demos/ManySources_Demo/Makefile \
Demos/MultiChannel_Demo/Makefile \
- Demos/PlayPen_Demo/Makefile \
+ Demos/PlayPen/Makefile \
OgreAL.pc])

AC_OUTPUT


Try again:


$ ./bootstrap


Wunderbar!

I like to install in my home directory (using --prefix) instead of
system wide, since I'm just playing:


$ ./configure --prefix=$HOME/.ogreal-install
$ make
...
make[2]: Entering directory `/home/slanning/games/ogreal/src/OgreAL-Eihort/Demos/Basic_Demo'
if g++ -DHAVE_CONFIG_H -I. -I. -I../../include -I../../include -DOGRE_GUI_GLX -DOGRE_CONFIG_LITTLE_ENDIAN -I/usr/include/OGRE -I/usr//include/OIS -I/usr//include -g -O2 -MT Listener.o -MD -MP -MF ".deps/Listener.Tpo" -c -o Listener.o Listener.cpp; \
then mv -f ".deps/Listener.Tpo" ".deps/Listener.Po"; else rm -f ".deps/Listener.Tpo"; exit 1; fi
Listener.cpp: In constructor 'DeviceListener::DeviceListener(Ogre::RenderWindow*, Ogre::Camera*, Ogre::SceneManager*)':
Listener.cpp:41: error: 'class OIS::InputManager' has no member named 'numKeyboards'
make[2]: *** [Listener.o] Error 1
...


This error is because somebody stupidly renamed some
methods between OIS versions 0.99+1.0rc1 and 1.0,
and Ubuntu is using 0.99+1.0rc1.

Either write your congressperson, or install version 1.0.
Again, I do this in my home directory instead of blasting
away the Ubuntu packages:


$ tar -zxf ois-1.0.tar.gz
$ cd ois/
$ ./bootstrap
$ ./configure --prefix=$HOME/.ois-install
$ make
$ make install


Then rebuild OgreAL, telling it where OIS is (see `./configure --help`,
and `pkg-config --cflags OIS` and `pkg-config --libs OIS` for examples).


$ make distclean
$ export OIS_CFLAGS="-I$HOME/.ois-install/include"


(Note: even though `pkg-config --cflags OIS` has "-I/usr/include/OIS"
you must not add "/OIS" to OIS_CFLAGS, because Demos*/Listener.h
do #include "OIS/OISInputManager.h" with the OIS/ already in front;
otherwise, if you have OIS installed system-wide (with the Ubuntu package),
it will still pick up that one!)


$ export OIS_LIBS="-L$HOME/.ois-install/lib -lOIS"
$ ./bootstrap
$ ./configure --prefix=$HOME/.ogreal-install
$ make
$ make install


Now we can try the demos.


$ cd Demos/bin/
$ ./Basic


After doing the normal OGRE sample dialog, I get this error:


*-*-* OgreAL Initialization
MovableObjectFactory for type 'OgreAL_Sound' registered.
MovableObjectFactory for type 'OgreAL_Listener' registered.
*-*-* Creating OpenAL
OpenAL Devices
--------------
OGRE EXCEPTION(40961:): Failed to open Device: OpenAL Error: The specified source name is not valid in initializeDevice
An exception has occured: OGRE EXCEPTION(40961:): Failed to open Device: OpenAL Error: The specified source name is not valid in initializeDevice
OGRE EXCEPTION(40961:): Failed to open Device: OpenAL Error: The specified source name is not valid in initializeDevice


Panic? Not yet, not yet... Someone had this problem recently:
http://www.ogre3d.org/phpBB2addons/view ... 4259#34259

I patched (open-device.diff) up OgreALSoundManager.cpp according to the code
he put there, and it works now! That's really cool how the sound works
in the 3D scene. (I know that's the whole point, but I think it's neat. :)
Apparently there was a change in OpenAL or something,
and Ubuntu uses version >= 1.

The only problem left is that this happens when you quit the application:


*-*-* OgreAL Shutdown
OGRE EXCEPTION(40961:): Failed to destroy source: OpenAL Error: The specified source name is not valid in ~SoundManager
An exception has occured: OGRE EXCEPTION(40961:): Failed to destroy source: OpenAL Error: The specified source name is not valid in ~SoundManager
OGRE EXCEPTION(40961:): Failed to destroy source: OpenAL Error: The specified source name is not valid in ~SoundManager


Seems fixable, but I didn't look at it.

When I do the MultiChannel demo, it fails with:


OGRE EXCEPTION(40963:): Could not generate buffer: OpenAL Error: The value pointer given is not valid in generateBuffers
OGRE EXCEPTION(40961:): Failed to delete Buffers, must still be in use.: OpenAL Error: The specified source name is not valid in ~Sound
An exception has occured: OGRE EXCEPTION(40963:): Could not generate buffer: OpenAL Error: The value pointer given is not valid in generateBuffers
OGRE EXCEPTION(40963:): Could not generate buffer: OpenAL Error: The value pointer given is not valid in generateBuffers


Maybe it's related to the problem above, in particular the patch,
again I didn't look at it.

But the other two demos work, Doppler and Directional.
(Though, and maybe it's just because they're demos,
the sound quality is a bit....not right...)

The PlayPen and ManySources demos didn't build.
That was because Demos/Makefile.am hadn't been
updated with them. But maybe that's intended,
because they give errors:


$ ./PlayPen
...
An exception has occured: OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for RhinoJump.wav automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at OgreResourceGroupManager.cpp (line 1366)
OGRE EXCEPTION(5:ItemIdentityException): Unable to derive resource group for RhinoJump.wav automatically since the resource was not found. in ResourceGroupManager::findGroupContainingResource at OgreResourceGroupManager.cpp (line 1366)


Hmm, maybe just that RhinoJump.wav is missing from Demos/Media/Audio/ .


$ ./ManySources
...
OGRE EXCEPTION(40962:): Failed to set offset: OpenAL Error: The specified parameter is not valid in setSecondOffset
*-*-* OgreAL Shutdown
OGRE EXCEPTION(40962:): Failed to set offset: OpenAL Error: The specified parameter is not valid in setSecondOffset
terminate called after throwing an instance of 'Ogre::Exception'
what(): OGRE EXCEPTION(40962:): Failed to set offset: OpenAL Error: The specified parameter is not valid in setSecondOffset
Aborted (core dumped)


Heehee...

Patches:

open-device.diff

--- src/OgreALSoundManager.cpp-bak 2007-12-08 01:44:04.000000000 +0100
+++ src/OgreALSoundManager.cpp 2007-12-08 03:43:10.000000000 +0100
@@ -589,6 +589,18 @@
ss.clear(); ss.str("");

}



+#if defined(ALUT_API_MAJOR_VERSION) && ALUT_API_MAJOR_VERSION >= 1

+ if (!alutInit(NULL, NULL))

+ {

+ ALenum error = alutGetError();

+ CheckError(error, "Failed to initialize alut");

+ }

+ else

+ {

+ mContext = alcGetCurrentContext();

+ CheckCondition(mContext != NULL, 13, "Failed to get current OpenAL Context");

+ }

+#else

// If the suggested device is in the list we use it, otherwise select the default device

mDevice = alcOpenDevice(deviceInList ? deviceName.c_str() : NULL);

CheckError(alcGetError(mDevice), "Failed to open Device");

@@ -603,6 +615,7 @@


alcMakeContextCurrent(mContext);

CheckError(alcGetError(mDevice), "Failed to set current context");

+#endif

}



void SoundManager::checkFeatureSupport()

--- include/OgreALPrereqs.h.~1~ 2007-12-08 01:12:35.000000000 +0100
+++ include/OgreALPrereqs.h 2007-12-08 03:35:15.000000000 +0100
@@ -51,6 +51,7 @@
#elif OGRE_COMPILER == OGRE_COMPILER_GNUC

# include "AL/al.h"

# include "AL/alc.h"

+ # include "AL/alut.h"

# if defined(OGRE_AL_EXPORT) && OGRE_COMP_VER >= 400

# define OgreAL_Export __attribute__ ((visibility("default")))

# else



add-new-demos.diff

--- Demos/Makefile.am.~1~ 2007-12-08 01:12:35.000000000 +0100
+++ Demos/Makefile.am 2007-12-08 04:16:39.000000000 +0100
@@ -1,3 +1,3 @@
# EXTRA_DIST=Media
-SUBDIRS=bin Basic_Demo Directional_Demo Doppler_Demo MultiChannel_Demo
+SUBDIRS=bin Basic_Demo Directional_Demo Doppler_Demo MultiChannel_Demo ManySources_Demo PlayPen


CaseyB

09-12-2007 04:17:46

Wow! Great post, thanks!

You were still getting the Failed to open Device: OpenAL Error huh? I am going to have to get on my Linux box and play with it to see if I can figure it out. I just did a lot of work to remove alut as a dependency, so I am really reticent to add it back in. I will take a look at it and see if I can get it fixed. I am also confused about the Failed to Destroy Source issue, I don't get that on Windows, something else I'll look into.

The problem with the MultiChannel Demo is probably because your sound card doesn't support multi-channel output. Similarly, the ManySource_Demo may not work because the AL_TIME_OFFSET functionality is new to OpenAL 1.1 and may not be in the version on your box. I can #if that out based on version I guess.

Thank you so much for your patches to the autotools files! I really need to learn to do those on my own!

slanning

11-12-2007 17:48:34

I'm afraid that when I tried again last night using the newest svn of OgreAL and OpenAL, it had the same problem:

$ cd Demos/bin/
$ ./Basic
[....]
*-*-* OgreAL Initialization
MovableObjectFactory for type 'OgreAL_Sound' registered.
MovableObjectFactory for type 'OgreAL_Listener' registered.
*-*-* Creating OpenAL
OpenAL Devices
--------------
* Open Sound System (OSS)
* Simple DirectMedia Layer (SDL)
* Null Driver
* Wave File Writer
OGRE EXCEPTION(13:): Failed to open audio device in initializeDevice
An exception has occured: OGRE EXCEPTION(13:): Failed to open audio device in initializeDevice
OGRE EXCEPTION(13:): Failed to open audio device in initializeDevice

I don't know if the problem is the OpenAL-Sample implementation for Linux, or what, but getDeviceList returns nothing and then initializeDevice doesn't like to alcOpenDevice(NULL).

slanning

11-12-2007 19:17:00

I found from googling, that I could add this in a ~/.openalrc file :

(define devices '(alsa dsp arts esd alsa native arts esd null))
(define alsa-device "default")
;;(define speaker-num 2)
(define sampling-rate 22050) ;; Was 44100

and now it works. I'm not sure which part of it is important, the "define devices" part I assume.

However, now it gives this error which I mentioned before when I close the application:

*-*-* OgreAL Shutdown
OGRE EXCEPTION(40964:): Failed to destroy source: OpenAL Error: There is no current context in ~SoundManager
An exception has occured: OGRE EXCEPTION(40964:): Failed to destroy source: OpenAL Error: There is no current context in ~SoundManager
OGRE EXCEPTION(40964:): Failed to destroy source: OpenAL Error: There is no current context in ~SoundManager

CaseyB

11-12-2007 21:24:51

I think you're right about the defining devices, where it was crashing before was while trying to enumerate the available devices. This might be a good alternative to folks who don't want to update to OpenAL's SVN Head!

Yeah, I am trying to debug the crash on destroying Sounds. It's odd that it only happens on Linux, but that's all part of the fun of supporting multiple platforms!!

kungfoomasta

11-12-2007 21:37:15

I love your energy! 8)

libolt

12-12-2007 01:46:17

I've tried the latest SVN with openal on an AMD64 Ubuntu install and I still get the the same crashes, even with slanning's suggestion of an ~/.openalrc file.

I've even tried different settings in .openalrc to no avail with Openal 0.8 from ubuntu packages.

CaseyB

12-12-2007 03:34:37

I'll add some info in the first post about how to get the latest from SVN since I had a bit of trouble since it's not terribly intuitive!

slanning

13-12-2007 15:41:37

I'm hoping to get Perl bindings of OgreAL working this weekend.
One thing I noticed while working on it last night was that
the OgreAL.pc file hasn't been updated since 0.1.
Since there are apparently API changes and fixes,
it'd be helpful if I can check whether the user has >= 0.2.
Thanks

CaseyB

13-12-2007 18:13:40

I'll get that fixed! Thanks!

CaseyB

13-12-2007 19:10:10

Ok, it's fixed now, along with a couple of other Linux tweaks.

slanning

13-12-2007 19:38:18

Cool, thanks

libolt

14-12-2007 01:37:20

I am still having issues even with the latest checkout on my AMD64/x86_64 systems. It still throws the 'Failed to open Device' exception:


*-*-* Creating OpenAL
OpenAL Devices
--------------
OGRE EXCEPTION(40961:): Failed to open Device: OpenAL Error: The specified source name is not valid in initializeDevice
An exception has occured: OGRE EXCEPTION(40961:): Failed to open Device: OpenAL Error: The specified source name is not valid in initializeDevice
OGRE EXCEPTION(40961:): Failed to open Device: OpenAL Error: The specified source name is not valid in initializeDevice



I am using revision 103. My current ~/.openalrc looks like this:


(define devices '(alsa native null))
(define alsa-device "default")
(define speaker-num 2)
(define sampling-rate 44100)


OgreAL DOES work on the 32-bit ubuntu Gutsy install on my laptop. However my 2 Ubuntu 64-bit systems as well as my Debian 64-bit file server throw the same exception and exit.

Mike

CaseyB

14-12-2007 05:54:23

Some people have had success with modifying the .openalrc file and others have not. I am running a x86_64 version of Fedora 7 and it had trouble until I updated OpenAL from SVN. I hate to disable it completely for Linux systems. I am going to think about how to handle this, in the mean time, here's a patch that should take care of the issue.DELETED THIS ABOMINATION

libolt

14-12-2007 06:33:30

Yeah I've tried messing around with .openalrc.

However the patch does work for my amd64 systems. I'll keep it in place on those systems. Maybe someday soon the OpenAL folks will push out 1.1 for Linux/Unix.

Thanks for all your hard work.

Mike

CaseyB

14-12-2007 07:22:27

They say that the SVN is close to 1.1, but I think by the time they get *nix to 1.1, Window will be up another version! :?

CaseyB

14-12-2007 10:43:43

libolt,

Please update! I have fixed it so that OgreAL tests the version of OpenAL and makes a better decision on how to open the device! The hack that I posted earlier should no longer be needed!

libolt

14-12-2007 16:11:53

CaseyB,

Unfortunately I'm still getting the same error though it does print:


OpenAL Version: 1.0


after:


*-*-* Creating OpenAL


Thanks for your help.

Mike

CaseyB

14-12-2007 18:03:19

Ok, I fixed it, I made a mistake, apparently device enumeration wasn't added until 1.1. Sorry about that!

libolt

14-12-2007 18:28:13

That fixed it. :)

Thanks for all the hard work.

Mike

CaseyB

14-12-2007 18:50:52

Glad I could help! ;)

slanning

15-12-2007 20:52:42

I don't know if it's relevant in this case, but I found that I had to set
PKG_CONFIG_PATH=$HOME/.openal-install/lib/pkgconfig/:$PKG_CONFIG_PATH
where the first part is openal.pc is for my local installation of openal,
when compiling against OgreAL. Otherwise it linked against the older
version of openal, and I'd get the empty device lists.
Just something to keep in mind, I guess.

Valmer

28-02-2008 11:18:47

It seems that the include/Makefile.am is out dated.

it looks like
pkginclude_HEADERS = OgreAL.h OgreALListener.h OgreALOggSound.h OgreALPrereqs.h OgreALSound.h OgreALSoundManager.h OgreALWavSound.h OgreALException.h

That make some link errors when compiling.
Should add OgreALMemberFunctionPointer.h to the list.

pkginclude_HEADERS = OgreAL.h OgreALListener.h OgreALOggSound.h OgreALPrereqs.h OgreALSound.h OgreALSoundManager.h OgreALWavSound.h OgreALException.h OgreALMemberFunctionPointer.h

(Thanks for youre great job!)

subquantum

28-03-2008 02:13:47

Hey - I have the latest SVN checkout of OgreAL, along with the latest OpenAL, running on Ubuntu, and I still get "Failed to delete Buffers, must still be in use.: OpenAL Error: The specified source name is not valid in ~Sound" whenever I delete a sound. Eventually, something else (Such as "Failed to unqueue Buffers: OpenAL Error: The specified source name is not valid in unqueueBuffers" or a number of problems in setSecondOffset) crashes the program after a number of sounds are deleted, and my debugging suggests that the sound Buffer is null, but not the Source that's trying to use it. I'm not terribly familiar with OpenAL, so I couldn't figure out much more... Someone mentioned this problem earlier and CaseyB said he was working on it, but apparently there's been little progress; I'd love to be of help, if anyone can come up with a possible cause...

gmagno

10-07-2008 02:04:56

Hello,

I uninstalled OpenAL as you said. Then i did:

cd openal/OpenAL-Sample

./autogen.sh
./configure
make

The problem comes here, when i try to make... I get this error:

Making all in arch
make[3]: Entering directory `/home/gmagno/Desktop/openal/OpenAL-Sample/src/arch'
Making all in i386
make[4]: Entering directory `/home/gmagno/Desktop/openal/OpenAL-Sample/src/arch/i386'
/bin/bash ../../../libtool --mode=link gcc -g -O2 -o libx86_asm_routines.la x86_cpu_caps_detect_prk.lo memcpy_mmx_prk.lo -lpthread -ldl
ar cru .libs/libx86_asm_routines.a .libs/x86_cpu_caps_detect_prk.o .libs/memcpy_mmx_prk.o
ar: .libs/x86_cpu_caps_detect_prk.o: No such file or directory
make[4]: *** [libx86_asm_routines.la] Error 1
make[4]: Leaving directory `/home/gmagno/Desktop/openal/OpenAL-Sample/src/arch/i386'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/gmagno/Desktop/openal/OpenAL-Sample/src/arch'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/gmagno/Desktop/openal/OpenAL-Sample/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/gmagno/Desktop/openal/OpenAL-Sample'
make: *** [all] Error 2


Any idea of what the problem might be?

Thnx in advance,
gmagno



PS- before this i was having problems with yasm, so i uninstalled it. I still have nasm.

nikki

12-08-2008 10:42:10

I'm having the same error as gmagno above. Any idea how to fix it? (I'm on Ubuntu 8.04)

nikki

12-08-2008 16:12:05

Hmm, I fixed it by getting the latest 'OpenAL Soft' from the OpenAL website, and using CMake to build it.

dedesite

16-09-2008 13:18:43

Hmm, I fixed it by getting the latest 'OpenAL Soft' from the OpenAL website, and using CMake to build it.

I had the same error, but I didn't manage to fix it with the openalsoft. I used the 1.5.304 version and it install with no problem (the .so file is in /usr/local/lib) but I still got this error when trying to compil openal :


dede@dede-laptop:~/Lib/openal/OpenAL-Sample$ make
make all-recursive
make[1]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample »
Making all in admin
make[2]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample/admin »
Making all in pkgconfig
make[3]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample/admin/pkgconfig »
make[3]: Rien à faire pour « all ».
make[3]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample/admin/pkgconfig »
make[3]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample/admin »
make[3]: Rien à faire pour « all-am ».
make[3]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample/admin »
make[2]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample/admin »
Making all in src
make[2]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample/src »
Making all in arch
make[3]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample/src/arch »
Making all in i386
make[4]: entrant dans le répertoire « /home/dede/Lib/openal/OpenAL-Sample/src/arch/i386 »
/bin/bash ../../../libtool --mode=link gcc -g -O2 -o libx86_asm_routines.la x86_cpu_caps_detect_prk.lo memcpy_mmx_prk.lo -lpthread -ldl
ar cru .libs/libx86_asm_routines.a .libs/x86_cpu_caps_detect_prk.o .libs/memcpy_mmx_prk.o
ar: .libs/x86_cpu_caps_detect_prk.o: No such file or directory
make[4]: *** [libx86_asm_routines.la] Erreur 1
make[4]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample/src/arch/i386 »
make[3]: *** [all-recursive] Erreur 1
make[3]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample/src/arch »
make[2]: *** [all-recursive] Erreur 1
make[2]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample/src »
make[1]: *** [all-recursive] Erreur 1
make[1]: quittant le répertoire « /home/dede/Lib/openal/OpenAL-Sample »
make: *** [all] Erreur 2


Has anyone an idea?

EDIT : I found that in the Thunder&Ligtning website (http://tnlgame.net/content/view/33/53/1/2/) :

/bin/sh ../../../libtool --mode=link gcc -O2 -g -mmmx -msse -msse2 -o libx86_asm_routines.la x86_cpu_caps_detect_prk.lo memcpy_mmx_prk.lo -ldl
rm -fr .libs/libx86_asm_routines.la
ar cru .libs/libx86_asm_routines.a x86_cpu_caps_detect_prk.o memcpy_mmx_prk.o
ar: x86_cpu_caps_detect_prk.o: No such file or directory
make[4]: *** [libx86_asm_routines.la] Fehler 1
make[4]: Leaving directory `/home/jonas/src/portable/src/arch/i386'
make[3]: *** [all-recursive] Fehler 1
make[3]: Leaving directory `/home/jonas/src/portable/src/arch'
make[2]: *** [all-recursive] Fehler 1
make[2]: Leaving directory `/home/jonas/src/portable/src'
make[1]: *** [all-recursive] Fehler 1
make[1]: Leaving directory `/home/jonas/src/portable'
make: *** [all] Fehler 2

This is caused by an erroneous Makefile. This is a workaround:

$ cd src/arch/i386/
$ make x86_cpu_caps_detect_prk.o
$ make memcpy_mmx_prk.o
$ cd ../../..
$ make


But I try to compil x86 arch and mmx without success... :

cd src/arch/i386
dede@dede-laptop:~/Lib/openal/OpenAL-Sample/src/arch/i386$ make x86_cpu_caps_detect_prk.o
/usr/bin/yasm -f elf x86_cpu_caps_detect_prk.nasm -o x86_cpu_caps_detect_prk.o -l x86_cpu_caps_detect_prk.o.lst
x86_cpu_caps_detect_prk.nasm:77: invalid argument to [SECTION]
x86_cpu_caps_detect_prk.nasm:77: undefined symbol `.note.GNU' (first use)
x86_cpu_caps_detect_prk.nasm:77: undefined symbol `stack' (first use)
x86_cpu_caps_detect_prk.nasm:77: (Each undefined symbol is reported only once.)
make: *** [x86_cpu_caps_detect_prk.o] Erreur 1
dede@dede-laptop:~/Lib/openal/OpenAL-Sample/src/arch/i386$ make memcpy_mmx_prk.o
/usr/bin/yasm -f elf memcpy_mmx_prk.nasm -o memcpy_mmx_prk.o -l memcpy_mmx_prk.o.lst
memcpy_mmx_prk.nasm:103: invalid argument to [SECTION]
memcpy_mmx_prk.nasm:103: undefined symbol `.note.GNU' (first use)
memcpy_mmx_prk.nasm:103: undefined symbol `stack' (first use)
memcpy_mmx_prk.nasm:103: (Each undefined symbol is reported only once.)
make: *** [memcpy_mmx_prk.o] Erreur 1


Am I doing something wrong?

Thanks,
Andréas

shua

02-02-2010 19:40:52

All right, tried using "yaourt -S ogreal-svn" on archlinux and it gets all the way up to make and starts making, but then i get this error:

OgreALListener.cpp: In member function ‘virtual Ogre::MovableObject* OgreAL::ListenerFactory::createInstanceImpl(const Ogre::String&, const Ogre::NameValuePairList*)’:
OgreALListener.cpp:253: error: cannot allocate an object of abstract type ‘OgreAL::Listener’
../include/OgreALListener.h:54: note: because the following virtual functions are pure within ‘OgreAL::Listener’:
/usr/include/OGRE/OgreMovableObject.h:512: note: virtual void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor*, bool)
In file included from /usr/include/OGRE/OgreResourceGroupManager.h:32,
from /usr/include/OGRE/OgreResourceManager.h:34,
from /usr/include/OGRE/OgreArchiveManager.h:33,
from /usr/include/OGRE/Ogre.h:38,
from ../include/OgreALPrereqs.h:39,
from ../include/OgreALException.h:39,
from OgreALListener.cpp:36:
/usr/include/OGRE/OgreSingleton.h: In constructor ‘Ogre::Singleton<T>::Singleton() [with T = OgreAL::Listener]’:
OgreALListener.cpp:49: instantiated from here
/usr/include/OGRE/OgreSingleton.h:85: error: ‘Ogre::Singleton<OgreAL::Listener>’ is an inaccessible base of ‘OgreAL::Listener’
make[1]: *** [OgreALListener.lo] Error 1
make[1]: Leaving directory `/var/abs/local/yaourtbuild/ogreal-svn/src/ogreal-build/OgreAL-Eihort/src'
make: *** [all-recursive] Error 1
==> ERROR: Build Failed.
Aborting...
Error: Makepkg was unable to build ogreal-svn package.

Well, I googled and couldn't find any relevant results so, unfazed, I tried compiling with the svn build on archlinux, and I got to ". configure" before I got an error saying:

bash: error: cannot find install-sh, install.sh, or shtool in "/bin" "/bin/.." "/bin/../.."

so i tried ". configure --srcdir=src" and it got past that but then I get this:

checking for a BSD-compatible install... /bin/install -c
checking whether build environment is sane... bash: error: ls -t appears to fail. Make sure there is not a broken
alias in your environment
bash: error: newly created file is older than distributed files!
Check your system clock
i know my ls -t works, and again my google searches brought no relevant/interpretable results. Any help would be thanked and welcome. I'm now befuddled. :?

I've got Ogre-svn build 9760-1
and openAL 1.1
again, befuddled.

yaio

04-02-2010 12:02:18

but then i get this error:

OgreALListener.cpp: In member function ‘virtual Ogre::MovableObject* OgreAL::ListenerFactory::createInstanceImpl(const Ogre::String&, const Ogre::NameValuePairList*)’:
OgreALListener.cpp:253: error: cannot allocate an object of abstract type ‘OgreAL::Listener’
../include/OgreALListener.h:54: note: because the following virtual functions are pure within ‘OgreAL::Listener’:
/usr/include/OGRE/OgreMovableObject.h:512: note: virtual void Ogre::MovableObject::visitRenderables(Ogre::Renderable::Visitor*, bool)
In file included from /usr/include/OGRE/OgreResourceGroupManager.h:32,
from /usr/include/OGRE/OgreResourceManager.h:34,
from /usr/include/OGRE/OgreArchiveManager.h:33,
from /usr/include/OGRE/Ogre.h:38,
from ../include/OgreALPrereqs.h:39,
from ../include/OgreALException.h:39,
from OgreALListener.cpp:36:
/usr/include/OGRE/OgreSingleton.h: In constructor ‘Ogre::Singleton<T>::Singleton() [with T = OgreAL::Listener]’:
OgreALListener.cpp:49: instantiated from here
/usr/include/OGRE/OgreSingleton.h:85: error: ‘Ogre::Singleton<OgreAL::Listener>’ is an inaccessible base of ‘OgreAL::Listener’
make[1]: *** [OgreALListener.lo] Error 1
make[1]: Leaving directory `/var/abs/local/yaourtbuild/ogreal-svn/src/ogreal-build/OgreAL-Eihort/src'
make: *** [all-recursive] Error 1
==> ERROR: Build Failed.
Aborting...
Error: Makepkg was unable to build ogreal-svn package.


I got an analogous error compiling OgreAL under Linux, you can see here how I solved, but I don't know if this could lead to problems.

kornerr

03-04-2010 12:49:36

Your "fix" just changes the access permission, not the error.
The compiler complains about abstract function not being defined within the inherited class (Listener, in our case). The source code of OgreALListener.h reveals the following:
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR == 6
/** Overridden from MovableObject */
virtual void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false){}
#endif

So the function IS defined, but for only Ogre-1.6.
To make it work with Ogre >= 1.6 you have to change the line
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR == 6to
#if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR >= 6
It appears the library is up to Ogre-1.6 and demos are up to OIS-1.1 which both are outdated.
Apply the patch below from within the root OgreAL directory to update the sources to Ogre-1.7 and OIS-1.2 this way:
kornerr@koren:~/build/OgreAL-Eihort$ patch -p0 < ~/OgreAL_Ogre-1.7_OIS-1.2.patch
patching file include/OgreALListener.h
patching file include/OgreALSound.h
patching file Demos/Directional_Demo/Listener.cpp
patching file Demos/Basic_Demo/Listener.cpp
patching file Demos/MultiChannel_Demo/Listener.cpp
patching file Demos/PlayPen/Listener.cpp
patching file Demos/Doppler_Demo/BetaGUI.cpp
patching file Demos/Doppler_Demo/BetaGUI.h
patching file Demos/Doppler_Demo/Listener.cpp
patching file Demos/ManySources_Demo/Listener.cpp


The patch
Note that demos don't run under Ogre-1.7 anyway, but at least they compile now :)

Be aware of the line endings within the patch. SVN is stupid for this, so save the patch as is.
The patch source (in case my site goes down):
Index: include/OgreALListener.h
===================================================================
--- include/OgreALListener.h (revision 131)
+++ include/OgreALListener.h (working copy)
@@ -140,7 +140,7 @@
void _updateRenderQueue(Ogre::RenderQueue* queue);
/** Overridden from MovableObject */
void _notifyAttached(Ogre::Node* parent, bool isTagPoint = false);
- #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR == 6
+ #if OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR >= 6
/** Overridden from MovableObject */
virtual void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false){}
#endif
Index: include/OgreALSound.h
===================================================================
--- include/OgreALSound.h (revision 131)
+++ include/OgreALSound.h (working copy)
@@ -385,7 +385,7 @@
void _updateRenderQueue(Ogre::RenderQueue* queue);
/** Notifies the sound when it is attached to a node */
void _notifyAttached(Ogre::Node *parent, bool isTagPoint = false);
- #if(OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR == 6)
+ #if(OGRE_VERSION_MAJOR == 1 && OGRE_VERSION_MINOR >= 6)
/** Overridden from MovableObject */
virtual void visitRenderables(Ogre::Renderable::Visitor* visitor, bool debugRenderables = false){}
#endif
Index: Demos/Directional_Demo/Listener.cpp
===================================================================
--- Demos/Directional_Demo/Listener.cpp (revision 131)
+++ Demos/Directional_Demo/Listener.cpp (working copy)
@@ -35,12 +35,12 @@

mInputManager = OIS::InputManager::createInputSystem(params);

- if(mInputManager->numMice() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
- if(mInputManager->numKeyboards() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
@@ -98,7 +98,7 @@
mHornNode->yaw(Degree(115*evt.timeSinceLastFrame), Node::TS_WORLD);

// Move the camera
- mCamNode->translate(mPitchNode->getWorldOrientation() * mDirection * evt.timeSinceLastFrame);
+ mCamNode->translate(mPitchNode->_getDerivedOrientation() * mDirection * evt.timeSinceLastFrame);

const RenderWindow::FrameStats& stats = mWindow->getStatistics();
OverlayManager::getSingleton().getOverlayElement("TextAreaName")->setCaption(
Index: Demos/Basic_Demo/Listener.cpp
===================================================================
--- Demos/Basic_Demo/Listener.cpp (revision 131)
+++ Demos/Basic_Demo/Listener.cpp (working copy)
@@ -35,12 +35,12 @@

mInputManager = OIS::InputManager::createInputSystem(params);

- if(mInputManager->numMice() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
- if(mInputManager->numKeyboards() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
@@ -95,7 +95,7 @@
yaw = pitch = 0;

// Move the camera
- mCamNode->translate(mPitchNode->getWorldOrientation() * mDirection * evt.timeSinceLastFrame);
+ mCamNode->translate(mPitchNode->_getDerivedOrientation() * mDirection * evt.timeSinceLastFrame);

const RenderWindow::FrameStats& stats = mWindow->getStatistics();
OverlayManager::getSingleton().getOverlayElement("TextAreaName")->setCaption(
Index: Demos/MultiChannel_Demo/Listener.cpp
===================================================================
--- Demos/MultiChannel_Demo/Listener.cpp (revision 131)
+++ Demos/MultiChannel_Demo/Listener.cpp (working copy)
@@ -33,12 +33,12 @@

mInputManager = OIS::InputManager::createInputSystem(params);

- if(mInputManager->numMice() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
- if(mInputManager->numKeyboards() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
@@ -93,7 +93,7 @@
yaw = pitch = 0;

// Move the camera
- mCamNode->translate(mPitchNode->getWorldOrientation() * mDirection * evt.timeSinceLastFrame);
+ mCamNode->translate(mPitchNode->_getDerivedOrientation() * mDirection * evt.timeSinceLastFrame);

const RenderWindow::FrameStats& stats = mWindow->getStatistics();
OverlayManager::getSingleton().getOverlayElement("TextAreaName")->setCaption(
Index: Demos/PlayPen/Listener.cpp
===================================================================
--- Demos/PlayPen/Listener.cpp (revision 131)
+++ Demos/PlayPen/Listener.cpp (working copy)
@@ -33,12 +33,12 @@

mInputManager = OIS::InputManager::createInputSystem(params);

- if(mInputManager->numMice() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
- if(mInputManager->numKeyboards() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
@@ -93,7 +93,7 @@
yaw = pitch = 0;

// Move the camera
- mCamNode->translate(mPitchNode->getWorldOrientation() * mDirection * evt.timeSinceLastFrame);
+ mCamNode->translate(mPitchNode->_getDerivedOrientation() * mDirection * evt.timeSinceLastFrame);

const RenderWindow::FrameStats& stats = mWindow->getStatistics();
OverlayManager::getSingleton().getOverlayElement("TextAreaName")->setCaption("");
Index: Demos/Doppler_Demo/BetaGUI.cpp
===================================================================
--- Demos/Doppler_Demo/BetaGUI.cpp (revision 131)
+++ Demos/Doppler_Demo/BetaGUI.cpp (working copy)
@@ -32,7 +32,7 @@
mMP->setPosition(x,y);

if (mXW) {
- for(vector<Window*>::iterator i=WN.begin();i!=WN.end();i++) {
+ for(std::vector<Window*>::iterator i=WN.begin();i!=WN.end();i++) {
if(mXW==(*i)) {
delete mXW;
WN.erase(i);
Index: Demos/Doppler_Demo/BetaGUI.h
===================================================================
--- Demos/Doppler_Demo/BetaGUI.h (revision 131)
+++ Demos/Doppler_Demo/BetaGUI.h (working copy)
@@ -53,7 +53,7 @@

protected:
Overlay* mO; // Main sheet overlay
- vector<Window*>WN; // Windows
+ std::vector<Window*>WN; // Windows
Window *mXW; // Window to destroy
OverlayContainer* mMP; // Mouse Pointer Overlay
String mFont;
@@ -100,8 +100,8 @@
uint x,y,w,h; // Dimensions
GUI *mGUI; // mGUI pointer

- vector<BetaGUI::Button*> mB; // Buttons
- vector<BetaGUI::TextInput*> mT; // TextInputs
+ std::vector<BetaGUI::Button*> mB; // Buttons
+ std::vector<BetaGUI::TextInput*> mT; // TextInputs
};

class BetaGUIListener {
Index: Demos/Doppler_Demo/Listener.cpp
===================================================================
--- Demos/Doppler_Demo/Listener.cpp (revision 131)
+++ Demos/Doppler_Demo/Listener.cpp (working copy)
@@ -120,12 +120,12 @@

mInputManager = OIS::InputManager::createInputSystem(params);

- if(mInputManager->numMice() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
- if(mInputManager->numKeyboards() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
@@ -204,7 +204,7 @@
yaw = pitch = 0;

// Move the camera
- mCamNode->translate(mPitchNode->getWorldOrientation() * mDirection * evt.timeSinceLastFrame);
+ mCamNode->translate(mPitchNode->_getDerivedOrientation() * mDirection * evt.timeSinceLastFrame);

carNode->yaw(Degree(-100 * evt.timeSinceLastFrame));
soundManager->getSound("BusSound")->setVelocity(carNode->getOrientation().zAxis() * 100);
Index: Demos/ManySources_Demo/Listener.cpp
===================================================================
--- Demos/ManySources_Demo/Listener.cpp (revision 131)
+++ Demos/ManySources_Demo/Listener.cpp (working copy)
@@ -33,12 +33,12 @@

mInputManager = OIS::InputManager::createInputSystem(params);

- if(mInputManager->numMice() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISMouse) > 0)
{
mMouse = static_cast<OIS::Mouse*>(mInputManager->createInputObject(OIS::OISMouse, true));
mMouse->setEventCallback(this);
}
- if(mInputManager->numKeyboards() > 0)
+ if(mInputManager->getNumberOfDevices(OIS::OISKeyboard) > 0)
{
mKeyboard = static_cast<OIS::Keyboard*>(mInputManager->createInputObject(OIS::OISKeyboard, true));
mKeyboard->setEventCallback(this);
@@ -93,7 +93,7 @@
yaw = pitch = 0;

// Move the camera
- mCamNode->translate(mPitchNode->getWorldOrientation() * mDirection * evt.timeSinceLastFrame);
+ mCamNode->translate(mPitchNode->_getDerivedOrientation() * mDirection * evt.timeSinceLastFrame);

const RenderWindow::FrameStats& stats = mWindow->getStatistics();
OverlayManager::getSingleton().getOverlayElement("TextAreaName")->setCaption(

kornerr

03-04-2010 12:52:46

Looks like CaseyB is long gone. Can anyone apply my changes to the OgreAL repository?

Phobius

05-06-2010 05:35:06

Patch applied in r135.

paladin777

11-09-2011 16:24:44

Hi I am a newbie in OgreAL. I am trying to install OpenAL. When I want to build after executing make command, I got an error look like this:

make all-recursive
make[1]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample'
Making all in admin
make[2]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/admin'
Making all in pkgconfig
make[3]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/admin/pkgconfig'
make[3]: Nothing to be done for `all'.
make[3]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/admin/pkgconfig'
make[3]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/admin'
make[3]: Nothing to be done for `all-am'.
make[3]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/admin'
make[2]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/admin'
Making all in src
make[2]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/src'
Making all in arch
make[3]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/src/arch'
Making all in i386
make[4]: Entering directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/src/arch/i386'
test -d .libs || mkdir .libs
'# Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58)' >memcpy_mmx_prk.lo
/bin/bash: # Generated by ltmain.sh - GNU libtool 1.5 (1.1220 2003/04/05 19:32:58): No such file or directory
make[4]: *** [memcpy_mmx_prk.lo] Error 127
make[4]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/src/arch/i386'
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/src/arch'
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample/src'
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/charisma/AUDIO/OpenAL/trunk/OpenAL-Sample'
make: *** [all] Error 2



I have no idea why this is happening. Anyone want to help me?
Is it necessary to install OpenAL first before OgreAL? :(