We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 806 - SDL 1.2 SVN fails to build on OS X 10.5 in 64bit mode
Summary: SDL 1.2 SVN fails to build on OS X 10.5 in 64bit mode
Status: RESOLVED FIXED
Alias: None
Product: SDL
Classification: Unclassified
Component: build (show other bugs)
Version: 1.2.14
Hardware: PowerPC Mac OS X 10.5 (Intel)
: P2 critical
Assignee: Ryan C. Gordon
QA Contact: Sam Lantinga
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-09-24 13:16 UTC by Max Horn
Modified: 2009-09-26 04:42 UTC (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Max Horn 2009-09-24 13:16:05 UTC
Current SDL 1.2 SVN luckily builds on several systems now: 10.4 (PPC and 32bit intel), 10.5 (32 bit) and 10.6 (32 bit). However, it fails to build on 10.5 in 64 bit mode:


/bin/sh ./libtool --mode=compile gcc-4.0 -g -O2 -I/sw64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden  -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzEvents.m  -o build/SDL_QuartzEvents.lo
gcc-4.0 -g -O2 -I/sw64/include -I./include -D_GNU_SOURCE=1 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -I/usr/X11R6/include -DXTHREADS -D_THREAD_SAFE -force_cpusubtype_ALL -fpascal-strings -c ./src/video/quartz/SDL_QuartzEvents.m  -fno-common -DPIC -o build/.libs/SDL_QuartzEvents.o
./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_InitOSKeymap':
./src/video/quartz/SDL_QuartzEvents.m:203: warning: 'GetScriptManagerVariable' is deprecated (declared at /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Script.h:993)
./src/video/quartz/SDL_QuartzEvents.m: In function 'QZ_PumpEvents':
./src/video/quartz/SDL_QuartzEvents.m:736: error: 'UsrActivity' undeclared (first use in this function)
./src/video/quartz/SDL_QuartzEvents.m:736: error: (Each undeclared identifier is reported only once
./src/video/quartz/SDL_QuartzEvents.m:736: error: for each function it appears in.)
make: *** [build/SDL_QuartzEvents.lo] Error 1
### execution of ./configure failed, exit code 2


 This seems to be due to a bug in the OS X headers shipped with 10.5: See for example this message from carbon-dev: <http://lists.apple.com/archives/carbon-dev/2009/Aug/msg00146.html>

While this is a bug in the OS headers, I still think it would be important (and doable) to workaround this. I'll try to come up with a workaround (but feel free to beat me to this :).
One way would be to directly include OSService/Power.h ; another would be to add

#if __LP64__  && OS X version is 10.5
  #define UsrActivity 1
#endif

inside SDL_QuartzEvents.m
Comment 1 Sam Lantinga 2009-09-26 04:42:52 UTC
This is fixed in subversion, thanks!