-
Notifications
You must be signed in to change notification settings - Fork 347
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
Build fails on Windows #927
Comments
Make sure you're using the latest version of Zig, 0.13. This sounds like the same problem reported in cargo-lambda/cargo-lambda#698 (comment) |
I have reinstalled zig with the latest version 0.13. When I check where it is located with
That is where I installed it. |
I'm wondering if this a bug in
This error makes me think that something is splitting the command to run by whitespaces, and because your username is /cc @messense |
Yes, I suspected that might be the issue. I'll create a new user, install the necessary packages, and try and build it. I'll get back to you on the results. |
I built the function on another account on my machine, and yes it worked. Must be an issue with the space in my user. But still, is there a way to fix that? Thanks for your help. |
I suspect the bug is here: https://github.com/rust-cross/cargo-zigbuild/blob/06d31bc66e793e3b4f33d68df7ead7bb329c1c98/src/zig.rs#L1040 We'll need to dive deeper and create a patch to fix it. |
I created an issue in the cargo-zigbuild repository, which is where the problem is: rust-cross/cargo-zigbuild#281 I'm going to close this issue because this is not a problem with the runtime, but with a library used to build rust binaries. Feel free to subscribe to that issue for updates. When that's resolved, I'll update the cargo-zigbuild dependency in Cargo Lambda to bring the behavior to that tool too. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
I am trying to create a lambda function with rust but I am facing some very annoying issues.
Problem
The build process fails with a linking error when using `cargo lambda build --release``. I suspect this may be related to the cross-compilation toolchain, but I'm not sure how to resolve it.
What I have done
1. Created new function:
2. Tested function locally
localhost:9000
it returns successfully3. TRIED to build function
I get the following error message:
Followed by a long note:
Followed by a final note:
Thoughts
So I think the underlying issue is something to do with cross compiling. As seen in the final error note:
It could also do to with the current toolchain I am on. I have tested it with
stable-x86_64-pc-windows-gnu
stable-x86_64-pc-windows-msvc
nightly-x86_64-pc-windows-msvc
This could have something to do with the
x86_64-linux-gnu
target.@calavera has had this issue while in production, with the same error message
Issue: cargo-lambda/cargo-lambda#77
Error: https://ci.appveyor.com/project/AWSSAMCLI/aws-lambda-builders/builds/43271090/job/3ovwam50va3735y2
My current fix
I have tested this in Windows Subsystem for Linux and it built successfully.
And I want to try a docker container
Frustrating
This has stopped me from being able to use AWS Lambda!!
At this point I'm converting to linux!!!!!
I just want Arc browser support!!
Really annoying.
Help would be great!!
Thanks in advance
The text was updated successfully, but these errors were encountered: