1. pygame
  2. pygame
  3. pygame
  4. Issues

Issues

Issue #182 resolved

Compile failure with Clang

xiongchiamiov
created an issue

This has been reported in a few other threads, but always in the context of some other OS X-related problem; I figured it should get its own issue.

[$]> CFLAGS='-I/usr/local/include/SDL' pip install pygame
Downloading/unpacking pygame
[snip]
clang -DNDEBUG -g -fwrapv -Os -Wall -Wstrict-prototypes -I/usr/local/include/SDL -arch i386 -arch x86_64 -pipe -D_NO_MMX_FOR_X86_64 -I/NEED_INC_PATH_FIX -I/System/Library/F[11/3327]
/Python.framework/Versions/2.7/include/python2.7 -c src/scale_mmx.c -o build/temp.macosx-10.7-intel-2.7/src/scale_mmx.o

In file included from src/scale_mmx.c:33:

src/scale_mmx64.c:424:27: error: invalid instruction mnemonic 'movsxl'

        asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ "

                          ^

<inline asm>:1:191: note: instantiated into assembly here

         /* MMX code for inner loop of X bilinear filter */  movl             -44(%rbp),      %ecx;            pxor          %mm0,      %mm0;           1:                                           movsxl         (%rbx),      %rax;            add              $4,         %rbx;            movq           (%rdi),      %mm1;            add              $8,         %rdi;            movq           (%r10),      %mm2;            add              $8,         %r10;            movd   (%r14,%rax,4),      %mm4;            movd  4(%r14,%rax,4),      %mm5;            punpcklbw     %mm0,      %mm4;            punpcklbw     %mm0,      %mm5;            pmullw        %mm1,      %mm4;            pmullw        %mm2,      %mm5;            paddw         %mm4,      %mm5;            psrlw            $8,      %mm5;            packuswb      %mm0,      %mm5;            movd          %mm5,       (%r9);            add
         $4,         %r9;            decl          %ecx;                        jne              1b;                        emms;


                ^~~~~~

In file included from src/scale_mmx.c:33:

src/scale_mmx64.c:499:27: error: invalid instruction mnemonic 'movsxl'

        asm __volatile__( " /* MMX code for inner loop of X bilinear filter */ "

                          ^

<inline asm>:1:191: note: instantiated into assembly here

         /* MMX code for inner loop of X bilinear filter */  movl             -44(%rbp),      %ecx;            pxor          %mm0,      %mm0;           1:
                movsxl         (%rbx),      %rax;            add              $4,         %rbx;            movq           (%rdi),      %mm1;            add              $8,
%rdi;            movq           (%r10),      %mm2;            add              $8,         %r10;            movd   (%r14,%rax,4),      %mm4;            movd  4(%r14,%rax,4),      %m
m5;            punpcklbw     %mm0,      %mm4;            punpcklbw     %mm0,      %mm5;            pmullw        %mm1,      %mm4;            pmullw        %mm2,      %mm5;
  paddw         %mm4,      %mm5;            psrlw            $8,      %mm5;            packuswb      %mm0,      %mm5;            movd          %mm5,       (%r9);            add
         $4,         %r9;            decl          %ecx;                        jne              1b;                        emms;


                ^~~~~~

2 errors generated.

error: command 'clang' failed with exit status 1

The build succeeds when run with GCC (via CC=gcc).

Comments (2)

  1. Log in to comment