rake-compiler: Builds incompatible code on MacOS M1 / arm64 architecture
when building the C-extension, it builds x86_64 code on a arm64 CPU, which results in this error:
require 'my_gem.bundle'
LoadError: .... (mach-o file, but is an incompatible architecture (have 'x86_64', need 'arm64')
Is the CPU type is not correctly detected?
Is there a way to force the rake-compiler to only build code that exactly matches the CPU architecture?
About this issue
- Original URL
- State: open
- Created 6 months ago
- Comments: 25 (12 by maintainers)
I couldn’t reproduce this with Homebrew’s Ruby:
Could you show full command line outputs like the above on your environment?