0.9.2 build for android. How to solve this problem
System:Ubuntu
NDK: r5b
# make -f Makefile.android
/usr/bin/cmake -E make_directory /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/out
/home/user-ciwei/ciwei/ndk/ndk-build -C /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project -j 8
make[1]: Entering directory '/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project'
Compile thumb : SDL2 <= SDL_keyboard.c
Compile thumb : SDL2 <= SDL_windowevents.c
Compile thumb : SDL2 <= SDL_androidaudio.c
Compile thumb : SDL2 <= SDL_events.c
Compile thumb : SDL2 <= SDL_gesture.c
Compile thumb : SDL2 <= SDL_mouse.c
Compile thumb : SDL2 <= SDL_android.c
Compile thumb : SDL2 <= SDL_clipboardevents.c
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/audio/android/SDL_androidaudio.c:31:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/audio/android/../../core/android/SDL_android.h:30:29: error: EGL/eglplatform.h: No such file or directory
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/audio/android/../../core/android/SDL_android.h:31:39: error: android/native_window_jni.h: No such file or directory
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/audio/android/SDL_androidaudio.c:31:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/audio/android/../../core/android/SDL_android.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' tokenIn file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:30:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.h:30:29: error: EGL/eglplatform.h: No such file or directory
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.h:31:39: error: android/native_window_jni.h: No such file or directory
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:30:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:31:21: error: EGL/egl.h: No such file or directory
/home/user-ciwei/ciwei/ndk/build/core/build-binary.mk:197: recipe for target '/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/obj/local/armeabi/objs/SDL2/src/audio/android/SDL_androidaudio.o' failed
make[1]: *** [/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/obj/local/armeabi/objs/SDL2/src/audio/android/SDL_androidaudio.o] Error 1
make[1]: *** 正在等待未完成的任务....
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/SDL_androidwindow.h:26,
from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:38:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../../core/android/SDL_android.h:40: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:28,
from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/SDL_androidwindow.h:27,
from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:38:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/include/SDL_egl.h:30:24: error: EGL/eglext.h: No such file or directory
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/SDL_androidwindow.h:27,
from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:38:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:35: error: expected specifier-qualifier-list before 'EGLDisplay'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:86: error: expected declaration specifiers or '...' before 'NativeDisplayType'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:93: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:94: error: expected declaration specifiers or '...' before 'EGLSurface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:97: error: expected declaration specifiers or '...' before 'EGLSurface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:98: error: expected declaration specifiers or '...' before 'EGLSurface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/../SDL_egl_c.h:99: error: expected declaration specifiers or '...' before 'EGLSurface'
In file included from /home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:38:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/../../video/android/SDL_androidwindow.h:36: error: expected specifier-qualifier-list before 'EGLSurface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c: In function 'Java_org_libsdl_app_SDLActivity_onNativeSurfaceChanged':
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:228: error: 'SDL_WindowData' has no member named 'egl_surface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:228: error: 'EGL_NO_SURFACE' undeclared (first use in this function)
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:228: error: (Each undeclared identifier is reported only once
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:228: error: for each function it appears in.)
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:229: error: 'SDL_WindowData' has no member named 'native_window'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:230: error: 'SDL_WindowData' has no member named 'native_window'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:232: error: 'SDL_WindowData' has no member named 'native_window'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:233: error: 'SDL_WindowData' has no member named 'egl_surface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:233: error: 'NativeWindowType' undeclared (first use in this function)
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:233: error: expected ')' before 'data'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c: In function 'Java_org_libsdl_app_SDLActivity_onNativeSurfaceDestroyed':
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:257: error: 'SDL_WindowData' has no member named 'egl_surface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:257: error: 'EGL_NO_SURFACE' undeclared (first use in this function)
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:258: error: too many arguments to function 'SDL_EGL_MakeCurrent'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:259: error: 'SDL_WindowData' has no member named 'egl_surface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:259: error: too many arguments to function 'SDL_EGL_DestroySurface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:260: error: 'SDL_WindowData' has no member named 'egl_surface'
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c: At top level:
/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/jni/SDL/src/core/android/SDL_android.c:460: error: expected '=', ',', ';', 'asm' or '__attribute__' before '*' token
/home/user-ciwei/ciwei/ndk/build/core/build-binary.mk:197: recipe for target '/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/obj/local/armeabi/objs/SDL2/src/core/android/SDL_android.o' failed
make[1]: *** [/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project/obj/local/armeabi/objs/SDL2/src/core/android/SDL_android.o] Error 1
make[1]: Leaving directory '/home/user-ciwei/ciwei/hwmaster/project_files/Android-build/SDL-android-project'
Makefile.android:19: recipe for target 'build' failed
make: *** [build] Error 2
SDL sources which are integrated in hw for Android repo are really outdated, so as I can suggest to update from official SDL repo - hg.libsdl.org
In addition, I can say that Android version not maintained anymore since 2012
antonc27 is right about the bitrot. If you're interested in maintaining android, mind stopping by IRC? irc://irc.freenode.net/hedgewars (or livechat link at top of website).
--
Oh, what the heck. 1PLXzL1CBUD1kdEWqMrwNUfGrGiirV1WpH <= tip a hedgewars dev