SDL 1.3 on Mac OS X x86_64 and ppc64

Hi there,

I’ve made minor changes to the code (mainly to SDL_config_macosx.h,
and a few ifdefs in some other files) to try and get it compiling
under Mac OS X for x86_64 and ppc64 targets, but I end up with a few
linker errors (for both x86_64 and ppc64):

      "_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
      "_SDL_SYS_CDInit", referenced from:
          _SDL_CDROMInit in SDL_cdrom.o
      "_SDL_SYS_CDQuit", referenced from:
          _SDL_CDROMQuit in SDL_cdrom.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

The _KLGet* calls are especially weird, because it’s actually calling
the 32-bit only Carbon APIs inside of Cocoa source files. Any chance
these can be swapped out for whatever the equivalent and appropriate
Cocoa API is?

I don’t know what the OBJC_IVAR$_NSScreen._frame linker issue is at
all. Any idea what this is about?

The _SDL_SYS_CD* calls shouldn’t even be there, as I’ve got this
change in the SDL_config_macosx.h:

    diff --git a/include/SDL_config_macosx.h b/include/SDL_config_macosx.h
    index 5117c17..d1180e2 100644
    --- a/include/SDL_config_macosx.h
    +++ b/include/SDL_config_macosx.h
    @@ -111,6 +111,8 @@
     /* Enable various cdrom drivers */
     #ifndef _LP64
     #define SDL_CDROM_MACOSX       1
    +#else
    +#define SDL_CDROM_DISABLED     1
     #endif

But I can hunt the _SDL_SYS_CD* issues down myself, so I’m not too
worried about it. Likely just an #ifdef missing somewhere.

So SDL 1.3 is close to compiling properly on Mac OS X 64-bit targets,
any suggestions for the above issues?

  • Steven

Hi.

Look at my patch:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2009-May/070374.html

You can try this. I don’t know if somebody can check or learn something

  • Mattifrom my patch :wink:

On Tue, 12 May 2009 17:31:43 -0700, Steven Noonan wrote:

Hi there,

I’ve made minor changes to the code (mainly to SDL_config_macosx.h,
and a few ifdefs in some other files) to try and get it compiling
under Mac OS X for x86_64 and ppc64 targets, but I end up with a few
linker errors (for both x86_64 and ppc64):

      "_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
      "_SDL_SYS_CDInit", referenced from:
          _SDL_CDROMInit in SDL_cdrom.o
      "_SDL_SYS_CDQuit", referenced from:
          _SDL_CDROMQuit in SDL_cdrom.o
    ld: symbol(s) not found
    collect2: ld returned 1 exit status

The _KLGet* calls are especially weird, because it’s actually calling
the 32-bit only Carbon APIs inside of Cocoa source files. Any chance
these can be swapped out for whatever the equivalent and appropriate
Cocoa API is?

I don’t know what the OBJC_IVAR$_NSScreen._frame linker issue is at
all. Any idea what this is about?

The _SDL_SYS_CD* calls shouldn’t even be there, as I’ve got this
change in the SDL_config_macosx.h:

    diff --git a/include/SDL_config_macosx.h
    b/include/SDL_config_macosx.h
    index 5117c17..d1180e2 100644
    --- a/include/SDL_config_macosx.h
    +++ b/include/SDL_config_macosx.h
    @@ -111,6 +111,8 @@
     /* Enable various cdrom drivers */
     #ifndef _LP64
     #define SDL_CDROM_MACOSX       1
    +#else
    +#define SDL_CDROM_DISABLED     1
     #endif

But I can hunt the _SDL_SYS_CD* issues down myself, so I’m not too
worried about it. Likely just an #ifdef missing somewhere.

So SDL 1.3 is close to compiling properly on Mac OS X 64-bit targets,
any suggestions for the above issues?

  • Steven

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

Hi,

it seems that with opengl es you can only draw bitmap using texture but in
this case you have
to use power of two texture.
Woulnd’t be possible to draw directly a bitmap inside backbuffer and then
display it ?
Is there any function in opengl es to get video memory ?

Hi,

in OpenGL you cannot manipulate video memory directly. If you want to do it,
you will need
to read from video memory into the main memory, which is a very costly
operation.

Generally speaking you should only use textures for drawing images anyway.–
Paulo

On Wed, May 13, 2009 at 2:43 PM, Vincent R. wrote:

Hi,

it seems that with opengl es you can only draw bitmap using texture but in
this case you have
to use power of two texture.
Woulnd’t be possible to draw directly a bitmap inside backbuffer and then
display it ?
Is there any function in opengl es to get video memory ?


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

Ah yes, I did notice this after I sent my initial email. I don’t know
whether everyone would agree with me, but I think the unified diff
format (diff -u) is more widely accepted than the particular patch
format you used. Anyway, I applied the patch locally, and you have
some pretty bad whitespace clobbering in your patch. I also get this
on ppc and i386 (though interestingly x86_64 and ppc64 work fine):

cd /Users/steven/Development/SDL/Xcode/SDL
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386

-fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks
-O0 -DSDL_VIDEO_DRIVER_X11=1 -DSDL_VIDEO_DRIVER_X11_DPMS=1
-DSDL_VIDEO_DRIVER_X11_DYNAMIC="/usr/X11R6/lib/libX11.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT="/usr/X11R6/lib/libXext.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR="/usr/X11R6/lib/libXrandr.2.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER="/usr/X11R6/lib/libXrender.1.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT="/usr/X11R6/lib/libXi.6.dylib"
-DSDL_VIDEO_DRIVER_X11_VIDMODE=1 -DSDL_VIDEO_DRIVER_X11_XINERAMA=1
-DSDL_VIDEO_DRIVER_X11_XME=1 -DSDL_VIDEO_DRIVER_X11_XRANDR=1
-DSDL_VIDEO_DRIVER_X11_XINPUT=1 -DSDL_VIDEO_DRIVER_X11_XV=1
-DSDL_VIDEO_OPENGL_GLX=1 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-ftree-vectorize -msse3 -fvisibility=hidden -mmacosx-version-min=10.4
-gdwarf-2 -I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/SDL.hmap
-Wmost -F/Users/steven/Development/SDL/Xcode/SDL/build/Development
-I/Users/steven/Development/SDL/Xcode/SDL/build/Development/include
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include
-I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/DerivedSources
-c /Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m
-o /Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/Objects-normal/i386/SDL_cocoakeyboard.o
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:
In function ?UpdateKeymap?:
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: (Each undeclared identifier is reported only once
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: for each function it appears in.)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)

Ideas?

Hi.

Look at my patch:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2009-May/070374.html

You can try this. I don’t know if somebody can check or learn something
from my patch :wink:

  • Matti

On Tue, 12 May 2009 17:31:43 -0700, Steven Noonan <@Steven_Noonan> wrote:

Hi there,

I’ve made minor changes to the code (mainly to SDL_config_macosx.h,
and a few ifdefs in some other files) to try and get it compiling
under Mac OS X for x86_64 and ppc64 targets, but I end up with a few
linker errors (for both x86_64 and ppc64):

? ? ? ? ? “_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
? ? ? ? ? “_SDL_SYS_CDInit”, referenced from:
? ? ? ? ? ? ? _SDL_CDROMInit in SDL_cdrom.o
? ? ? ? ? “_SDL_SYS_CDQuit”, referenced from:
? ? ? ? ? ? ? _SDL_CDROMQuit in SDL_cdrom.o
? ? ? ? ld: symbol(s) not found
? ? ? ? collect2: ld returned 1 exit status

The _KLGet* calls are especially weird, because it’s actually calling
the 32-bit only Carbon APIs inside of Cocoa source files. Any chance
these can be swapped out for whatever the equivalent and appropriate
Cocoa API is?

I don’t know what the OBJC_IVAR$_NSScreen._frame linker issue is at
all. Any idea what this is about?

The _SDL_SYS_CD* calls shouldn’t even be there, as I’ve got this
change in the SDL_config_macosx.h:

? ? ? ? diff --git a/include/SDL_config_macosx.h
? ? ? ? b/include/SDL_config_macosx.h
? ? ? ? index 5117c17…d1180e2 100644
? ? ? ? — a/include/SDL_config_macosx.h
? ? ? ? +++ b/include/SDL_config_macosx.h
? ? ? ? @@ -111,6 +111,8 @@
? ? ? ? ?/* Enable various cdrom drivers */
? ? ? ? ?#ifndef _LP64
? ? ? ? ?#define SDL_CDROM_MACOSX ? ? ? 1
? ? ? ? +#else
? ? ? ? +#define SDL_CDROM_DISABLED ? ? 1
? ? ? ? ?#endif

But I can hunt the _SDL_SYS_CD* issues down myself, so I’m not too
worried about it. Likely just an #ifdef missing somewhere.

So SDL 1.3 is close to compiling properly on Mac OS X 64-bit targets,
any suggestions for the above issues?

  • Steven

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


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

Oh, wait, I know why. I bet the added code in the patch is
10.5-specific, is it not?

  • StevenOn Wed, May 13, 2009 at 11:47 AM, Steven Noonan <@Steven_Noonan> wrote:

Ah yes, I did notice this after I sent my initial email. I don’t know
whether everyone would agree with me, but I think the unified diff
format (diff -u) is more widely accepted than the particular patch
format you used. Anyway, I applied the patch locally, and you have
some pretty bad whitespace clobbering in your patch. I also get this
on ppc and i386 (though interestingly x86_64 and ppc64 work fine):

? ?cd /Users/steven/Development/SDL/Xcode/SDL
? ?/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386
-fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks
-O0 -DSDL_VIDEO_DRIVER_X11=1 -DSDL_VIDEO_DRIVER_X11_DPMS=1
-DSDL_VIDEO_DRIVER_X11_DYNAMIC="/usr/X11R6/lib/libX11.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT="/usr/X11R6/lib/libXext.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR="/usr/X11R6/lib/libXrandr.2.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER="/usr/X11R6/lib/libXrender.1.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT="/usr/X11R6/lib/libXi.6.dylib"
-DSDL_VIDEO_DRIVER_X11_VIDMODE=1 -DSDL_VIDEO_DRIVER_X11_XINERAMA=1
-DSDL_VIDEO_DRIVER_X11_XME=1 -DSDL_VIDEO_DRIVER_X11_XRANDR=1
-DSDL_VIDEO_DRIVER_X11_XINPUT=1 -DSDL_VIDEO_DRIVER_X11_XV=1
-DSDL_VIDEO_OPENGL_GLX=1 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-ftree-vectorize -msse3 -fvisibility=hidden -mmacosx-version-min=10.4
-gdwarf-2 -I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/SDL.hmap
-Wmost -F/Users/steven/Development/SDL/Xcode/SDL/build/Development
-I/Users/steven/Development/SDL/Xcode/SDL/build/Development/include
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include
-I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/DerivedSources
-c /Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m
-o /Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/Objects-normal/i386/SDL_cocoakeyboard.o
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:
In function ?UpdateKeymap?:
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: (Each undeclared identifier is reported only once
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: for each function it appears in.)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)
? ? ? ?/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)
? ? ? ?/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?
? ? ? ?/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)
? ? ? ?/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?
? ? ? ?/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?
? ? ? ?/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)

Ideas?

  • Steven

On Wed, May 13, 2009 at 2:17 AM, ?<m.hami at 42degreesoffreedom.com> wrote:

Hi.

Look at my patch:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2009-May/070374.html

You can try this. I don’t know if somebody can check or learn something
from my patch :wink:

  • Matti

On Tue, 12 May 2009 17:31:43 -0700, Steven Noonan <@Steven_Noonan> wrote:

Hi there,

I’ve made minor changes to the code (mainly to SDL_config_macosx.h,
and a few ifdefs in some other files) to try and get it compiling
under Mac OS X for x86_64 and ppc64 targets, but I end up with a few
linker errors (for both x86_64 and ppc64):

? ? ? ? ? “_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
? ? ? ? ? “_SDL_SYS_CDInit”, referenced from:
? ? ? ? ? ? ? _SDL_CDROMInit in SDL_cdrom.o
? ? ? ? ? “_SDL_SYS_CDQuit”, referenced from:
? ? ? ? ? ? ? _SDL_CDROMQuit in SDL_cdrom.o
? ? ? ? ld: symbol(s) not found
? ? ? ? collect2: ld returned 1 exit status

The _KLGet* calls are especially weird, because it’s actually calling
the 32-bit only Carbon APIs inside of Cocoa source files. Any chance
these can be swapped out for whatever the equivalent and appropriate
Cocoa API is?

I don’t know what the OBJC_IVAR$_NSScreen._frame linker issue is at
all. Any idea what this is about?

The _SDL_SYS_CD* calls shouldn’t even be there, as I’ve got this
change in the SDL_config_macosx.h:

? ? ? ? diff --git a/include/SDL_config_macosx.h
? ? ? ? b/include/SDL_config_macosx.h
? ? ? ? index 5117c17…d1180e2 100644
? ? ? ? — a/include/SDL_config_macosx.h
? ? ? ? +++ b/include/SDL_config_macosx.h
? ? ? ? @@ -111,6 +111,8 @@
? ? ? ? ?/* Enable various cdrom drivers */
? ? ? ? ?#ifndef _LP64
? ? ? ? ?#define SDL_CDROM_MACOSX ? ? ? 1
? ? ? ? +#else
? ? ? ? +#define SDL_CDROM_DISABLED ? ? 1
? ? ? ? ?#endif

