SDL not building on OS X 10.5 (Leopard)?

Hi

I just upgraded to Leopard. Trying to install SDL, from either the tarball,
1.2 svn, or 1.3 svn, all result in make terminating with:

./src/audio/macosx/SDL_coreaudio.c: In function ‘Core_CloseAudio’:
./src/audio/macosx/SDL_coreaudio.c:159: error: storage size of 'callback’
isn’t known
./src/audio/macosx/SDL_coreaudio.c:172: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)
./src/audio/macosx/SDL_coreaudio.c:172: error: (Each undeclared identifier
is reported only once
./src/audio/macosx/SDL_coreaudio.c:172: error: for each function it appears
in.)
./src/audio/macosx/SDL_coreaudio.c: In function ‘Core_OpenAudio’:
./src/audio/macosx/SDL_coreaudio.c:203: error: storage size of 'callback’
isn’t known
./src/audio/macosx/SDL_coreaudio.c:224: error: 'kAudioUnitComponentType’
undeclared (first use in this function)
./src/audio/macosx/SDL_coreaudio.c:225: error: 'kAudioUnitSubType_Output’
undeclared (first use in this function)
./src/audio/macosx/SDL_coreaudio.c:226: error: 'kAudioUnitID_DefaultOutput’
undeclared (first use in this function)
./src/audio/macosx/SDL_coreaudio.c:256: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)
make: *** [build/SDL_coreaudio.lo] Error 1

Any ideas would be much appreciated.
Thanks!

I’m not up on Core Audio, but glancing at the Core Audio headers, it
looks like the header in use is “version 1” of Core Audio and is
deprecated and we should be using a newer version. Maybe it’s been
removed in the 10.5 SDK. (I’m also getting a ton of other errors from
other things.)

As far as SDL 1.2, we’ve already been getting lots of deprecated
warnings in 10.4. I would not be surprised if things don’t compile
under the 10.5 SDK. For SDL 1.2, it will still build under the 10.4u
SDK and should hopefully still work under Leopard.

As for SDL 1.3, I’m not keeping up on it but I’m thinking the code may
need to be modernized to get off all the deprecated stuff, which might
make 10.5 the baseline. But I’m not sure if that’s true or if
something the SDL leaders want to consider.

-EricOn 10/26/07, Nituv wrote:

Hi

I just upgraded to Leopard. Trying to install SDL, from either the tarball,
1.2 svn, or 1.3 svn, all result in make terminating with:

./src/audio/macosx/SDL_coreaudio.c: In function ‘Core_CloseAudio’:
./src/audio/macosx/SDL_coreaudio.c:159: error: storage size of 'callback’
isn’t known
./src/audio/macosx/SDL_coreaudio.c:172: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)
./src/audio/macosx/SDL_coreaudio.c:172: error: (Each undeclared identifier
is reported only once
./src/audio/macosx/SDL_coreaudio.c:172: error: for each function it appears
in.)
./src/audio/macosx/SDL_coreaudio.c: In function ‘Core_OpenAudio’:
./src/audio/macosx/SDL_coreaudio.c:203: error: storage size of 'callback’
isn’t known
./src/audio/macosx/SDL_coreaudio.c:224: error: 'kAudioUnitComponentType’
undeclared (first use in this function)
./src/audio/macosx/SDL_coreaudio.c:225: error: 'kAudioUnitSubType_Output’
undeclared (first use in this function)
./src/audio/macosx/SDL_coreaudio.c:226: error: 'kAudioUnitID_DefaultOutput’
undeclared (first use in this function)
./src/audio/macosx/SDL_coreaudio.c:256: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)
make: *** [build/SDL_coreaudio.lo] Error 1

Any ideas would be much appreciated.
Thanks!

E. Wing wrote:

As for SDL 1.3, I’m not keeping up on it but I’m thinking the code may
need to be modernized to get off all the deprecated stuff, which might
make 10.5 the baseline. But I’m not sure if that’s true or if
something the SDL leaders want to consider.

I’m not an SDL leader but I think that 10.2 compatibility can be
trashed, but since SDL is used also for a lot of games/apps that are not
resource hogs and often target older systems we should retain at least
10.3.9 compatibility and this can be done continuing to compile with
10.4u :slight_smile:

What kind of improvements can SDL have from using 10.5 directly? Anyway
for coreaudio for instance, it’s possible maybe to weak link the
framework (-weak_framework) and load it at SDL_Init(SDL_INIT_AUDIO) and
to probe the 10.5 interface and use it if available…–
Bye,
Gabry

That sucks. :frowning: Last I saw, some folks [schools] were still waiting on
a newer version of Tux Paint that targets OS X 10.2.8.

