SFML community forums
General => General discussions => Topic started by: yttrill on February 13, 2011, 12:26:19 pm
-
I seem to have an incompatible version of OpenAl installed, possibly because I clobbered the previous one with CreativeLabs *.dmg file (while trying to build from SVN trunk instead of the branch).
Compile errors (bugs in al.h, missing enum constants).
Which OpenAl do I need?
-
Which OpenAl do I need?
The one that is in the official SFML SDK.
-
The one that is in the official SFML SDK.
Not on OS X (unless it changed recently). We need to wait for Hiura's answer.
-
Which missing enums?
are you using the al.h included with sfml? (extlibs/headers/AL/al.h)
My project compiles just fine for OSX.
-
extlibs/headers/AL/ header files are not used on OS X. CMake should have configured the project include path with the installed OpenAL framework. (On my computer this framework is in /System/Library/Frameworks/.)
What is the OPENAL_LIBRARY and OPENAL_INCLUDE_DIR variables content when you configure the project with CMake (click advanced to unhide them) ?
What OS version are you using ? Is it fully up-to-date ?
What is the full error log ?
-
I have Snow Leopard OSX 10.6.
I installed the *.dmg from Creative Labs
presumably on top of the one that came with the system.
I don't know (the installers are crap and don't tell you).
I seem to have three OpenAL's, one in System/Library
and /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework
and same again for 10.6
I do not use projects. I have no idea where to find the relavant
variables in the Makefile (or even which Makefile).
There were other errors but I patched them away. But this one
I can't fix:
[ 85%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/Sound.cpp.o
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp: In member function ‘void sf::Sound::SetPlayingOffset(float)’:
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp:121: error: ‘AL_SEC_OFFSET’ was not declared in this scope
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp: In member function ‘float sf::Sound::GetPlayingOffset() const’:
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp:146: error: ‘AL_SEC_OFFSET’ was not declared in this scope
make[2]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/Sound.cpp.o] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/all] Error 2
-
I do not use projects. I have no idea where to find the relavant
variables in the Makefile (or even which Makefile).
Run the cmake-gui front-end to see all the CMake variables that are associated to the build that you generated.
There were other errors but I patched them away. But this one
I can't fix:
Don't bother fixing and patching, you just need to clean this version mess ;)
-
I installed the *.dmg from Creative Labs
presumably on top of the one that came with the system.
That might be the problem. If needed I'll try tomorrow to install this version on a fresh 10.6 version. Can you give me the link you used to download the dmg please ? (In fact we should use the system default version.)
I seem to have three OpenAL's, one in System/Library
and /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework
Where's the third ? In 10.6 sdk folder ?
There were other errors but I patched them away.
Can you get rid of all your modifications and get a fresh copy ? It'll help me to spot the 'root' error.
-
I do not use projects. I have no idea where to find the relavant
variables in the Makefile (or even which Makefile).
Run the cmake-gui front-end to see all the CMake variables that are associated to the build that you generated.
There were other errors but I patched them away. But this one
I can't fix:
Don't bother fixing and patching, you just need to clean this version mess ;)
~/sfml/sfml/branches/sfml2>cmake-gui
dyld: Library not loaded: /usr/lib/libxml2.2.dylib
Referenced from: /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices
Reason: Incompatible library version: DictionaryServices requires version 10.0.0 or later, but libxml2.2.dylib provides version 9.0.0
Trace/BPT trap
-
I installed the *.dmg from Creative Labs
presumably on top of the one that came with the system.
That might be the problem. If needed I'll try tomorrow to install this version on a fresh 10.6 version. Can you give me the link you used to download the dmg please ? (In fact we should use the system default version.)
I seem to have three OpenAL's, one in System/Library
and /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework
Where's the third ? In 10.6 sdk folder ?
There were other errors but I patched them away.
Can you get rid of all your modifications and get a fresh copy ? It'll help me to spot the 'root' error.
http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx
Yes the 10.6 version is at the same URL as the 10.5 except for changing 10.5 to 10.6
~/sfml/sfml/branches/sfml2>locate OpenAL
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Headers
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/OpenAL
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/MacOSX_OALExtensions.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/al.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/alc.h
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL
/Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework/Versions/Current
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Headers
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/OpenAL
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/MacOSX_OALExtensions.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/al.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/alc.h
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL
/Developer/SDKs/MacOSX10.6.sdk/System/Library/Frameworks/OpenAL.framework/Versions/Current
/System/Library/Frameworks/OpenAL.framework
/System/Library/Frameworks/OpenAL.framework/CodeResources
/System/Library/Frameworks/OpenAL.framework/Headers
/System/Library/Frameworks/OpenAL.framework/OpenAL
/System/Library/Frameworks/OpenAL.framework/Resources
/System/Library/Frameworks/OpenAL.framework/Versions
/System/Library/Frameworks/OpenAL.framework/Versions/A
/System/Library/Frameworks/OpenAL.framework/Versions/A/CodeResources
/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers
/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/MacOSX_OALExtensions.h
/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/al.h
/System/Library/Frameworks/OpenAL.framework/Versions/A/Headers/alc.h
/System/Library/Frameworks/OpenAL.framework/Versions/A/OpenAL
/System/Library/Frameworks/OpenAL.framework/Versions/A/Resources
/System/Library/Frameworks/OpenAL.framework/Versions/A/Resources/Info.plist
/System/Library/Frameworks/OpenAL.framework/Versions/A/Resources/version.plist
/System/Library/Frameworks/OpenAL.framework/Versions/A/_CodeSignature
/System/Library/Frameworks/OpenAL.framework/Versions/A/_CodeSignature/CodeResources
/System/Library/Frameworks/OpenAL.framework/Versions/Current
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Resources/ExtraPatches.plugin/Contents/Resources/QCOpenAL.xml
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Resources/ExtraPatches.plugin/Contents/Resources/QCOpenALUI.nib
/System/Library/Frameworks/Quartz.framework/Versions/A/Frameworks/QuartzComposer.framework/Versions/A/Resources/ExtraPatches.plugin/Contents/Resources/QCOpenALUI.nib/keyedobjects.nib
-
I installed the *.dmg from Creative Labs
presumably on top of the one that came with the system.
That might be the problem. If needed I'll try tomorrow to install this version on a fresh 10.6 version. Can you give me the link you used to download the dmg please ? (In fact we should use the system default version.)
I seem to have three OpenAL's, one in System/Library
and /Developer/SDKs/MacOSX10.5.sdk/System/Library/Frameworks/OpenAL.framework
Where's the third ? In 10.6 sdk folder ?
There were other errors but I patched them away.
Can you get rid of all your modifications and get a fresh copy ? It'll help me to spot the 'root' error.
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp: In member function ‘void sf::Sound::SetPlayingOffset(float)’:
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp:121: error: ‘AL_SEC_OFFSET’ was not declared in this scope
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp: In member function ‘float sf::Sound::GetPlayingOffset() const’:
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/Sound.cpp:146: error: ‘AL_SEC_OFFSET’ was not declared in this scope
make[2]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/Sound.cpp.o] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/all] Error 2
make: *** [all] Error 2
~/sfml/sfml/branches/sfml2>locate OpenAL | grep AL_SEC_OFFSET
What I "fixed" was code like this:
typedef void VOID;
void f(VOID);
This doesn't compile on my g++. i edited the code to make it compile,
it will still compile on C (without error checking).
I think to blow away all three versions of openAL, then install the CreativeLabs one.
I also downloaded the source for OpenAL but Creative it didn't bother to supply a Makefile, only a project. Of course the project doesn't build;
Note this though:
~/openAL/OpenAL/trunk/OpenAL-MacOSX>grep -r AL_SEC_OFFSET *
Binary file build/Default/openal.dylib matches
build/Default/OpenAL.framework/Headers/al.h:#define AL_SEC_OFFSET 0x1024
grep: build/Default/OpenAL.framework/OpenAL: No such file or directory
build/Default/OpenAL.framework/Versions/A/Headers/al.h:#define AL_SEC_OFFSET 0x1024
build/Default/OpenAL.framework/Versions/Current/Headers/al.h:#define AL_SEC_OFFSET 0x1024
Binary file build/OpenAL.build/Default/OpenAL.build/Objects-normal/ppc/oalImp.o matches
Binary file build/OpenAL.build/Default/OpenAL.build/Objects-normal/ppc/oalOSX.o matches
Binary file build/OpenAL.build/Default/openal.dylib.build/Objects-normal/ppc/oalImp.o matches
Binary file build/OpenAL.build/Default/openal.dylib.build/Objects-normal/ppc/oalOSX.o matches
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: case AL_SEC_OFFSET:
oalImp.cpp: if (strcmp("AL_SEC_OFFSET", (const char *)ename) == 0) { return AL_SEC_OFFSET; }
oalOSX.cpp: case AL_SEC_OFFSET: return "AL_SEC_OFFSET"; break;
So basically their SVN contains a different version to their binary. The SVN contains the missing constant.
-
~/sfml/sfml/branches/sfml2>cmake-gui
dyld: Library not loaded: /usr/lib/libxml2.2.dylib
[snip]
Well, I don't know what you did but I start thinking you should get a fresh copy of your system. :?
http://connect.creativelabs.com/openal/Downloads/Forms/AllItems.aspx
This version is really out of date. That's why you get all these errors. You won't be able to fixe them all.
I recommend that you reinstall your system and then install only the missing libraries (don't replace any content of OS X system unless you really need it).
The only thing you'll need to use SFML 2 on Mac is :
> CMake
> SFML 2 SDK
> Xcode (to build your own projects)
The missing libraries are automatically installed on your system when you build SFML 2.
-
The missing libraries are automatically installed on your system when you build SFML 2.
Automatically from where?
I'm not sure its possible to re-install my system. It's likely the problem is
from interference of Macports or other crud.
Who would think the developers of OpenAL provide an out of date binary?
Grrr.. Likely outcome: I can't use SFML.
-
Automatically from where?
When you run 'sudo make install' (read this (http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php)).
(Just to be clear : by 'missing libraries' I mean the ones that are not installed by default on the system (like sndfile). OpenAL won't be installed that way.)
-
Automatically from where?
When you run 'sudo make install' (read this (http://www.sfml-dev.org/tutorials/2.0/compile-with-cmake.php)).
(Just to be clear : by 'missing libraries' I mean the ones that are not installed by default on the system (like sndfile). OpenAL won't be installed that way.)
I didn't ask when, I asked "from where". Where does it get them from?
If they're missing they're missing. Cmake can't make them unmissing.
-
From the SFML 2 SDK.
-
Ok, the problem is narrowed down to cmake screwing up.
I deleted ALL copies of OpenAL from my system. Including the /System one. Then I built OpenAL from svn and installed it by moving the Deployment target into /System/.../
Then i noticed sfml2 has a directory called extlibs/Headers containing al.h etc do I deleted that too. That's what's causing the error. Has to be.
Then I re-ran cmake and the make and get the same error.
So now I delete the cmake cache and retry, same error.
No, I'm NOT going to read a whole lot of arcane details about Cmake, I don't care about Cmake. I don't care about SFML. I'm just a compiler writer trying to create a binding to your product for a client.
There is one copy of OpenAL on my system now. In al.h we have
#define AL_SEC_OFFSET 0x1024
but I still get an error. So clearly sfml2's build system is getting the header from somewhere else.
-
As I said :
extlibs/headers/AL/ header files are not used on OS X. CMake should have configured the project include path with the installed OpenAL framework. (On my computer this framework is in /System/Library/Frameworks/.)
What is the OPENAL_LIBRARY and OPENAL_INCLUDE_DIR variables content when you configure the project with CMake (click advanced to unhide them) ?
Did you get a fresh copy of SFML 2 SDK ?
-
As I said :
extlibs/headers/AL/ header files are not used on OS X. CMake should have configured the project include path with the installed OpenAL framework. (On my computer this framework is in /System/Library/Frameworks/.)
What is the OPENAL_LIBRARY and OPENAL_INCLUDE_DIR variables content when you configure the project with CMake (click advanced to unhide them) ?
Did you get a fresh copy of SFML 2 SDK ?
And as I said I'm not using a GUI so I have nothing to "click".
I don't understand "fresh copy of SFML". I'm using the SVN repository.
I cleaned it, I cleaned a lot of things.
I checked and al.h MUST be coming from /System because there's no other copy anywhere (that I know of)
So it appears some macros are conditionally skipping stuff because the missing macros is definitely in the al.h header file (and there's only one such file on my system).
-
From the SFML 2 SDK.
I don't understand. Please don't use vague marketing terms like "SDK".
Please name a directory. So I know where to look.
There is a directory called "extlibs" containing "Headers" which used to contain AL/al.h but I deleted that to make sure it wasn't used.
-
Arggg .. I found ANOTHER copy of OpenAL. [Reason for not finding it before: Unix sucks. Hierarchical file system and no tools that know how to navigate it.. stupid beyond belief]
Ok, so now I am getting real errors finally:
[ 85%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/ALCheck.cpp.o
[ 86%] Building CXX object src/SFML/Audio/CMakeFiles/sfml-audio.dir/AudioDevice.cpp.o
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp: In static member function ‘static bool sf::priv::AudioDevice::IsExtensionSupported(const std::string&)’:
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:95: error: invalid conversion from ‘unsigned char*’ to ‘const ALCchar*’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:95: error: initializing argument 2 of ‘ALCboolean alcIsExtensionPresent(ALCdevice*, const ALCchar*)’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:97: error: invalid conversion from ‘unsigned char*’ to ‘const ALchar*’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:97: error: initializing argument 1 of ‘ALboolean alIsExtensionPresent(const ALchar*)’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp: In static member function ‘static int sf::priv::AudioDevice::GetFormatFromChannelsCount(unsigned int)’:
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:111: error: invalid conversion from ‘unsigned char*’ to ‘const ALchar*’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:111: error: initializing argument 1 of ‘ALenum alGetEnumValue(const ALchar*)’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:112: error: invalid conversion from ‘unsigned char*’ to ‘const ALchar*’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:112: error: initializing argument 1 of ‘ALenum alGetEnumValue(const ALchar*)’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:113: error: invalid conversion from ‘unsigned char*’ to ‘const ALchar*’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:113: error: initializing argument 1 of ‘ALenum alGetEnumValue(const ALchar*)’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:114: error: invalid conversion from ‘unsigned char*’ to ‘const ALchar*’
/Users/johnskaller/sfml/sfml/branches/sfml2/src/SFML/Audio/AudioDevice.cpp:114: error: initializing argument 1 of ‘ALenum alGetEnumValue(const ALchar*)’
make[2]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/AudioDevice.cpp.o] Error 1
make[1]: *** [src/SFML/Audio/CMakeFiles/sfml-audio.dir/all] Error 2
-
I'm not using a GUI
You can find those variable in CMakeCache.txt.
I cleaned it, I cleaned a lot of things.
You should not : that might be the problem. Download the SVN directory (SDK) again and remove/edit nothing. Clean also your cmake cache just to be sure.
Now I checked the openal SVN and the Mac version seems to be the same as Apple shipped with its OS (at least the header are the same). Thus you should be able to use this one.
-
I'm not using a GUI
You can find those variable in CMakeCache.txt.
yeah, I did, that's how I found yet another copy of OpenAL :)
Ok, so reloading svn now (because I think I added those unsigned chars to fix a bug binding to the other OpenAL .. :)
While waiting for the checkout .. I wonder why CMake found the wrong library? I also wonder, how can you get the generated Makefiles to echo the rules being executed .. if I could have done that the search path would have revealed the problem days ago.
BTW: SDL 1.3 builds right out of the box. It didn't work but the two bugs I found were fixed very quickly.
Argg .. OK everything compiles fine now, but unfortunately OpenAL.dylib is of the wrong architecture:
Linking CXX shared library ../../../lib/libsfml-audio.dylib
ld: warning: in /System/Library/Frameworks//OpenAL.framework/OpenAL, file is not of required architecture
I don't understand this. Grrr. I really hate idiot message like that one above, which neither tell you the architecture that it is, nor the architecture that's required. Turns out I built 32 bit OpenAl. Curses to Creative!
Rebuilding 64 bit .. nope .. I can't Stupid Xcode GUI crap can't build 64 bit.
[And that's the one off Snow Leopard CD]
-
The openal version shipped by Apple is build for multi-arch. You can use 'file' command to see the different arch of a binary.
$ file /System/Library/Frameworks/OpenAL.framework/OpenAL
/System/Library/Frameworks/OpenAL.framework/OpenAL: Mach-O universal binary with 3 architectures
/System/Library/Frameworks/OpenAL.framework/OpenAL (for architecture x86_64): Mach-O 64-bit dynamically linked shared library x86_64
/System/Library/Frameworks/OpenAL.framework/OpenAL (for architecture i386): Mach-O dynamically linked shared library i386
/System/Library/Frameworks/OpenAL.framework/OpenAL (for architecture ppc7400): Mach-O dynamically linked shared library ppc
Here is my version : http://www.mediafire.com/?8cbmlq8kf1vbblj
but you might have some issue with simlink. I don't know.
-
The openal version shipped by Apple is build for multi-arch. You can use 'file' command to see the different arch of a binary.
Yea, I definitely built a i386 library. Problem is I can't figure out how to fix it, Xcode is mess, like most of those IDEs, which is why I don't use them. Unfortunately its the only way to build OpenAL.
It won't let me change the arch in some places, does in others, makes copies of things left right and centre, and I can't figure out what's what. The "build" button on the IDE doesn't work at all (luckily the menu option does).
OMG:
~/openAL/OpenAL/trunk/OpenAL-MacOSX/build/Default>file openal.dylib
openal.dylib: Mach-O dynamically linked shared library ppc
What kind of crappy system is this?
I have to give up, Xcode now tells me a dylib depends on itself. Grrr .. I can't handle this rubbish anymore.
-
Arggg .. I found ANOTHER copy of OpenAL. [Reason for not finding it before: Unix sucks. Hierarchical file system and no tools that know how to navigate it.. stupid beyond belief]
cd /
find . -name al.h
Completely stupid and sucky... ;)
-
Here is my version : http://www.mediafire.com/?8cbmlq8kf1vbblj
but you might have some issue with simlink. I don't know.
Thanks. FINALLY with that installed sfml actually built correctly!
Thanks all for your patience. Now I can try to make a Felix binding for it and see if I can get it to work :)
Time to RTFM .. :)