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

Explicitly target glibc 2.26 for rust on Amazon Linux 2 #3754

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

lewisl9029
Copy link

Hi there! I recently started running into errors like this for the rust lambda I have deployed through sst:

/var/task/bootstrap: /lib64/libc.so.6: version `GLIBC_2.28' not found (required by /var/task/bootstrap)

Did a bit of digging and it seems like this is because SST deploys rust functions to Amazon Linux 2, which only supports glibc 2.26: https://repost.aws/questions/QUrXOioL46RcCnFGyELJWKLw/glibc-2-27-on-amazon-linux-2

I suspect the target probably changed at some point seemingly randomly due to upgrades on the CI builder fleet?

So I've added a target flag in this PR to ensure we target glibc2.26 regardless of build environment.

I published this change (without the arm64 branch) in a separate package at https://www.npmjs.com/package/@lewisl9029/sst, gave it a try myself, and it seems to have resolved these errors. Please note that although I added an arm64 branch in the code, I've only tested this with an x86_64 lambda.

Looks like a few folks have had similar issues, so I figured I'd try to get this merged. :)

Cheers!

Copy link

changeset-bot bot commented Apr 30, 2024

⚠️ No Changeset found

Latest commit: b7e3265

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@jayair
Copy link
Contributor

jayair commented May 3, 2024

Thanks! We'll take a look.

@henrycrib
Copy link

henrycrib commented May 13, 2024

Another option is to update the rust runtime to CDKRuntime.PROVIDED_AL2023 which supports glibc 2.28; and IMO is more sensible because AL2 is quite old.

@henrycrib
Copy link

#3729

@thdxr
Copy link
Contributor

thdxr commented May 18, 2024

i think bumping the amazon linux runtime should fix 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.

None yet

4 participants