Building SDL 1.3 for Android on OSX 10.6.4

Hi,I’ve having troubling building SDL 1.3 for android on OSX 10.6.4.Here’s what I did:1) Copied SDL/android-project folder to ~/Documents/myproject2) Copied SDL to ~/Documents/myproject/jni/SDL3) set environment var NDK_PROJECT_PATH to ~/Documents/myproject4) ran ndk-build 5) Got error: …/SDL/include/SDL_stdinc.h:79:20: error: iconv.h: No such file or directory6) Copied iconv.h an from libiconv-1.13.1 to ~/Documents/myproject/jni/SDL/include/iconv.h
7) ran ndk-build
8) Got error:
…/SDL/include/SDL_syswm.h:69:22: error: X11/Xlib.h: No such file or directory
9) Installed X11 2.6.1
10) Copied /opt/X11/include/X11/Xlib.h to ~/Documents/myproject/jni/SDL/include/X11/Xlib.h Copied /opt/X11/include/X11/X.h to ~/Documents/myproject/jni/SDL/include/X11/X.h Copied /opt/X11/include/X11/Xfuncproto.h to ~/Documents/myproject/jni/SDL/include/X11/Xfuncproto.h Copied /opt/X11/include/X11/Xosdefs.h to ~/Documents/myproject/jni/SDL/include/X11/Xosdefs.h Copied /opt/X11/include/X11/Xatom.h to ~/Documents/myproject/jni/SDL/include/X11/Xatom.h
11) ran ndk-build
12) Got error:
SDL/src/cpuinfo/SDL_cpuinfo.c:33:24: error: sys/sysctl.h: No such file or directory
I’m not sure which sys/sysctl.h to use. Any ideas?
Am I going about this the right way? Has any succeeded in building sdl for android on osx 10.4? What steps did you follow?
Thanks!

  • Jim

You most probably are trying to build with a source code tree that you used for another build (at least it looks like you did a “./configure” there, right?).

Use a clean tree and that should help. Android doesn’t need X11 :slight_smile:

Yes - This was the problem. Thanks very much for your help!

  • JimFrom: joseba.gar@gmail.com
    Date: Thu, 14 Apr 2011 08:24:59 -0700
    To: sdl at lists.libsdl.org
    Subject: Re: [SDL] Building SDL 1.3 for Android on OSX 10.6.4

    You most probably are trying to build with a source code tree that you used for another build (at least it looks like you did a “./configure” there, right?).

Use a clean tree and that should help. Android doesn’t need X11


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