Skip to content

x86 inline assembly fails to build #1238

@Rybec

Description

@Rybec

It looks like I won't be able to use python-for-android for my project. It is way too buggy, the issues I have posted have not gotten any response, and it looks like the project has been dead since November.

I will post my issues though, in case someone eventually cares.

To start with, this issue is part of a string of issues. See #1233 for where I left off. (The most important thing from that is that I had to copy an asm directory from the i686 includes into sysroot/usr/include to get it past a problem finding types.h. I don't think this is related to that, but it could be.

[x86] Compile        : sdl <= SDL_RLEaccel.c
/usr/bin/ccache /home/ndkbuild/Android/android-ndk-r16b/toolchains/llvm/prebuilt/linux-x86_64/bin/clang -MMD -MP -MF /home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/obj/local/x86/objs/sdl/src/video/SDL_RLEaccel.o.d -gcc-toolchain /home/ndkbuild/Android/android-ndk-r16b/toolchains/x86-4.9/prebuilt/linux-x86_64 -target i686-none-linux-android -ffunction-sections -funwind-tables -fstack-protector-strong -fPIC -Wno-invalid-command-line-argument -Wno-unused-command-line-argument -no-canonical-prefixes -g -O2 -DNDEBUG  -I/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl   -DANDROID -I/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/include -DSDL_JAVA_PACKAGE_PATH=org_renpy_android -DSDL_CURDIR_PATH=\"org.renpy.android\" -DSDL_TRACKBALL_KEYUP_DELAY=1 -DSDL_VIDEO_RENDER_RESIZE=0 -DSDL_ANDROID_KEYCODE_MOUSE=UNKNOWN -DSDL_ANDROID_KEYCODE_0=SPACE -DSDL_ANDROID_KEYCODE_1=RETURN -DSDL_ANDROID_KEYCODE_2=LCTRL -DSDL_ANDROID_KEYCODE_3=LALT -DSDL_ANDROID_KEYCODE_4=RETURN -D__ANDROID_API__=14 -Wa,--noexecstack -Wformat -Werror=format-security -mstackrealign  --sysroot /home/ndkbuild/Android/android-ndk-r16b/sysroot -isystem /home/ndkbuild/Android/android-ndk-r16b/sysroot/usr/include/i686-linux-android -c  /home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c -o /home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/obj/local/x86/objs/sdl/src/video/SDL_RLEaccel.o
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:688:24: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(4, Uint16, ALPHA_BLIT32_888_50MMX);\
                                                   ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm2, %edi
                   ^~~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:695:24: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(4, Uint16, ALPHA_BLIT32_888MMX);\
                                                   ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm2, %eax
                   ^~~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:647:23: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
                                                  ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm3, %ax
                   ^~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:831:5: error: invalid operand for instruction
    CHOOSE_BLIT(RLECLIPBLIT, alpha, fmt);
    ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:663:23: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(2, Uint8, ALPHA_BLIT16_555MMX); \
                                                  ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm3, %ax
                   ^~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:930:6: error: invalid operand for instruction
            CHOOSE_BLIT(RLEBLIT, alpha, fmt);
            ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:688:24: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(4, Uint16, ALPHA_BLIT32_888_50MMX);\
                                                   ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm2, %ecx
                   ^~~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:930:6: error: invalid operand for instruction
            CHOOSE_BLIT(RLEBLIT, alpha, fmt);
            ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:695:24: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(4, Uint16, ALPHA_BLIT32_888MMX);\
                                                   ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm2, %edi
                   ^~~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:930:6: error: invalid operand for instruction
            CHOOSE_BLIT(RLEBLIT, alpha, fmt);
            ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:647:23: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(2, Uint8, ALPHA_BLIT16_565MMX); \
                                                  ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm3, %cx
                   ^~~
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:930:6: error: invalid operand for instruction
            CHOOSE_BLIT(RLEBLIT, alpha, fmt);
            ^
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:663:23: note: expanded from macro 'CHOOSE_BLIT'
                                blitter(2, Uint8, ALPHA_BLIT16_555MMX); \
                                                  ^
<inline asm>:1:13: note: instantiated into assembly here
        movq %mm3, %cx
                   ^~~
8 errors generated.
make: *** [/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/obj/local/x86/objs/sdl/src/video/SDL_RLEaccel.o] Error 1


  STDERR:


[INFO]:    STDOUT (last 20 lines of 158):                                                                                  
	/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:930:6: error: invalid operand for instruction	
            CHOOSE_BLIT(RLEBLIT, alpha, fmt);	
            ^	
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:647:23: note: expanded from macro 'CHOOSE_BLIT'	
                                blitter(2, Uint8, ALPHA_BLIT16_565MMX); \	
                                                  ^	
<inline asm>:1:13: note: instantiated into assembly here	
        movq %mm3, %cx	
                   ^~~	
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:930:6: error: invalid operand for instruction	
            CHOOSE_BLIT(RLEBLIT, alpha, fmt);	
            ^	
/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni/../jni/sdl/src/video/SDL_RLEaccel.c:663:23: note: expanded from macro 'CHOOSE_BLIT'	
                                blitter(2, Uint8, ALPHA_BLIT16_555MMX); \	
                                                  ^	
<inline asm>:1:13: note: instantiated into assembly here	
        movq %mm3, %cx	
                   ^~~	
8 errors generated.	
make: *** [/home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/obj/local/x86/objs/sdl/src/video/SDL_RLEaccel.o] Error 1
[INFO]:    STDERR:
	
[INFO]:    COMMAND:
cd /home/ndkbuild/.local/share/python-for-android/build/bootstrap_builds/pygame/jni && /home/ndkbuild/Android/android-ndk-r16b/ndk-build V=1

[WARNING]: ERROR: /home/ndkbuild/Android/android-ndk-r16b/ndk-build failed!
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions