Androideabi-strip: unable to rename libSDL2.so

Hello,

I am trying to compile SDL 2.0.0 for Android. I followed the instructions of including my project into the build process of libSDL. After a lot of tingling it does indeed build a libSDL2.so. However, it calls a strip command later that seems to fail.

Code:
(…)
"Compile thumb : SDL2 <= SDL_androidtouch.c
"Compile thumb : SDL2 <= SDL_androidwindow.c
SharedLibrary : libSDL2.so
Install : libSDL2.so => libs/armeabi/libSDL2.so

C:/android/android-ndk-r8c/toolchains/arm-linux-androideabi-4.6/prebuilt/windows/bin/arm-linux-androideabi-strip:
unable to rename ‘C:/android/projectfolder//libs/armeabi/libSDL2.so’; reason: File exists

make: *** [C:/android/projectfolder//libs/armeabi/libSDL2.so] Error 1
make: *** Deleting file `C:/android/projectfolder//libs/armeabi/libSDL2.so’

My development system:

  • Win 7, 64-bit
  • Android NDK r8c. Target armeabi and x86
  • cmd.exe (also tried it in cygwin: no change)
  • I have set these environment variables
    o ANDROID_NDK=C:\android\android-ndk-r8c
    o ANDROID_SDK=C:\android\adt-bundle-windows-x86_64-20130729\sdk
    o ANT_HOME=C:\android\adt-bundle-windows-x86_64-20130729\eclipse\plugins\org.apache.ant_1.8.3.v201301120609
    o JAVA_HOME=C:/Program Files/Java/jdk1.7.0_25/
    o PATH
    - %ANT_HOME%/bin
    - %ANDROID_SDK%\tools
    - %ANDROID_NDK%
    - %ANDROID_SDK%\platform-tools
    - %JAVA_HOME%\bin

A friend of mine tried the same files on his Ubuntu system and apparently it worked.

Does anyone know how to fix this?

Thanks in advance!

To answer my own post:
The strip command is not absolutely necessary. I didn’t find the exact location in the build process, so I created a dummy executable that always returns 0 and replaced this with the strip executbale(s) from the Android NDK. It works, but it is not a very clean way.