tomotopy
tomotopy copied to clipboard
Mac M1 cpuid installation error
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
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.
@TamHHM From v0.12.4, tomotopy supports Apple Silicons. You can test it with the latest version.