[openal] Questioning about linking to OS X 10.4 SDK

Chris Robinson chris.kcat at gmail.com
Tue Nov 4 20:59:56 EST 2014


On 11/04/2014 10:48 AM, Lubo Diakov wrote:
> Hello, I've compiled openal-soft version 1.15.1 (both from the
> MacPorts package and from source tarball) on OS X 10.5, using the 10.5
> SDK. However, I'd liike to link it to the 10.4u SDK and I can't do
> that.
>
> It links to a symbol not in the 10.4u SDK (more specifically, the
> symbol _OSAtomicCompareAndSwapPtrBarrier is in the 10.5 SDK, and there
> is corresponding symbol in the 10.4u SDK, but they have to be called
> in a slightly different way from the code.

Starting with 1.16, OpenAL Soft doesn't use OSX's OSAtomic methods 
because they're too inflexible (in particular, OSAtomicCompareAndSwap* 
doesn't report what the checked value was like every other API does; it 
only returns if the compare/swap was successful or not). Instead, it now 
only uses C11's atomic methods if available, otherwise falling back to 
GCC intrinsics (works on Clang too), or x86/x86_64 inline assembly. Or 
Windows' methods, but OSX obviously won't have those.

AFAIK, OSX uses a version of GCC or Clang, so it should still work with 
either the intrinsics or inline assembly. Otherwise, bringing back the 
OSAtomic calls will require finding some way around CompareAndSwap's 
limitations.


More information about the openal mailing list