Skip to content
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

Closed
sszabo11 opened this issue Sep 21, 2024 · 8 comments
Closed

Build fails on Windows #927

sszabo11 opened this issue Sep 21, 2024 · 8 comments

Comments

@sszabo11
Copy link

sszabo11 commented Sep 21, 2024

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:

cargo lambda new banana

2. Tested function locally

cargo lambda watch
  • This works, when I open localhost:9000 it returns successfully

3. TRIED to build function

cargo lambda build --release
  • This is when it turns to HELL
    I get the following error message:
error: linking with `C:\Users\Rabbit Muncher\AppData\Local\cargo-zigbuild\0.19.0\zigcc-x86_64-unknown-linux-gnu-7d27.bat` failed: exit code: 1

Followed by a long note:

= note: "cmd" "/c" "C:\\Users\\Rabbit Muncher\\AppData\\Local\\cargo-zigbuild\\0.19.0\\zigcc-x86_64-unknown-linux-gnu-7d27.bat" "-m64" "C:\\Users\\RABBIT~1\\AppData\\Local\\Temp\\rustccZJXU8\\symbols.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.1v66w8j17x7otcy3l3h626vji.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.addr2line-1e0edbcd516a8cce.addr2line.d5841dd9d0e7c93f-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.adler-9e4e8543de06315e.adler.583473a6c521af28-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.alloc-b6fe0262c36c500a.alloc.7b1462a1eb55c293-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.async_stream-3130c316b49d14fe.async_stream.e5a964736f2df1d3-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.aws_lambda_events-86ef2945413d7768.aws_lambda_events.fae95f58b866889c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.banana.f6888edd0b0af508-cgu.0.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.base64-690d3c6759f218f5.base64.b7322d18c0832dc4-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.bytes-d1b241661cc56204.bytes.be61d0e47e597d76-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.cfg_if-7ec98a9b1cc1792f.cfg_if.f835511e66cbc86d-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.cfg_if-bdd9cac256143c3a.cfg_if.af681e683f583131-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.core-500f37ee5bcf0ffe.core.3cad2706d8bdcdc4-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.encoding_rs-79f938e6091b27a3.encoding_rs.bfe340a0668b1b62-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.fnv-706e85cc03ab2c0a.fnv.e8b4d29a04e52a5c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.form_urlencoded-d8c6e645aa7fa4e0.form_urlencoded.83485437f6fe2c1f-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures-2995fb5c7e116f80.futures.808f8253353a32a5-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_channel-b0d0694ab82c841b.futures_channel.585c9886b0bd9a6a-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_core-b71d26e09d9e84cc.futures_core.4d554bcd7d814752-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_executor-6578fbdb5bb4493a.futures_executor.9037e4082dc4bb56-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_io-da1bb3cbbb6caf59.futures_io.bb130e734432d78a-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_sink-cf5bdc3688079190.futures_sink.450903547623e101-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_task-3a16bbaa43886ae9.futures_task.565ca1466e6e00fb-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.futures_util-ba85f56b453ce411.futures_util.f2598c3f49d74045-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.gimli-77a1dc5e8fb357d6.gimli.8600ed33ee232bbc-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.hashbrown-67895a0c8dd8130b.hashbrown.b1b733eb51e498a5-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.http-5c56df5fb160fcc7.http.4d8a6dae43aff2fc-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.http_body-8e6d56bb5a967e76.http_body.2e8dd08a43cf930d-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.http_body_util-a1774b443ca775eb.http_body_util.30f3ffd7795a5f36-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.http_serde-002676642ce666f6.http_serde.ad2436f07f307216-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.httparse-614c96c2e7e5ad56.httparse.c0b297f8ba6f7205-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.hyper-a2742fcac1229cd8.hyper.5d078286ad98cca1-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.hyper_util-1e0c0c5124512244.hyper_util.a579e19a3667c417-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.idna-257079bfd02df6ad.idna.c096f6175e81d4b2-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.itoa-55b9ae51d339f89f.itoa.e0bf3b8e02bbe1fd-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.lambda_http-e38d5de26c9298dd.lambda_http.3acb7a871e7c7b10-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.lambda_runtime-9c26704c1d303d6e.lambda_runtime.7ba870646d9dad46-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.lambda_runtime_api_client-e121dbde7fd5e50a.lambda_runtime_api_client.983f283baf7cbf50-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.lazy_static-984c2f21669f6503.lazy_static.457e6211e5938f0b-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.libc-2f9b4333f6d32438.libc.b7bd0413985b9e90-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.libc-c36399df9798d59e.libc.4100859774260668-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.log-409b6cda80df5049.log.9b3ce9ba434d3a48-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.matchers-12f9574a635add20.matchers.5e03b35441015f38-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.memchr-2784017d9a979eca.memchr.faf0bc3931b7bf70-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.memchr-e5c28d21823e9a85.memchr.6207736dffd8696c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.mime-af8126c6ae19fa04.mime.92fb8b3f3e245d8a-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.miniz_oxide-4f03d5a171522141.miniz_oxide.36a916387eee297c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.mio-38ad433944b9f5dd.mio.a808824c3543970e-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.object-fdace1a0b4cda412.object.488b3aab8085fcd-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.once_cell-7902b9b8f35bdfc3.once_cell.7360bb18d77c7402-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.panic_abort-092afc03effc32a4.panic_abort.7398f36a3cdfa090-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.percent_encoding-c58f66a20008587b.percent_encoding.119bd5a99f2eb6a9-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.pin_project-05f2a324367adb6c.pin_project.a36ba397f58df7f1-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.pin_project_lite-06db4c812528f645.pin_project_lite.aef0f1348ca2d0f4-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.pin_utils-6d04d0b2d14bc352.pin_utils.e995a2abdb380b28-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.query_map-54011792cd971b3e.query_map.6f4ee5fee44548f3-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.regex-9b25f982d46c14f6.regex.fa9a386ce382d21e-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.regex_automata-25f201bb4fe1f8c2.regex_automata.2e4a4dfdd1df71ae-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.regex_automata-5a223b030a0f6dfe.regex_automata.b98cbd2c67bdd68d-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.regex_syntax-25248f320193cd1d.regex_syntax.74a8e06578f887d5-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.regex_syntax-b46c67c3d5b9bdb0.regex_syntax.5a9df612b8cb2a83-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.rustc_demangle-8c9d2edb6dff139f.rustc_demangle.fa0c044a30128fe5-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.rustc_std_workspace_alloc-5b4263e767961458.rustc_std_workspace_alloc.675432c05f477980-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.rustc_std_workspace_core-2a862c0b1c86f483.rustc_std_workspace_core.dd9d57f719229938-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.ryu-b1a5a1354a0c53d1.ryu.4468830be677cd0a-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.serde-5614cc2672ea79f8.serde.a520e949d71d468f-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.serde_json-9db92303a0abd43f.serde_json.29bf16fddd95994a-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.serde_path_to_error-0c991f13c72bc044.serde_path_to_error.e19a78de55f0a80c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.serde_urlencoded-57d462e6219a1c66.serde_urlencoded.ecef9fdb119031a8-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.sharded_slab-64cb290128caa656.sharded_slab.13c51f9413e24236-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.slab-fb238c401755325a.slab.7b1098bc73868ea-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.smallvec-44646935a80dbdce.smallvec.72bbc06c09e853b-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.socket2-7fb8ef5cc1d446f5.socket2.d8ceefc2742735c6-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.std-1c4b19562077c20d.std.1f2242ed6435445e-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.std_detect-ecadd85ae8bacc0c.std_detect.4ffb9a580f592d17-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.thread_local-86682e116e7a6c5b.thread_local.6815c0c481fac1f8-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tinyvec-d48f5b45f12a95d8.tinyvec.7fd8f8e1c3e4c832-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tinyvec_macros-2b77280b98c6df7b.tinyvec_macros.ea8ce76ffbf65e81-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tokio-b1cacb6daf7abbac.tokio.53971ca783cd44bd-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tokio_stream-89a16ed964f9f7b9.tokio_stream.2a199907035b09af-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tower-5e75d4ee24f43888.tower.57dfbfc58c05a078-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tower_layer-d7ac684958ea068c.tower_layer.a62855436e88a24c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tower_service-f47850a0ea4500ce.tower_service.2cf92e02438e715a-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tracing-b54e9be838db0104.tracing.2533b3cd67113ccb-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tracing_core-64e43d1043dbd6a1.tracing_core.2fe6119c57ff3161-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tracing_serde-921db7e335ba6e44.tracing_serde.15888fdcd99171-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.tracing_subscriber-d7c63832c3232eb6.tracing_subscriber.5a94b894142275ae-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.try_lock-5a2e98d234c88f6f.try_lock.330669b03805e87c-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.unicode_bidi-50fe15052e81f5f6.unicode_bidi.89c8505e6ca72cc2-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.unicode_normalization-46e3640a09a82967.unicode_normalization.e78bd55864133f19-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.unwind-7fc51dfce9c057eb.unwind.f98c56b8d67e295d-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.url-b1b69160f03875f4.url.5b2831e477e08835-cgu.0.rcgu.o.rcgu.o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc.want-4e411bf742ac1c4a.want.b0967909476ad7da-cgu.0.rcgu.o.rcgu.o" "-Wl,--as-needed" "-L" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps" "-L" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\release\\deps" "-L" "C:\\Users\\Rabbit Muncher\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-unknown-linux-gnu\\lib" "-Wl,-Bstatic" "C:\\Users\\Rabbit Muncher\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-unknown-linux-gnu\\lib\\libcompiler_builtins-06dfbf1de02fde3b.rlib" "-Wl,-Bdynamic" "-lgcc_s" "-lutil" "-lrt" "-lpthread" "-lm" "-ldl" "-lc" "-Wl,--eh-frame-hdr" "-Wl,-z,noexecstack" "-L" "C:\\Users\\Rabbit Muncher\\.rustup\\toolchains\\stable-x86_64-pc-windows-gnu\\lib\\rustlib\\x86_64-unknown-linux-gnu\\lib" "-o" "C:\\Users\\Rabbit Muncher\\Desktop\\rusty\\banana\\target\\x86_64-unknown-linux-gnu\\release\\deps\\banana-f38ce624f07cbecc" "-Wl,--gc-sections" "-pie" "-Wl,-z,relro,-z,now" "-Wl,-O1" "-Wl,--strip-all" "-nodefaultlibs"

Followed by a final note:

= note: 'C:\Users\Rabbit' is not recognized as an internal or external command,
          operable program or batch file.

          C:\Users\Rabbit Muncher\Desktop\rusty\banana>C:\Users\Rabbit Muncher\scoop\apps\cargo-lambda\current\cargo-lambda.exe zig cc -- -g -target x86_64-linux-gnu @C:\Users\RABBIT~1\AppData\Local\Temp\rustccZJXU8\linker-arguments


error: could not compile `banana` (bin "banana") due to 1 previous error

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
C:\Users\Rabbit Muncher\Desktop\rusty\kol>C:\Users\Rabbit Muncher\scoop\apps\cargo-lambda\current\cargo-lambda.exe zig cc -- -g -target x86_64-linux-gnu @C:\Users\RABBIT~1\AppData\Local\Temp\rustcIbw7hS\linker-arguments

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

@calavera
Copy link
Contributor

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)

@sszabo11
Copy link
Author

I have reinstalled zig with the latest version 0.13. When I check where it is located with cargo lambda system, it prints out with:

Zig installation found at:
C:\Users\Rabbit Muncher\zig-windows-x86_64-0.13.0\zig.exe

That is where I installed it.
But it still returns with the same error when I run cargo lambda build --release

@calavera
Copy link
Contributor

I'm wondering if this a bug in cargo-zigbuild and the way it creates bat files on Windows.

'C:\Users\Rabbit' is not recognized as an internal or external command,
operable program or batch file.

This error makes me think that something is splitting the command to run by whitespaces, and because your username is Rabbit Muncher, it's taking C:\Users\Rabbit as the command to run.

/cc @messense

@sszabo11
Copy link
Author

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.

@sszabo11
Copy link
Author

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.

@calavera
Copy link
Contributor

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.

@calavera
Copy link
Contributor

calavera commented Oct 8, 2024

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.

@calavera calavera closed this as not planned Won't fix, can't repro, duplicate, stale Oct 8, 2024
Copy link

github-actions bot commented Oct 8, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants