awslabs / aws-lambda-rust-runtime

A Rust runtime for AWS Lambda
Apache License 2.0
3.29k stars 335 forks source link

Error: /lib64/libc.so.6: version `GLIBC_2.28' not found #878

Closed baolongt closed 3 months ago

baolongt commented 3 months ago

I'm facing this error when I try to use this command

cargo lambda build --release --target x86_64-unknown-linux-gnu

my template.yml

Globals:
  Function:
    MemorySize: 128
    Architectures: ["x86_64"]
    Handler: bootstrap
    Runtime: provided.al2
    Timeout: 30
    Tracing: Active
    Environment:
      Variables:
        RUST_LOG: info

It work with x86_64-unknown-linux-musl. But from this issue it said I should use gnu instead of musl

calavera commented 3 months ago

Use provided.al2023 as the runtime. Your function depends on a GLIBC version that AL2 doesn't include.

Duplicated of https://github.com/awslabs/aws-lambda-rust-runtime/issues/874

github-actions[bot] commented 3 months ago

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.

rimutaka commented 2 months ago

@calavera , the ReadMe calls for AL2 + GNU which will probably always fail if built on a recent tool chain.

Having the following info in ReadMe or somewhere else handy would save me a coupe hours figuring it out on my own:

  1. which image to use
  2. how to build and deply manually without cargo lambda

Would you consider a PR to update the ReadMe with the above?

calavera commented 2 months ago

Would you consider a PR to update the ReadMe with the above?

absolutely. I'll take every improvement to the readme that we can get, you don't even have to ask 😄