-
Notifications
You must be signed in to change notification settings - Fork 5
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
Unable to utilise for AWS Lambda #66
Comments
Unfortunately our crypto lib is a Rust based library and CGO is required to create go bindings. Could you try with CGO_ENABLED=1 setting while compiling? |
with CGO_ENABLED=1 it wont work as Lambda functions run with restrictions and amazon linux image i get GLIBC (perticular version not found error) this is related to other deps i use it would be perfered to some how statically link all deps including lightspark into the final binary i followed https://awsteele.com/blog/2021/10/17/cgo-for-arm64-lambda-functions.html and compiled it works normally without lightspark and works without the above mentioned GLIBC error but when i try to do the same for the function with lightspark lib i get the below error
is there a way to statically link these dependencies ? |
@N4r35h it seems per your description you're using musl libc and not GLIBC. The former is usually offered by Alpine Linux, are you able to use another Linux distribution (Amazon Linux, Ubuntu, Debian, etc) that uses GLIBC instead? Even though you end up getting a binary that would depend on system's GLIBC (therefore not statically linked), as per Lambda runtimes description, you'll end up obtaining a compatible binary (except if you compile using a very ancient distribution, with a very old GLIBC). |
im not able to compile the function while using the library as it utilizes CGO, is there any workaround or anything in the works to support compiling without CGO enabled so i can get this working in a AWS Lambda ?
i get the below error when compiling
github.com/lightsparkdev/lightspark-crypto-uniffi/lightspark-crypto-go: build constraints exclude all Go files in /home/n4r35h/go/pkg/mod/github.com/lightsparkdev/lightspark-crypto-uniffi/[email protected]
The text was updated successfully, but these errors were encountered: