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

Python 3.9/3.10 on Darwin runners fails: Error: dyld[78135]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib #906

Closed
3 tasks
chandapukiran opened this issue Jul 5, 2024 · 6 comments
Assignees
Labels
bug Something isn't working

Comments

@chandapukiran
Copy link

Description:
A clear and concise description of what the bug is.

Builds with version 3.9-3.10 fails but 3.11 - 3.12 works

ProductName: macOS
ProductVersion: 13.5.2
x86_64

Version 3.10 was not found in the local cache
  Version 3.10 is available for downloading
  Download from "https://github.com/actions/python-versions/releases/download/3.10.14-9599980810/python-3.10.14-darwin-x64.tar.gz"
  Extract downloaded archive
  /usr/bin/tar xz -C /Users/ec2-user/actions-runner/_work/_temp/8eccc640-de31-4d86-81c8-994b12a8c68e -f /Users/ec2-user/actions-runner/_work/_temp/bc1e5092-3cbd-47ff-ad32-e931edd08ee8
  Execute installation script
  Check if Python hostedtoolcache folder exist...
  Create Python 3.10.14 folder
  Copy Python binaries to hostedtoolcache folder
  Create additional symlinks (Required for the UsePythonVersion Azure Pipelines task and the setup-python GitHub Action)
  Upgrading pip...
  Error: dyld[78[13](https://xxxxxxxx/actions/runs/863555/job/2827548#step:3:14)5]: Library not loaded: /usr/local/opt/gettext/lib/libintl.8.dylib
    Referenced from: <09857011-94D0-3FBA-9F9D-9FCE0E7366FF> /Users/runner/hostedtoolcache/Python/3.10.[14](https://xxxxxxxxx/actions/runs/863555/job/2827548#step:3:15)/x64/bin/python3.10
    Reason: tried: '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/System/Volumes/Preboot/Cryptexes/OS/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/opt/gettext/lib/libintl.8.dylib' (no such file), '/usr/local/lib/libintl.8.d
  Error: ylib' (no such file), '/usr/lib/libintl.8.dylib' (no such file, not in dyld cache)
  Error: ./setup.sh: line 54: 78135 Abort trap: 6           ./python -m ensurepip
  Error: The process '/usr/local/bin/bash' failed with exit code 134

Action version:
Specify the action version

Platform:

  • Ubuntu
  • [ X] macOS
  • Windows

Runner type:

  • Hosted
  • [X ] Self-hosted

Tools version:

Repro steps:
A description with steps to reproduce the issue. If your have a public example or repo to share, please provide the link.

Expected behavior:
A description of what you expected to happen.
Successful installation
Actual behavior:
Failed installation

@chandapukiran chandapukiran added bug Something isn't working needs triage labels Jul 5, 2024
@aparnajyothi-y
Copy link
Contributor

Hello @chandapukiran, Thank you for creating this issue and the actions/setup-python repository does not support x64 packages for Python <3.11 version on macOS arm64 runners due to compatibility and build issues. The build process for Python versions less than 3.11 involves downloading the official Python sources from python.org and building them using the make tool on the oldest available version of macOS that was available when that Python version was released. This is done to ensure backward compatibility for those Python versions as mentioned in this python-versions documentation.
However, this build process can run into compatibility issues on macOS arm64 runners. The arm64 architecture is used in Apple's newer Mac models that use Apple Silicon processors, which are based on a different instruction set than the x86-64 processors used in older models.
Therefore, the built Python packages for versions less than 3.11 may trigger the issues like few modules missing on macOS arm64 runners. This is why the actions/setup-python repository does not support x64 packages for <Python 3.11 versions on macOS arm64 runners.
For Python versions 3.11 and onwards, the actions/setup-python repository uses the official macOS universal2 Python binaries from python.org, which are compatible with both x86-64 and arm64 architectures. These can be used on macOS arm64 runners without any issues.
For Arm64 platform, we use official macOS universal2 Python binaries and provide only versions which are provided by Python org.
Please feel free to reach us needed to reopen this issue for more clarifications.

@chandapukiran
Copy link
Author

Hi @aparnajyothi-y , we use X86 based Mac OS
ProductName: macOS
ProductVersion: 13.5.2
x86_64

Does the issue occur only with ARM based or X86 as well ?

@AShunevych
Copy link

AShunevych commented Jul 8, 2024

Hi @aparnajyothi-y , we use X86 based Mac OS ProductName: macOS ProductVersion: 13.5.2 x86_64

Does the issue occur only with ARM based or X86 as well ?

x86_64 means you use x64, not x86.

However, installing Python 3.10 on Mac OS 13.6.5 x86_64 causes the same error as you have.

- uses: actions/setup-python@v5
  with:
    python-version: '3.10' 

UPD.
Changed Python to 3.11, and got infinite install step

@aparnajyothi-y
Copy link
Contributor

Hello @chandapukiran, @AShunevych , Thank you for the response and for Python versions less than 3.11, the official Python sources are downloaded from python.org, built using the make tool, and archived along with the installation script for further distribution & installation which will raise compatibility issues on both x86-64 and arm64 architectures. Please refer to this documentation.

@AShunevych We have tested python3.11 package on macos-13 and it is successful. Please find the screenshot for reference and can you please share the workflow details to check the issue and assist further.

image

@aparnajyothi-y
Copy link
Contributor

Hello @chandapukiran, Please let us know if you still have any concerns/questions on the above information.

@chandapukiran
Copy link
Author

Thank you @aparnajyothi-y , no other questions

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants