tomotopy icon indicating copy to clipboard operation
tomotopy copied to clipboard

Mac M1 cpuid installation error

Open TamHHM opened this issue 2 years ago • 1 comments

Hi, I encoutered the below errors when installing tomotopy. Please help me fix it. Thank you very much:

     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:14:2: error: this header is for x86 only
     #error this header is for x86 only
      ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:286:5: error: invalid output constraint '=a' in asm
         __cpuid(__leaf, __eax, __ebx, __ecx, __edx);
         ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:251:11: note: expanded from macro '__cpuid'
             : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
               ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:301:5: error: invalid output constraint '=a' in asm
         __cpuid(__leaf, *__eax, *__ebx, *__ecx, *__edx);
         ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:251:11: note: expanded from macro '__cpuid'
             : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
               ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:315:5: error: invalid output constraint '=a' in asm
         __cpuid_count(__leaf, __subleaf, *__eax, *__ebx, *__ecx, *__edx);
         ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:258:11: note: expanded from macro '__cpuid_count'
             : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
               ^
     src/python/py_rt.cpp:30:34: error: invalid output constraint '=a' in asm
             __asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
                                             ^
     src/python/py_rt.cpp:38:2: error: invalid output constraint '=a' in asm
             __cpuid_count(InfoType, 0, info[0], info[1], info[2], info[3]);
             ^
     /Library/Developer/CommandLineTools/usr/lib/clang/13.1.6/include/cpuid.h:258:11: note: expanded from macro '__cpuid_count'
             : "=a"(__eax), "=r" (__ebx), "=c"(__ecx), "=d"(__edx) \
               ^
     6 errors generated.
     error: command '/usr/bin/clang' failed with exit code 1

TamHHM avatar Jun 22 '22 07:06 TamHHM

Duplicated issue: #153 . Current tomotopy doesn't support M1 and porting for M1 is working on. It can take a long time to work, so I recommend using Rosetta.

bab2min avatar Jun 23 '22 15:06 bab2min

@TamHHM From v0.12.4, tomotopy supports Apple Silicons. You can test it with the latest version.

bab2min avatar Jan 22 '23 18:01 bab2min