But I can hunt the _SDL_SYS_CD* issues down myself, so I’m not too
worried about it. Likely just an #ifdef missing somewhere.

So SDL 1.3 is close to compiling properly on Mac OS X 64-bit targets,
any suggestions for the above issues?

  • Steven

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


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

I went to the website a few times and it’s been over a month and i’m still getting these emails. please someone remove me as i am no longer interested. Thank you

Oh, this can be the problem.

But then it is possible to use the LP64 or the 10.5 define, because a
64bit SDL is only possible in 10.5 and greater because in 10.4 there
is no 64bit Cocoa.

I will create a new patch this weekend. Thanks for your advise to use
the -u parameter. I’m new to this tool as I mentioned in my first mail.

  • MattiAm 13.05.2009 um 20:50 schrieb Steven Noonan:

Oh, wait, I know why. I bet the added code in the patch is
10.5-specific, is it not?

  • Steven

On Wed, May 13, 2009 at 11:47 AM, Steven Noonan wrote:

Ah yes, I did notice this after I sent my initial email. I don’t know
whether everyone would agree with me, but I think the unified diff
format (diff -u) is more widely accepted than the particular patch
format you used. Anyway, I applied the patch locally, and you have
some pretty bad whitespace clobbering in your patch. I also get this
on ppc and i386 (though interestingly x86_64 and ppc64 work fine):

cd /Users/steven/Development/SDL/Xcode/SDL
/Developer/usr/bin/gcc-4.0 -x objective-c -arch i386
-fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks
-O0 -DSDL_VIDEO_DRIVER_X11=1 -DSDL_VIDEO_DRIVER_X11_DPMS=1
-DSDL_VIDEO_DRIVER_X11_DYNAMIC="/usr/X11R6/lib/libX11.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT="/usr/X11R6/lib/libXext.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR="/usr/X11R6/lib/libXrandr.
2.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER="/usr/X11R6/lib/libXrender.
1.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT="/usr/X11R6/lib/libXi.6.dylib"
-DSDL_VIDEO_DRIVER_X11_VIDMODE=1 -DSDL_VIDEO_DRIVER_X11_XINERAMA=1
-DSDL_VIDEO_DRIVER_X11_XME=1 -DSDL_VIDEO_DRIVER_X11_XRANDR=1
-DSDL_VIDEO_DRIVER_X11_XINPUT=1 -DSDL_VIDEO_DRIVER_X11_XV=1
-DSDL_VIDEO_OPENGL_GLX=1 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-ftree-vectorize -msse3 -fvisibility=hidden -mmacosx-version-min=10.4
-gdwarf-2 -I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/
Development/Framework.build/SDL.hmap
-Wmost -F/Users/steven/Development/SDL/Xcode/SDL/build/Development
-I/Users/steven/Development/SDL/Xcode/SDL/build/Development/include
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include
-I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/
Development/Framework.build/DerivedSources
-c /Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m
-o /Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/
Development/Framework.build/Objects-normal/i386/SDL_cocoakeyboard.o
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:
In function ?UpdateKeymap?:
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:353:
error: (Each undeclared identifier is reported only once
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:353:
error: for each function it appears in.)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/
SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/
cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/
cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/
cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/
cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/
cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/
cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)

Ideas?

  • Steven

On Wed, May 13, 2009 at 2:17 AM, <@Matti_Hameister> wrote:

Hi.

Look at my patch:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2009-May/
070374.html

You can try this. I don’t know if somebody can check or learn
something
from my patch :wink:

  • Matti

On Tue, 12 May 2009 17:31:43 -0700, Steven Noonan <steven at uplinklabs.net wrote:

Hi there,

I’ve made minor changes to the code (mainly to SDL_config_macosx.h,
and a few ifdefs in some other files) to try and get it compiling
under Mac OS X for x86_64 and ppc64 targets, but I end up with a
few
linker errors (for both x86_64 and ppc64):

      "_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
"_SDL_SYS_CDInit", referenced from:
_SDL_CDROMInit in SDL_cdrom.o
"_SDL_SYS_CDQuit", referenced from:
_SDL_CDROMQuit in SDL_cdrom.o
ld: symbol(s) not found
collect2: ld returned 1 exit status