I think it was some Apple lameness, whereby it was hard to compile for
10.2.8 w/o having a 10.2.8 system, or something… (using XCode)On Mon, Oct 29, 2007 at 12:52:55PM +0100, Gabriele Greco wrote:

I’m not an SDL leader but I think that 10.2 compatibility can be
trashed,


-bill!
bill at newbreedsoftware.com
http://www.newbreedsoftware.com/

I’m not an SDL leader but I think that 10.2 compatibility can be
trashed, but since SDL is used also for a lot of games/apps that are not
resource hogs and often target older systems we should retain at least
10.3.9 compatibility and this can be done continuing to compile with
10.4u :slight_smile:

Apple tends to be a bit hostile towards legacy development…if the 10.5
devtools ship with gcc-3.3 (which you’ll need for 10.2 development), I’d
be surprised if the 10.6 ones will. They probably don’t ship with the
10.2 headers anymore, either.

Sooner or later, you’ll get pushed out, or have to rely on an obsolete
install of the development tools, but I don’t see a reason SDL can’t
continue to support 10.2 for now if you can overcome that detail.

What kind of improvements can SDL have from using 10.5 directly? Anyway
for coreaudio for instance, it’s possible maybe to weak link the
framework (-weak_framework) and load it at SDL_Init(SDL_INIT_AUDIO) and
to probe the 10.5 interface and use it if available…

I don’t think there’s anything in 10.5 that SDL specifically needs…the
lowlevel bits, CoreAudio, Cocoa, Quartz, OpenGL, etc, were all in
previous versions.

We will have a problem in SDL 1.2 in that QuickDraw is
deprecated…SDL 1.2 will never build for 64-bit Mac OS X, as that
framework is gone for those CPU architectures. This is already resolved
in SDL 1.3.

I haven’t actually tried anything with the 10.5 SDK yet, though.

–ryan.

Yeah, that’s what it sounds like. Hard to find OSX volunteers to build OSS
stuff. The current volunteer for Tux Paint is on a PPC Mac, and has to find
a friend who can fiddle with some Intel-specific stuff.

And last I checked, SDL worked on Mac OS 9. I’d be perfectly happy to help
someone set up a way to build Tux Paint (with reduced features – something
we’re going to have to do for Win95, Win98 and WinME in the next release)
for Mac Classic, too.

When I was in high school (early 1990s), we were still using computers
from 10+ years earlier (Apple ][s). It wasn’t until I was a senior that
we got a room full of 486s running Windows 3.1 (which I thought was a
bad joke, after using some Macs and my friend’s Amiga :slight_smile: )

I have no idea when those were replaced with something more modern… it
was probably a much quicker turn-around time, but I can understand schools not
being able to afford the latest and greatest hardware, year after year.
They have to draw a line in the sand, get what they can, then wait a while
and do it all over again.

And, BTW, I was in a high school in Marin county, California, which is not
exactly a poor area. :slight_smile:

So yeah, if it’s possible via build tweaks, or whatever, I’d love if SDL could
continue supporting decade-old OSes… won’t someone think of the children!?
:wink:

Thx!

-bill!On Mon, Oct 29, 2007 at 03:37:28PM -0400, Ryan C. Gordon wrote:

Sooner or later, you’ll get pushed out, or have to rely on an obsolete
install of the development tools, but I don’t see a reason SDL can’t
continue to support 10.2 for now if you can overcome that detail.

Hello !

So yeah, if it’s possible via build tweaks, or whatever, I’d love if SDL could
continue supporting decade-old OSes… won’t someone think of the children!?
:wink:

We live for TuxPaint :slight_smile:

In my opinion if there is no good reason SDL should support
at minimum OS X 10.3.

CU

Nituv <gjznituv gmail.com> writes:

./src/audio/macosx/SDL_coreaudio.c:224: error: 'kAudioUnitComponentType’
Any ideas would be much appreciated.

Adding

#include <AudioUnit/AUNTComponent.h>

in the SDL_coreaudio.h header file should help.

Best regards,
Martin

hi,

i’m building on Leopard and seeing the errors as above (Tiger’s still OK …)

by Martin Haller Nov 19, 2007; 06:01am

Nituv <gjznituv gmail.com> writes:
./src/audio/macosx/SDL_coreaudio.c:224: error: 'kAudioUnitComponentType’
Any ideas would be much appreciated.

Adding

#include <AudioUnit/AUNTComponent.h>

in the SDL_coreaudio.h header file should help.

and, that add’n does fix/remove the,


./src/audio/macosx/SDL_coreaudio.c: In function ‘Core_CloseAudio’:
./src/audio/macosx/SDL_coreaudio.c:159: error: storage size of
’callback’ isn’t known
./src/audio/macosx/SDL_coreaudio.c:172: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)

