Skip to content

Fix setup on macOS ARM64 (Apple Silicon)#78

Open
Pierre-AdrienLefevre wants to merge 1 commit intojvkersch:mainfrom
Pierre-AdrienLefevre:fix-macos-arm64-setup
Open

Fix setup on macOS ARM64 (Apple Silicon)#78
Pierre-AdrienLefevre wants to merge 1 commit intojvkersch:mainfrom
Pierre-AdrienLefevre:fix-macos-arm64-setup

Conversation

@Pierre-AdrienLefevre
Copy link

This PR fixes the build process of pyconcorde on macOS with Apple Silicon (arm64) by updating the setup.py to set the appropriate compiler flags.

Changes
• Detects Darwin with arm64 architecture
• Sets CFLAGS and LDFLAGS to:
• -arch arm64
• -fPIC
• -O2
• -g
• -std=gnu89
• -isysroot using xcrun --show-sdk-path
• Allows compilation of concorde.a and qsopt.a for ARM-based Macs

Tested on
• macOS 15.4 (build 24E248)
• Apple M4 Pro
• Python 3.9
• Successful installation with pip install -e .
• Concorde binary built and executed correctly (TSP/concorde)

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