KMC icon indicating copy to clipboard operation
KMC copied to clipboard

Apple Silicon Build Issue

Open jeremiahpslewis opened this issue 1 year ago • 6 comments

Hi! I'm utterly new to the project, but wanted to build your tool for Apple ARM processors and seem to be hitting the following error:

[16:52:36] g++ -Wall -O3 -static-libgcc -static-libstdc++ -pthread -std=c++14 -c kmc_core/cpu_info.cpp -o kmc_core/cpu_info.o
[16:52:36] In member function ‘void CpuInfoImpl::cpuid(int*, int) const’,
[16:52:36]     inlined from ‘const std::string& CpuInfoImpl::GetBrand()’ at kmc_core/cpu_info.cpp:105:8,
[16:52:36]     inlined from ‘static const std::string& CCpuInfo::GetBrand()’ at kmc_core/cpu_info.cpp:135:31:
[16:52:36] kmc_core/cpu_info.cpp:52:17: error: impossible constraint in ‘asm’
[16:52:36]    52 |                 __asm__("cpuid\n\t"
[16:52:36]       |                 ^~~~~~~
[16:52:36] In member function ‘void CpuInfoImpl::cpuid(int*, int) const’,
[16:52:36]     inlined from ‘const std::string& CpuInfoImpl::GetBrand()’ at kmc_core/cpu_info.cpp:112:9,
[16:52:36]     inlined from ‘static const std::string& CCpuInfo::GetBrand()’ at kmc_core/cpu_info.cpp:135:31:
[16:52:36] kmc_core/cpu_info.cpp:52:17: error: impossible constraint in ‘asm’
[16:52:36]    52 |                 __asm__("cpuid\n\t"
[16:52:36]       |                 ^~~~~~~
[16:52:36] make: *** [Makefile:111: kmc_core/cpu_info.o] Error 1
[16:52:36]  ---> make kmc kmc_dump kmc_tools
[16:52:36]  ---> make kmc kmc_dump kmc_tools
[16:52:36] Previous command exited with 2
[16:52:36] Child Process exited, exit code 2

Is this something that might be amenable to a minor tweak?

jeremiahpslewis avatar Sep 26 '22 17:09 jeremiahpslewis