Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix multiarch macOS build by removing brewed liblzma #1207

Merged
merged 1 commit into from
Jul 27, 2023

Conversation

jmarshall
Copy link
Member

Python 3.11 is now the first actions/setup-python Python built to target universal2 (i.e., x86_64/arm64 multiarch) on macOS. (I think in the past 3.9 and 3.10 were also built to target universal2 for a while — at least, ISTR seeing multiarch builds on earlier Python versions — but this was later reverted; see actions/python-versions#114.)

Brewed packages such as xz (which provides liblzma.dylib and liblzma.a) are built for only a single native architecture. This led to build and configure failures when the native-only liblzma.dylib was linked against by a multiarch compilation.

Work around this by unlinking the xz package so that this brewed library is not found by the linker, failing back to the system .tbd file instead. If later build steps use brewed commands that need this library, we may need to brew link it again later, but for now we get away without it.

This enables us to reinstate the Python 3.11 build on macOS. Fixes #1205.

Python 3.11 is now the first actions/setup-python Python built
to target universal2 (i.e., x86_64/arm64 multiarch) on macOS.

Brewed packages such as xz (which provides liblzma.dylib and liblzma.a)
are built for only a single native architecture. This led to build and
configure failures when the native-only liblzma.dylib was linked against
by a multiarch compilation.

Work around this by unlinking the xz package so that this brewed library
is not found by the linker, failing back to the system .tbd file instead.
(Ignore errors, in case there are scenarios in which it is not installed.)
If later build steps use brewed commands that need this library, we may
need to `brew link` it again later, but for now we get away without it.
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.

pysam build fails for python 3.11 + macOS 12.6.7
1 participant