First post, by emendelson
Hello,
A few months ago, I successfully built SDL 1.2 under Lion from the Hg sources, using this build script, based on instructions from Dominus:
#!/bin/sh
export CC='/usr/bin/gcc-4.2 -arch i386'
export CXX='/usr/bin/g++-4.2 -arch i386'
export GCOV='/usr/bin/gcov-4.2 -arch i386'
./autogen.sh
## REPLACE path shown below with correct path for current system
./configure --enable-static --enable-joystick --enable-cdrom --disable-video-x11 --enable-video-cocoa --enable-video-opengl --without-x --prefix=/Users/edward/Development/SDL-forDB
make clean
make
make install
I updated SDL 1.2 again today via Hg, and tried to build again, but got the error reported in these last lines of the output:
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -arch i386 -g -O2 -I./include -mmmx -m3dnow -msse -msse2 -DTARGET_API_MAC_CA […]
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -arch i386 -g -O2 -I./include -mmmx -m3dnow -msse -msse2 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -falign-loops=16 -force_cpusubtype_ALL -fpascal-strings -MMD -MT build/SDL_cocoawindow.lo -c src/video/cocoa/SDL_cocoawindow.m -o build/SDL_cocoawindow.lo
libtool: compile: /usr/bin/gcc-4.2 -arch i386 -g -O2 -I./include -mmmx -m3dnow -msse -msse2 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -falign-loops=16 -force_cpusubtype_ALL -fpascal-strings -MMD -MT build/SDL_cocoawindow.lo -c src/video/cocoa/SDL_cocoawindow.m -fno-common -DPIC -o build/.libs/SDL_cocoawindow.o
In file included from src/video/cocoa/SDL_cocoavideo.h:26,
from src/video/cocoa/SDL_cocoawindow.m:30:
./include/SDL_opengl.h:5119: error: conflicting types for ‘GLintptrARB’
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:102: error: previous declaration of ‘GLintptrARB’ was here
./include/SDL_opengl.h:5120: error: conflicting types for ‘GLsizeiptrARB’
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:103: error: previous declaration of ‘GLsizeiptrARB’ was here
src/video/cocoa/SDL_cocoawindow.m: In function ‘-[Cocoa_WindowListener handleTouches:withEvent:]’:
src/video/cocoa/SDL_cocoawindow.m:404: warning: cast from pointer to integer of different size
src/video/cocoa/SDL_cocoawindow.m:424: warning: cast from pointer to integer of different size
make: *** [build/SDL_cocoawindow.lo] Error 1
/bin/sh ./build-scripts/updaterev.sh
/bin/sh ./libtool --mode=compile /usr/bin/gcc-4.2 -arch i386 -g -O2 -I./include -mmmx -m3dnow -msse -msse2 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -falign-loops=16 -force_cpusubtype_ALL -fpascal-strings -MMD -MT build/SDL_cocoawindow.lo -c src/video/cocoa/SDL_cocoawindow.m -o build/SDL_cocoawindow.lo
libtool: compile: /usr/bin/gcc-4.2 -arch i386 -g -O2 -I./include -mmmx -m3dnow -msse -msse2 -DTARGET_API_MAC_CARBON -DTARGET_API_MAC_OSX -fvisibility=hidden -D_THREAD_SAFE -falign-loops=16 -force_cpusubtype_ALL -fpascal-strings -MMD -MT build/SDL_cocoawindow.lo -c src/video/cocoa/SDL_cocoawindow.m -fno-common -DPIC -o build/.libs/SDL_cocoawindow.o
In file included from src/video/cocoa/SDL_cocoavideo.h:26,
from src/video/cocoa/SDL_cocoawindow.m:30:
./include/SDL_opengl.h:5119: error: conflicting types for ‘GLintptrARB’
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:102: error: previous declaration of ‘GLintptrARB’ was here
./include/SDL_opengl.h:5120: error: conflicting types for ‘GLsizeiptrARB’
/System/Library/Frameworks/OpenGL.framework/Headers/gltypes.h:103: error: previous declaration of ‘GLsizeiptrARB’ was here
src/video/cocoa/SDL_cocoawindow.m: In function ‘-[Cocoa_WindowListener handleTouches:withEvent:]’:
src/video/cocoa/SDL_cocoawindow.m:404: warning: cast from pointer to integer of different size
src/video/cocoa/SDL_cocoawindow.m:424: warning: cast from pointer to integer of different size
make: *** [build/SDL_cocoawindow.lo] Error 1
Is it worth the effort to try to make this work? I understand that there have been various improvements in SDL for OS X since we last discussed this on the board a few months ago.
MacPorts is fully up to date on this system, by the way.