MacOSX 64-Bit LibSDL builds broken

Hello,
I’ve been trying to build a 64-bit libSDL for MacOSX 10.5 but with no luck. I’ve tried 1.2.13, 1.2 SVN, and 1.3-SVN, but all starting with different problems. With 1.3-SVN setting --enable-video-cocoa=no gets around some of the compile problems, but not all.

Trying to build 1.2.13, I’ve run into the following problem.
I’ve patched SDL_coreaudio.c to replace kAudioUnitProperty_SetInputCallback with kAudioUnitProperty_SetRenderCallback, based on http://lists.apple.com/archives/coreaudio-api/2004/Jul/msg00168.html and http://trac.adiumx.com/attachment/ticket/5636/coreaudiosucks.diff, and got that to compile cleanly. I’m now stuck on the next coreaudio 64-bit depreciated feature with 10.5.

Seems that the SndChannelPtr data type is also not supported under 64-bit, latest MacOSX 10.5.6 / xcode 3.1. “Sound Input Manager is deprecated as of Mac OS X v10.5, use Core Audio” - Apple. The actual error is as follows…

In file included from ./src/audio/macrom/SDL_romaudio.c:46:
./src/audio/macrom/SDL_romaudio.h:37: error: syntax error before ‘SndChannelPtr’
./src/audio/macrom/SDL_romaudio.h:37: warning: no semicolon at end of struct or union

I’ve spent way too much time with Google trying to find a work around, I seem to be missing something. It must not be a simple function/keyword replacement.

I’m using the following…
CFLAGS="-m64 -Wall -O3 -march=nocona -pipe -DAVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER"

…everything else is just standard autogen.sh; configure --enable-video-cocoa=no, make.#####

sdl-1.3-SVN-4500 seems to get a bit further (no SDL_coreaudio.c patch needed), but ends up in the same place.

In file included from ./src/audio/macrom/SDL_romaudio.c:51:
./src/audio/macrom/SDL_romaudio.h:35: error: syntax error before ?SndChannelPtr?
./src/audio/macrom/SDL_romaudio.h:35: warning: no semicolon at end of struct or union

Is there anyone out there that’s successfully running a 64-bit LibSDL on MacOSX?

The 32 bit versions compile and work fine.

Thanks!
John Gilbert


Insert movie times and more without leaving Hotmail?.
http://windowslive.com/Tutorial/Hotmail/QuickAdd?ocid=TXT_TAGLM_WL_HM_Tutorial_QuickAdd1_052009

Hi,

I’ve also noticed it’s broken on 64bit OSX.

There’s no 64bit carbon… so SDL 1.2 will never work(unless someone
writes some cocoa code for it).

cu,On Fri, May 1, 2009 at 4:50 PM, John Gilbert wrote:

Hello,
I’ve been trying to build a 64-bit libSDL for MacOSX 10.5 but with no luck.
I’ve tried 1.2.13, 1.2 SVN, and 1.3-SVN, but all starting with different
problems. With 1.3-SVN setting --enable-video-cocoa=no gets around some of
the compile problems, but not all.

Trying to build 1.2.13, I’ve run into the following problem.
I’ve patched SDL_coreaudio.c to replace kAudioUnitProperty_SetInputCallback
with kAudioUnitProperty_SetRenderCallback, based on
http://lists.apple.com/archives/coreaudio-api/2004/Jul/msg00168.html and
http://trac.adiumx.com/attachment/ticket/5636/coreaudiosucks.diff, and got
that to compile cleanly. I’m now stuck on the next coreaudio 64-bit
depreciated feature with 10.5.

Seems that the SndChannelPtr data type is also not supported under 64-bit,
latest MacOSX 10.5.6 / xcode 3.1. “Sound Input Manager is deprecated as of
Mac OS X v10.5, use Core Audio” - Apple. The actual error is as follows…

In file included from ./src/audio/macrom/SDL_romaudio.c:46:
./src/audio/macrom/SDL_romaudio.h:37: error: syntax error before
’SndChannelPtr’
./src/audio/macrom/SDL_romaudio.h:37: warning: no semicolon at end of struct
or union

I’ve spent way too much time with Google trying to find a work around, I
seem to be missing something. It must not be a simple function/keyword
replacement.

I’m using the following…
CFLAGS="-m64 -Wall -O3 -march=nocona -pipe
-DAVAILABLE_MAC_OS_X_VERSION_10_5_AND_LATER"

…everything else is just standard autogen.sh; configure
–enable-video-cocoa=no, make.

sdl-1.3-SVN-4500 seems to get a bit further (no SDL_coreaudio.c patch
needed), but ends up in the same place.

In file included from ./src/audio/macrom/SDL_romaudio.c:51:
./src/audio/macrom/SDL_romaudio.h:35: error: syntax error before
?SndChannelPtr?
./src/audio/macrom/SDL_romaudio.h:35: warning: no semicolon at end of struct
or union

Is there anyone out there that’s successfully running a 64-bit LibSDL on
MacOSX?

The 32 bit versions compile and work fine.

Thanks!
John Gilbert


Insert movie times and more without leaving Hotmail?. See how.


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Hello,
I’ve been trying to build a 64-bit libSDL for MacOSX 10.5 but with no luck. I’ve tried 1.2.13, 1.2 SVN, and 1.3-SVN, but all starting with different problems. With 1.3-SVN setting --enable-video-cocoa=no gets around some of the compile problems, but not all.

I just checked in a fix for SDL 1.3 when building with cocoa enabled,
and got to the linking stage with --disable-audio --disable-cdrom.

Undefined symbols:
"_KLGetKeyboardLayoutProperty", referenced from:
_UpdateKeymap in SDL_cocoakeyboard.o
_UpdateKeymap in SDL_cocoakeyboard.o
"_KLGetCurrentKeyboardLayout", referenced from:
_UpdateKeymap in SDL_cocoakeyboard.o
"OBJC_IVAR$_NSScreen._frame", referenced from:
-[NSScreen(NSScreenAccess) setFrame:] in SDL_cocoamodes.o

It sounds like the SDL audio code just needs to be completely rewritten
to use the newest CoreAudio APIs. Any volunteers?

See ya,
-Sam Lantinga, Founder and President, Galaxy Gameworks LLC