errors, but

make

now dies at,

In file included from ./src/cdrom/macosx/AudioFilePlayer.c:30:
./src/cdrom/macosx/AudioFilePlayer.h:82: error: syntax error before

‘AudioUnitInputCallback’
./src/cdrom/macosx/AudioFilePlayer.h:82: warning: no semicolon at end
of struct or union
./src/cdrom/macosx/AudioFilePlayer.h:98: error: syntax error before ‘}’ token
./src/cdrom/macosx/AudioFilePlayer.h:98: warning: data definition has
no type or storage class
./src/cdrom/macosx/AudioFilePlayer.h:101: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.h:101: warning: data definition
has no type or storage class
./src/cdrom/macosx/AudioFilePlayer.h:102: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.h:116: warning: no semicolon at
end of struct or union
./src/cdrom/macosx/AudioFilePlayer.h:116: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.h:122: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.h:122: warning: data definition
has no type or storage class
./src/cdrom/macosx/AudioFilePlayer.h:159: error: syntax error before ‘}’ token
./src/cdrom/macosx/AudioFilePlayer.h:159: warning: data definition
has no type or storage class
./src/cdrom/macosx/AudioFilePlayer.h:162: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.h:162: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.h:165: warning: data definition
has no type or storage class
./src/cdrom/macosx/AudioFilePlayer.h:167: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c:62: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_SetDestination’:
./src/cdrom/macosx/AudioFilePlayer.c:65: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:65: error: (Each undeclared
identifier is reported only once
./src/cdrom/macosx/AudioFilePlayer.c:65: error: for each function it
appears in.)
./src/cdrom/macosx/AudioFilePlayer.c:68: error: ‘inDestUnit’
undeclared (first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:81: error:
‘kAudioUnitComponentType’ undeclared (first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:99: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_SetNotifier’:
./src/cdrom/macosx/AudioFilePlayer.c:101: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:101: error: 'inNotifier’
undeclared (first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:102: error: 'inRefCon’
undeclared (first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:105: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_IsConnected’:
./src/cdrom/macosx/AudioFilePlayer.c:107: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:110: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_GetDestUnit’:
./src/cdrom/macosx/AudioFilePlayer.c:112: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:115: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c:123: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_SetStartFrame’:
./src/cdrom/macosx/AudioFilePlayer.c:125: error: ‘frame’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:127: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:132: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_GetCurrentFrame’:
./src/cdrom/macosx/AudioFilePlayer.c:134: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:137: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_SetStopFrame’:
./src/cdrom/macosx/AudioFilePlayer.c:139: error: ‘frame’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:141: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:144: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function ‘delete_AudioFilePlayer’:
./src/cdrom/macosx/AudioFilePlayer.c:146: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:163: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function ‘AudioFilePlayer_Connect’:
./src/cdrom/macosx/AudioFilePlayer.c:168: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:178: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:192: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function
’AudioFilePlayer_DoNotification’:
./src/cdrom/macosx/AudioFilePlayer.c:194: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:195: error: 'inStatus’
undeclared (first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:206: error: syntax error before ‘’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function ‘AudioFilePlayer_Disconnect’:
./src/cdrom/macosx/AudioFilePlayer.c:211: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:218: error:
‘kAudioUnitProperty_SetInputCallback’ undeclared (first use in this
function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:235: error: syntax error before '
’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function ‘AudioFilePlayer_OpenFile’:
./src/cdrom/macosx/AudioFilePlayer.c:250: error: ‘inRef’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:250: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:290: error: 'outFileDataSize’
undeclared (first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c: At top level:
./src/cdrom/macosx/AudioFilePlayer.c:305: error: syntax error before ‘*’ token
./src/cdrom/macosx/AudioFilePlayer.c: In function ‘new_AudioFilePlayer’:
./src/cdrom/macosx/AudioFilePlayer.c:309: error: ‘afp’ undeclared
(first use in this function)
./src/cdrom/macosx/AudioFilePlayer.c:309: error: syntax error before ‘)’ token
make: *** [build/AudioFilePlayer.lo] Error 1

the fix to this is to apply both of the patches available @ darwinports, namely

cd …/SDL-1.2.12

wget http://svn.macports.org/repository/macports/trunk/dports/devel/libsdl/files/patch-AudioFilePlayer.h

wget http://svn.macports.org/repository/macports/trunk/dports/devel/libsdl/files/patch-SDL_coreaudio.c

patch -p0 < patch-AudioFilePlayer.h

patch -p0 < patch-SDL_coreaudio.c

then build.

hth.