The _KLGet* calls are especially weird, because it’s actually
calling
the 32-bit only Carbon APIs inside of Cocoa source files. Any
chance
these can be swapped out for whatever the equivalent and
appropriate
Cocoa API is?

I don’t know what the OBJC_IVAR$_NSScreen._frame linker issue
is at
all. Any idea what this is about?

The _SDL_SYS_CD* calls shouldn’t even be there, as I’ve got this
change in the SDL_config_macosx.h:

    diff --git a/include/SDL_config_macosx.h
    b/include/SDL_config_macosx.h
    index 5117c17..d1180e2 100644
    --- a/include/SDL_config_macosx.h
    +++ b/include/SDL_config_macosx.h
    @@ -111,6 +111,8 @@
     /* Enable various cdrom drivers */
     #ifndef _LP64
     #define SDL_CDROM_MACOSX       1
    +#else
    +#define SDL_CDROM_DISABLED     1
     #endif

But I can hunt the _SDL_SYS_CD* issues down myself, so I’m not too
worried about it. Likely just an #ifdef missing somewhere.

So SDL 1.3 is close to compiling properly on Mac OS X 64-bit
targets,
any suggestions for the above issues?

  • Steven

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


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


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

Do so here: http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Bottom of the page.

  • StevenOn Wed, May 13, 2009 at 12:25 PM, wrote:

I went to the website a few times and it’s been over a month and i’m still getting these emails. please someone remove me as i am no longer interested. Thank you


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

Did several times. “the website”

---- Steven Noonan wrote:=============
Do so here: http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Bottom of the page.

  • Steven

On Wed, May 13, 2009 at 12:25 PM, <@necron> wrote:

I went to the website a few times and it’s been over a month and i’m still getting these emails. please someone remove me as i am no longer interested. Thank you


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


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

Did it send a confirmation mail asking whether you did or didn’t want
to unsubscribe?On Wed, May 13, 2009 at 1:24 PM, wrote:

Did several times. “the website”

---- Steven Noonan <@Steven_Noonan> wrote:

=============
Do so here: http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Bottom of the page.

  • Steven

On Wed, May 13, 2009 at 12:25 PM, ? wrote:

I went to the website a few times and it’s been over a month and i’m still getting these emails. please someone remove me as i am no longer interested. Thank you


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


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


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

Also, you’re using tabs and I’m noticing that the SDL source uses 4
spaces instead of a tab character. Try to keep it consistent. :slight_smile:

Oh, this can be the problem.

But then it is possible to use the LP64 or the 10.5 define, because a 64bit
SDL is only possible in 10.5 and greater because in 10.4 there is no 64bit
Cocoa.

I will create a new patch this weekend. Thanks for your advise to use the -u
parameter. I’m new to this tool as I mentioned in my first mail.

  • Matti

Am 13.05.2009 um 20:50 schrieb Steven Noonan:

Oh, wait, I know why. I bet the added code in the patch is
10.5-specific, is it not?

  • Steven

On Wed, May 13, 2009 at 11:47 AM, Steven Noonan <@Steven_Noonan> wrote:

Ah yes, I did notice this after I sent my initial email. I don’t know
whether everyone would agree with me, but I think the unified diff
format (diff -u) is more widely accepted than the particular patch
format you used. Anyway, I applied the patch locally, and you have
some pretty bad whitespace clobbering in your patch. I also get this
on ppc and i386 (though interestingly x86_64 and ppc64 work fine):

? cd /Users/steven/Development/SDL/Xcode/SDL
? /Developer/usr/bin/gcc-4.0 -x objective-c -arch i386
-fmessage-length=0 -pipe -Wno-trigraphs -fpascal-strings -fasm-blocks
-O0 -DSDL_VIDEO_DRIVER_X11=1 -DSDL_VIDEO_DRIVER_X11_DPMS=1
-DSDL_VIDEO_DRIVER_X11_DYNAMIC="/usr/X11R6/lib/libX11.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XEXT="/usr/X11R6/lib/libXext.6.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRANDR="/usr/X11R6/lib/libXrandr.2.dylib"

-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XRENDER="/usr/X11R6/lib/libXrender.1.dylib"
-DSDL_VIDEO_DRIVER_X11_DYNAMIC_XINPUT="/usr/X11R6/lib/libXi.6.dylib"
-DSDL_VIDEO_DRIVER_X11_VIDMODE=1 -DSDL_VIDEO_DRIVER_X11_XINERAMA=1
-DSDL_VIDEO_DRIVER_X11_XME=1 -DSDL_VIDEO_DRIVER_X11_XRANDR=1
-DSDL_VIDEO_DRIVER_X11_XINPUT=1 -DSDL_VIDEO_DRIVER_X11_XV=1
-DSDL_VIDEO_OPENGL_GLX=1 -isysroot /Developer/SDKs/MacOSX10.4u.sdk
-ftree-vectorize -msse3 -fvisibility=hidden -mmacosx-version-min=10.4
-gdwarf-2
-I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/SDL.hmap
-Wmost -F/Users/steven/Development/SDL/Xcode/SDL/build/Development
-I/Users/steven/Development/SDL/Xcode/SDL/build/Development/include
-I/Developer/SDKs/MacOSX10.4u.sdk/usr/X11R6/include

-I/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/DerivedSources
-c
/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m
-o
/Users/steven/Development/SDL/Xcode/SDL/build/SDL.build/Development/Framework.build/Objects-normal/i386/SDL_cocoakeyboard.o

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:
In function ?UpdateKeymap?:

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: (Each undeclared identifier is reported only once

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: for each function it appears in.)

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: ?TISInputSourceRef? undeclared (first use in this function)

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:353:
error: syntax error before ?key_layout?

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
error: ?key_layout? undeclared (first use in this function)

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:360:
warning: implicit declaration of function
?TISCopyCurrentKeyboardLayoutInputSource?

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
warning: implicit declaration of function ?TISGetInputSourceProperty?

/Users/steven/Development/SDL/Xcode/SDL/…/…/src/video/cocoa/SDL_cocoakeyboard.m:369:
error: ?kTISPropertyUnicodeKeyLayoutData? undeclared (first use in
this function)

Ideas?

  • Steven

On Wed, May 13, 2009 at 2:17 AM, ?<m.hami at 42degreesoffreedom.com> wrote:

Hi.

Look at my patch:
http://lists.libsdl.org/pipermail/sdl-libsdl.org/2009-May/070374.html

You can try this. I don’t know if somebody can check or learn something
from my patch :wink:

  • Matti

On Tue, 12 May 2009 17:31:43 -0700, Steven Noonan <@Steven_Noonan> wrote:

Hi there,

I’ve made minor changes to the code (mainly to SDL_config_macosx.h,
and a few ifdefs in some other files) to try and get it compiling
under Mac OS X for x86_64 and ppc64 targets, but I end up with a few
linker errors (for both x86_64 and ppc64):

? ? ? ? ?"_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
? ? ? ? ?"_SDL_SYS_CDInit", referenced from:
? ? ? ? ? ? ?_SDL_CDROMInit in SDL_cdrom.o
? ? ? ? ?"_SDL_SYS_CDQuit", referenced from:
? ? ? ? ? ? ?_SDL_CDROMQuit in SDL_cdrom.o
? ? ? ?ld: symbol(s) not found
? ? ? ?collect2: ld returned 1 exit status

The _KLGet* calls are especially weird, because it’s actually calling
the 32-bit only Carbon APIs inside of Cocoa source files. Any chance
these can be swapped out for whatever the equivalent and appropriate
Cocoa API is?

I don’t know what the OBJC_IVAR$_NSScreen._frame linker issue is at
all. Any idea what this is about?

The _SDL_SYS_CD* calls shouldn’t even be there, as I’ve got this
change in the SDL_config_macosx.h:

? ? ? ?diff --git a/include/SDL_config_macosx.h
? ? ? ?b/include/SDL_config_macosx.h
? ? ? ?index 5117c17…d1180e2 100644
? ? ? ?— a/include/SDL_config_macosx.h
? ? ? ?+++ b/include/SDL_config_macosx.h
? ? ? ?@@ -111,6 +111,8 @@
? ? ? ? /* Enable various cdrom drivers */
? ? ? ? #ifndef _LP64
? ? ? ? #define SDL_CDROM_MACOSX ? ? ? 1
? ? ? ?+#else
? ? ? ?+#define SDL_CDROM_DISABLED ? ? 1
? ? ? ? #endif

But I can hunt the _SDL_SYS_CD* issues down myself, so I’m not too
worried about it. Likely just an #ifdef missing somewhere.

So SDL 1.3 is close to compiling properly on Mac OS X 64-bit targets,
any suggestions for the above issues?

  • Steven

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


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


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


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