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

Bug: Broken SAM CLI v1.134.0 on MacOS Intel CPU #7898

Closed
dmitrikozlov opened this issue Feb 21, 2025 · 4 comments
Closed

Bug: Broken SAM CLI v1.134.0 on MacOS Intel CPU #7898

dmitrikozlov opened this issue Feb 21, 2025 · 4 comments
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. maintainer/need-followup

Comments

@dmitrikozlov
Copy link

dmitrikozlov commented Feb 21, 2025

Description:

Running the GUI installer (aws-sam-cli-macos-x86_64.pkg) for SAM as described here leads to a broken state where the SAM CLI cannot be called at all.

Steps to reproduce:

  1. Download installer
  2. Verify installer
  3. Run installer
  4. Verify CLI running sam --version
  5. Observe the error

Observed result:

[PYI-32442:ERROR] Failed to load Python shared library '/usr/local/aws-sam-cli/_internal/libpython3.11.dylib': dlopen: dlopen(/usr/local/aws-sam-cli/_internal/libpython3.11.dylib, 0x000A): Symbol not found: (_mkfifoat)
  Referenced from: '/usr/local/aws-sam-cli/_internal/libpython3.11.dylib'
  Expected in: '/usr/lib/libSystem.B.dylib'

Expected result:

> sam --version
SAM CLI, <latest version>

Alternative steps

  1. Remove sam as described here
  2. Just in case there is a brew-installed version left over
>brew uninstall aws-sam-cli
Error: No such keg: /usr/local/Cellar/aws-sam-cli
  1. Create a python virtual environment and activate it python -m venv env; source env/bin/activate
  2. Run pip install aws-sam-cli
  3. >sam --version
  4. Observe the same error ... Symbol not found: (_mkfifoat)

Additional environment details

  1. macOs Monterey v 12.7.6, Intel CPU
@dmitrikozlov dmitrikozlov added the stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. label Feb 21, 2025
@vicheey vicheey changed the title Bug: TITLE Bug: Broken SAM CLI for v1.134.0 on MacOS Intel CPU Feb 21, 2025
@vicheey vicheey changed the title Bug: Broken SAM CLI for v1.134.0 on MacOS Intel CPU Bug: Broken SAM CLI v1.134.0 on MacOS Intel CPU Feb 21, 2025
@roger-zhangg
Copy link
Member

Hello @dmitrikozlov ,

Thank you for bringing this to our attention. The issue you're experiencing appears to be system-specific. To troubleshoot, could you please try the following steps:

Install version 1.132.0 of the AWS SAM CLI from this link: https://github.com/aws/aws-sam-cli/releases/tag/v1.132.0
Please let us know if the issue persists with this version.

If the problem continues, we recommend creating a virtual environment (venv) and installing the SAM CLI using pip. You can find the package here: https://pypi.org/project/aws-sam-cli/

Alternatively, updating your MacOS to the latest version might resolve the issue.

Please try these steps and let us know the results. We're here to help if you need further assistance.

@vicheey vicheey added blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. maintainer/need-followup and removed stage/needs-triage Automatically applied to new issues and PRs, indicating they haven't been looked at. labels Feb 24, 2025
@dmitrikozlov
Copy link
Author

dmitrikozlov commented Feb 25, 2025

Hello @vicheey,

I tried to install version 1.132.0 from the pkg file. The result was the same:

$ sam --version
[PYI-85114:ERROR] Failed to load Python shared library '/usr/local/aws-sam-cli/_internal/libpython3.11.dylib': dlopen: dlopen(/usr/local/aws-sam-cli/_internal/libpython3.11.dylib, 0x000A): Symbol not found: (_mkfifoat)
  Referenced from: '/usr/local/aws-sam-cli/_internal/libpython3.11.dylib'
  Expected in: '/usr/lib/libSystem.B.dylib'

I tried installing SAM with pip earlier, but that didn't work as described in the ticket. So I ran pip to install version 1.132.0, and that worked!
pip install aws-sam-cli==1.132.0

@valerena
Copy link
Contributor

valerena commented Mar 4, 2025

Unfortunately, MacOS Monterey is not officially supported anymore (last official patch from Apple was over 7 months ago), so many of SAM CLI dependencies started dropping support for it too.

It's good that installing 1.132.0 through pip worked though. You can continue using that version until you upgrade your version of MacOS.

I don't have access to an environment with that version of MacOS, but I wonder if the latest version of SAM CLI can work in an older version of Python (like, installing SAM CLI 1.134.0 in Python 3.9 instead of 3.11). You might want to try that if you ever need one of the features in newer versions of SAM CLI before upgrading your OS.

I'm resolving this issue.

@valerena valerena closed this as completed Mar 4, 2025
Copy link
Contributor

github-actions bot commented Mar 4, 2025

⚠️COMMENT VISIBILITY WARNING⚠️

Comments on closed issues are hard for our team to see.
If you need more assistance, please either tag a team member or open a new issue that references this one.
If you wish to keep having a conversation with other community members under this issue feel free to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
blocked/more-info-needed More info is needed from the requester. If no response in 14 days, it will become stale. maintainer/need-followup
Projects
None yet
Development

No branches or pull requests

4 participants