Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CMake Android build is broken by 8c6b05b0a27e [Patch] #2074

Closed
SDLBugzilla opened this issue Feb 11, 2021 · 0 comments
Closed

CMake Android build is broken by 8c6b05b0a27e [Patch] #2074

SDLBugzilla opened this issue Feb 11, 2021 · 0 comments

Comments

@SDLBugzilla
Copy link
Collaborator

@SDLBugzilla SDLBugzilla commented Feb 11, 2021

This bug report was migrated from our old Bugzilla tracker.

These attachments are available in the static archive:

Reported in version: 2.0.4
Reported for operating system, platform: Android (All), All

Comments on the original bug report:

On 2016-01-10 17:33:14 +0000, Martin Gerhardy wrote:

See logs here: https://travis-ci.org/mgerhardy/caveexpress/jobs/101429468 (line 5495)

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_OpenAudioDevice':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:605:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jboolean isCopy = JNI_FALSE;

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_ExceptionOccurred':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:658:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 JNIEnv *mEnv = Android_JNI_GetEnv();

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:672:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

         jstring exceptionName = (jstring)(*mEnv)->CallObjectMethod(mEnv, exceptionClass, mid);

         ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:676:13: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

         jstring exceptionMessage = (jstring)(*mEnv)->CallObjectMethod(mEnv, exception, mid);

         ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_FileOpen':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:870:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jstring fileNameJString = (*mEnv)->NewStringUTF(mEnv, fileName);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_FileRead':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:892:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     size_t result = read(ctx->hidden.androidio.fd, buffer, bytesMax );

     ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:908:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     JNIEnv *mEnv = Android_JNI_GetEnv();

     ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:914:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     jobject readableByteChannel = (jobject)ctx->hidden.androidio.readableByteChannelRef;

     ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_FileSeek':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1024:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     off_t ret = lseek(ctx->hidden.androidio.fd, (off_t)offset, SEEK_SET);

     ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1052:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     Sint64 movement = newPosition - ctx->hidden.androidio.position;

     ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1062:17: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

             size_t result = Android_JNI_FileRead(ctx, buffer, 1, amount);

             ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_GetSystemServiceObject':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1101:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jstring service = (*env)->NewStringUTF(env, name);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1106:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1109:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jobject manager = (*env)->CallObjectMethod(env, context, mid, service);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_SetClipboardText':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1136:214: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 SETUP_CLIPBOARD(-1)

                                                                                                                                                                                                                  ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1138:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, clipboard), "setText", "(Ljava/lang/CharSequence;)V");

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_GetClipboardText':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1151:231: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 SETUP_CLIPBOARD(SDL_strdup(""))

                                                                                                                                                                                                                                   ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1153:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, clipboard), "getText", "()Ljava/lang/CharSequence;");

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1158:9: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     jstring string = (jstring)((*env)->CallObjectMethod(env, sequence, mid));

     ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_HasClipboardText':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1177:221: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 SETUP_CLIPBOARD(SDL_FALSE)

                                                                                                                                                                                                                         ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1179:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jmethodID mid = (*env)->GetMethodID(env, (*env)->GetObjectClass(env, clipboard), "hasText", "()Z");

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_GetPowerInfo':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1202:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jmethodID mid;

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1205:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jobject context = (*env)->CallStaticObjectMethod(env, mActivityClass, mid);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1212:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jobject filter = (*env)->NewObject(env, cls, mid, action);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1217:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jobject intent = (*env)->CallObjectMethod(env, context, mid, NULL, filter);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1223:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jstring iname;

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1240:55: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     GET_INT_EXTRA(plug, "plugged") /* == BatteryManager.EXTRA_PLUGGED (API 5) */

                                                   ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1251:54: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     GET_INT_EXTRA(status, "status") /* == BatteryManager.EXTRA_STATUS (API 5) */

                                                  ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1261:55: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     GET_BOOL_EXTRA(present, "present") /* == BatteryManager.EXTRA_PRESENT (API 5) */

                                                   ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1270:53: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     GET_INT_EXTRA(level, "level") /* == BatteryManager.EXTRA_LEVEL (API 5) */

                                                 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1271:53: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

     GET_INT_EXTRA(scale, "scale") /* == BatteryManager.EXTRA_SCALE (API 5) */

                                                 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_SendMessage':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1327:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jmethodID mid = (*env)->GetStaticMethodID(env, mActivityClass, "sendMessage", "(II)Z");

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1331:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jboolean success = (*env)->CallStaticBooleanMethod(env, mActivityClass, mid, command, param);

 ^

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c: In function 'Android_JNI_ShowTextInput':

/home/travis/build/mgerhardy/caveexpress/src/libs/sdl2/src/core/android/SDL_android.c:1347:5: error: ISO C90 forbids mixed declarations and code [-Werror=declaration-after-statement]

 jmethodID mid = (*env)->GetStaticMethodID(env, mActivityClass, "showTextInput", "(IIII)Z");

 ^

On 2016-01-10 18:58:33 +0000, Martin Gerhardy wrote:

Created attachment 2362
the patch

This patch fixes it

On 2016-01-10 19:00:40 +0000, Martin Gerhardy wrote:

just as a reference:

mgerhardy/caveexpress@0d94383

https://travis-ci.org/mgerhardy/caveexpress/builds/101429467 <--- broken since sdl update
https://travis-ci.org/mgerhardy/caveexpress/builds/101444053 <--- fixed

On 2016-02-19 20:23:58 +0000, Philipp Wiesemann wrote:

The similar patch from later bug # 3264 may have fixed this problem.

On 2017-08-12 15:02:03 +0000, Sam Lantinga wrote:

This should be fixed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant