Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: SFML2.0 on OSX wrong OpenAL version  (Read 14192 times)

0 Members and 4 Guests are viewing this topic.

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« 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?

Nexus

  • SFML Team
  • Hero Member
  • *****
  • Posts: 6287
  • Thor Developer
    • View Profile
    • Bromeon
Re: SFML2.0 on OSX wrong OpenAL version
« Reply #1 on: February 13, 2011, 05:20:19 pm »
Quote from: "yttrill"
Which OpenAl do I need?
The one that is in the official SFML SDK.
Zloxx II: action platformer
Thor Library: particle systems, animations, dot products, ...
SFML Game Development:

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML2.0 on OSX wrong OpenAL version
« Reply #2 on: February 13, 2011, 06:59:58 pm »
Quote
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.
Laurent Gomila - SFML developer

devlin

  • Full Member
  • ***
  • Posts: 128
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #3 on: February 13, 2011, 07:13:45 pm »
Which missing enums?

are you using the al.h included with sfml? (extlibs/headers/AL/al.h)

My project compiles just fine for OSX.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML2.0 on OSX wrong OpenAL version
« Reply #4 on: February 13, 2011, 09:11:26 pm »
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 ?
SFML / OS X developer

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #5 on: February 15, 2011, 04:24:25 pm »
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

Laurent

  • Administrator
  • Hero Member
  • *****
  • Posts: 32498
    • View Profile
    • SFML's website
    • Email
SFML2.0 on OSX wrong OpenAL version
« Reply #6 on: February 15, 2011, 04:56:25 pm »
Quote
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.

Quote
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 ;)
Laurent Gomila - SFML developer

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML2.0 on OSX wrong OpenAL version
« Reply #7 on: February 15, 2011, 05:32:52 pm »
Quote from: "yttrill"
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.)

Quote from: "yttrill"
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 ?

Quote from: "yttrill"
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.
SFML / OS X developer

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #8 on: February 16, 2011, 01:23:15 am »
Quote from: "Laurent"
Quote
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.

Quote
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

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #9 on: February 16, 2011, 01:27:17 am »
Quote from: "Hiura"
Quote from: "yttrill"
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.)

Quote from: "yttrill"
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 ?

Quote from: "yttrill"
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

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #10 on: February 16, 2011, 01:44:19 am »
Quote from: "Hiura"
Quote from: "yttrill"
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.)

Quote from: "yttrill"
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 ?

Quote from: "yttrill"
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.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML2.0 on OSX wrong OpenAL version
« Reply #11 on: February 16, 2011, 12:02:33 pm »
Quote from: "yttrill"
~/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.   :?

Quote
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.
SFML / OS X developer

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #12 on: February 16, 2011, 02:10:09 pm »
Quote

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.

Hiura

  • SFML Team
  • Hero Member
  • *****
  • Posts: 4321
    • View Profile
    • Email
SFML2.0 on OSX wrong OpenAL version
« Reply #13 on: February 16, 2011, 02:24:20 pm »
Quote from: "yttrill"
Automatically from where?

When you run 'sudo make install' (read this).

(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.)
SFML / OS X developer

yttrill

  • Newbie
  • *
  • Posts: 15
    • View Profile
SFML2.0 on OSX wrong OpenAL version
« Reply #14 on: February 16, 2011, 02:41:23 pm »
Quote from: "Hiura"
Quote from: "yttrill"
Automatically from where?

When you run 'sudo make install' (read this).

(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.

 

anything