-
Notifications
You must be signed in to change notification settings - Fork 28
Build broken on Apple Silicon computers (and/or Graviton2 builds) #2
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
Comments
Hey @brainstorm ! After some experimentation on M1 macs (thanks @msailes for the help):
However, there is another issue popping up ( |
For Graviton2 instances, I just tried with cross and it works fine. |
From what I just learned in briansmith/ring#1332 (comment) and spack/spack#26317 (comment), this might require GCC12 to be released in order to be fixed properly for M1 machines :-S |
For sam i have had to make a custom Makefile AWSTemplateFormatVersion : '2010-09-09'
Transform: AWS::Serverless-2016-10-31
Description: Hello World Rust Lambda function
Resources:
HelloRustFunction:
Type: AWS::Serverless::Function
Properties:
FunctionName: HelloRust
Handler: bootstrap.is.real.handler
Runtime: provided.al2
MemorySize: 256
CodeUri: .
Architectures:
- arm64
Metadata:
BuildMethod: makefile Which currently just references a simple shell build-HelloRustFunction:
sh ./build.sh
cp ./target/aarch64-unknown-linux-gnu/release/bootstrap $(ARTIFACTS_DIR) The actual docker build LAMBDA_ARCH="linux/arm64"
RUST_TARGET="aarch64-unknown-linux-gnu"
RUST_VERSION="latest"
docker run \
--platform ${LAMBDA_ARCH} \
--rm --user "$(id -u)":"$(id -g)" \
-v "${PWD}":/usr/src/myapp -w /usr/src/myapp rust:${RUST_VERSION} \
cargo build --release --target ${RUST_TARGET} |
Thanks @michaelbrewer, that's pretty much what I use in: https://github.com/umccr/s3-rust-noodles-bam Not ideal though: https://github.com/umccr/s3-rust-noodles-bam/blob/master/FLUKES.md Local builds should take less that 6 minutes and, ideally, they should not involve docker at all (just regular cargo build, which takes a few seconds in a M1)... it should just work and compile aws-rust-sdk dependencies like |
I finally managed to get my hands on an M1 mac to test around. The latest release of It does work when installing it from the Git repo directly ( |
Did you manage to reproduce my steps on briansmith/ring#1332 (comment) ? I'm curious to see if you are able to crack this |
I've got the same error message ( That's actually one of the reasons why I prefer to use cross here: while it doesn't work well for M1 macs yet, it abstracts those small differences away so that most people can build this project no matter their setups. |
This now uses |
Works a treat! Thanks Nicolas! ;) |
Hello @nmoutschen, branching out our discussions over here from https://twitter.com/braincode/status/1443549985803431947...
Also, btw, this is an issue I originally reported upstream on briansmith/ring#1332
The text was updated successfully, but these errors were encountered: