Skip to content

Fix build on Apple Silicon (ARM64) by updating config.sub/guess#15

Open
Hayyim-H wants to merge 1 commit intoMP-Gadget:masterfrom
Hayyim-H:fix-apple-silicon-support
Open

Fix build on Apple Silicon (ARM64) by updating config.sub/guess#15
Hayyim-H wants to merge 1 commit intoMP-Gadget:masterfrom
Hayyim-H:fix-apple-silicon-support

Conversation

@Hayyim-H
Copy link

Description

This PR fixes a build issue that occurs on modern macOS machines with Apple Silicon (M1/M2/M3/M4 chips).

Currently, when pip or setup.py attempts to build the package on an arm64-apple architecture, the embedded configuration files inside the downloaded pfft and fftw3 tarball are too old to recognize the ARM64 architecture, resulting in the following fatal error:
Invalid configuration 'arm64-apple-darwin': machine 'arm64-apple' not recognized

Changes Made

Added a few lines in depends/install_pfft.sh right after the tarball is extracted. It downloads the latest config.sub and config.guess directly from the official GCC mirror and replaces the outdated ones in both the pfft root and the embedded fftw3 directory.

This allows the ./configure step to successfully identify the architecture and compile the C code without issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant