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

GLIBC_2.28 not found #874

Closed
rgreinho opened this issue May 13, 2024 · 7 comments
Closed

GLIBC_2.28 not found #874

rgreinho opened this issue May 13, 2024 · 7 comments

Comments

@rgreinho
Copy link
Contributor

rgreinho commented May 13, 2024

Since I upgraded to Rust 1.78, I am facing the following issue while deploying lambda functions:

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

I checked older issues and found somehow similar ones, but it looks like I am building and deploying my functions correctly though:

My runtime is Amazon Linux 2:

image

The functions are built with cargo lambda build --release

My rust version is:

$ rustc --version
rustc 1.78.0 (9b00956e5 2024-04-29)

And I am using lambda_runtime = "0.11.1".

Could it be that Rust 1.78 cannot yet run on Amazon Linux 2 runtimes?

@RDarrylR
Copy link

I believe you will need to move to Amazon Linux 2023 as AL2 doesn’t support newer GLIBC versions. That was my experience when I was using AL2.

@calavera
Copy link
Contributor

I believe you will need to move to Amazon Linux 2023 as AL2 doesn’t support newer GLIBC versions. That was my experience when I was using AL2.

That's correct. Deploy your function with the runtime provided.al2023.

Copy link

This issue is now closed. 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.

@rgreinho
Copy link
Contributor Author

Thanks y'all, it worked! 😃

@mbergkvist
Copy link
Contributor

We are deploying to aws-cn so Amazon Linux 2023 is unfortunately not yet an option for us. Our solution is to add

{
    bundling: {
        cargoLambdaFlags: ['--target', 'aarch64-unknown-linux-gnu.2.26'],
    },
    runtime: 'provided.al2'
}

to the RustFunctionProps (cargo-lambda-cdk).

@tbar4
Copy link

tbar4 commented Jul 11, 2024

We are deploying to aws-cn so Amazon Linux 2023 is unfortunately not yet an option for us. Our solution is to add

{
    bundling: {
        cargoLambdaFlags: ['--target', 'aarch64-unknown-linux-gnu.2.26'],
    },
    runtime: 'provided.al2'
}

to the RustFunctionProps (cargo-lambda-cdk).

Thanks for solving, AWS gov-cloud won't be getting AL2023 for lambda for the foreseeable future so this is a big help.

@jtuliani
Copy link

@tbar4 The Lambda AL2023 runtimes are now available in China regions: https://www.amazonaws.cn/en/new/2024/amazon-lambda-adds-support-for-amazon-linux-2023-runtimes-in-amazon-web-services-china-regions/

robertrv added a commit to robertrv/serverless-rust-demo that referenced this issue Nov 21, 2024
This helps to fix the failures I was getting about missing GLIBC_2.28 which is no longer available on al2

Reference: awslabs/aws-lambda-rust-runtime#874
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

No branches or pull requests

6 participants