Explicitly target glibc 2.26 for rust on Amazon Linux 2 #3754
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.
Hi there! I recently started running into errors like this for the rust lambda I have deployed through sst:
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!