Fix power8/power9 build issues#155
Merged
Merged
Conversation
The linux-power9.jsonl file contained a hardcoded absolute path to gcc from the HPC cluster where it was generated, breaking builds on any other ppc64le system. Replace with "gcc" to match all other architectures. Closes explosiongh-151 Changes made by hand, and verified with Claude Opus 4.6
Previously all ppc64le machines were mapped to the power9 target, which uses -mcpu=power9 flags that generate instructions unavailable on older CPUs like Power8, causing segfaults at runtime. Now parse /proc/cpuinfo to detect the actual CPU generation and use `generic` if POWER8 is found. If not, we default to `power9` for Power9/10/11 machines, and this will also be the default in corner cases where detection fails (e.g., building under QEMU). Closes explosiongh-96 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Contributor
Author
|
This should be a straightforward fix and CI is green, so I'll put this in. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two fixes:
Fix ppc64le arch detection: only use power9 target on Power9+ CPUs
Previously all ppc64le machines were mapped to the power9 target, which
uses -mcpu=power9 flags that generate instructions unavailable on older
CPUs like Power8, causing segfaults at runtime. Now parse /proc/cpuinfo
to detect the actual CPU generation and use
genericif POWER8 isfound. If not, we default to
power9for Power9/10/11 machines, andthis will also be the default in corner cases where detection fails
(e.g., building under QEMU).
Closes python core dump on Power8 #96
Fix ppc64le builds: replace hardcoded gcc path with portable "gcc"
The linux-power9.jsonl file contained a hardcoded absolute path to gcc
from the HPC cluster where it was generated, breaking builds on any
other ppc64le system. Replace with "gcc" to match all other architectures.
Closes linux-power9.jsonl contains hardcoded absolute compiler path that breaks builds on other ppc64le #151
The fix for (2) I made by hand and verified with Claude (Opus 4.6). The fix for (1) I developed with Claude.
I then tested this under QEMU on my fork (see this CI log) to build some more confidence that the
ppc64lebuilds will actually work after these changes. That job took an hour, which seems a bit long to add to this repo. Most of that is buildingnumpyfrom source.