serverless-rust icon indicating copy to clipboard operation
serverless-rust copied to clipboard

Support building for al2 with GNU + glibc 2.26

Open seanpianka opened this issue 4 years ago • 2 comments

What did you implement:

I modified the build script to invoke the compiler for GNU instead of MUSL, with inspiration from here and here. glibc 2.26 must be available locally.

How did you verify your change:

I built and deployed an app to lambda with al2 that was compiled with these changes.

What (if anything) would need to be called out in the CHANGELOG for the next release:

We'd need a way to switch the target args, rust flags, and chosen compiler executable between MUSL and GNU.

seanpianka avatar Jun 25 '21 00:06 seanpianka

This would be great to have since Amazon Linux 1 has ended it's standard support now: https://aws.amazon.com/blogs/aws/update-on-amazon-linux-ami-end-of-life/ https://aws.amazon.com/blogs/compute/migrating-aws-lambda-functions-to-al2/

josh-zozonz avatar Sep 08 '21 20:09 josh-zozonz

In case anyone has looked at using these rust toochain docker images forked/updated from softprops repos: https://github.com/rust-serverless/lambda-rust they are based on the newer Amazon Linux 2 runtime (provided.al2) which will require this change.

rib avatar Nov 22 '21 18:11 rib