IronCoreLabs / ironcore-alloy

A unified SDK for IronCore encryption operations
https://ironcorelabs.com/
GNU Affero General Public License v3.0
8 stars 3 forks source link

version `GLIBC_2.29' not found #142

Open phelps-sg opened 1 month ago

phelps-sg commented 1 month ago

When installing Python dependency ironcore-alloy 0.11.0 via pip from within an amazon/aws-lambda-python:3.11 docker container I get the error below.

ERROR  - OSError: /lib64/libm.so.6: version `GLIBC_2.29' not found (required by /var/lang/lib/python3.11/site-packages/ironcore_alloy/libironcore_alloy.so)

I think for maximum portability the rust binary should be built by linking statically with MUSL?

skeet70 commented 1 month ago

According to aws lambda python docs, amazon/aws-lambda-python:3.12 is built on Amazon Linux 2023 as a base image, which does include a more modern GLIBC (the 2.26 on the 3.11 base image is 7 years old now!).

There's also the option of building a 2023 based python 3.11 image yourself or building ironcore-alloy statically linked to your preferred version of musl yourself.

I'll leave this issue open though, as a statically linked musl version would be nice to provide. The biggest issue I forsee would be that we don't want it to be the default, so we'd either need some trickiness to get the pip install to only pull down the musl version for each architecture when glibc isn't available in the right version, or have it as a second class citizen downloaded from releases and installed manually.

I'll also make a PR adding libc 2.29+ as a pre-requisite to the README for now.