-
Notifications
You must be signed in to change notification settings - Fork 3.1k
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
Rust fails to install successfully for Ubuntu 20.04 #3817
Comments
Hello @egg-r, |
Also now seeing this when creating a Windows 2019 image. |
Cargo-audit 0.15.0 is broken https://docs.rs/crate/cargo-audit/0.15.0, so we need to stay on 0.14.1 for a while. I have prepared PRs for each OS, windows one is already merged. |
@egg-r @Zach-Zone we have merged PRs with a workaround for all the OSs. |
I have tried to run a build on windows 2019 and I am still getting an error: |
@Zach-Zone please pull the latest main and try again, this should work now. |
@miketimofeev yes i have taken a fresh pull form main this morning and it looks to be getting past this now. Thank you |
Description
I'm having repeated failures when trying to build the latest Ubuntu 20.04 image from the 20210726 release. The failure occurs when the installer script runs for installing Rust. I'm using the Packer templates provided to build Self-Hosted images.
The issue is specifically failing with the below error for the cargo-audit.
Installer Script path: /images/linux/scripts/installers/rust.sh
Error output:
==> azure-arm: Compiling git2 v0.13.18
==> azure-arm: error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements
==> azure-arm: --> /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.18/src/attr.rs:74:15
==> azure-arm: |
==> azure-arm: 74 | match (self, other) {
==> azure-arm: | ^^^^^^^^^^^^^
==> azure-arm: |
==> azure-arm: note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 73:26...
==> azure-arm: --> /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.18/src/attr.rs:73:26
==> azure-arm: |
==> azure-arm: 73 | fn eq(&self, other: &AttrValue<'>) -> bool {
==> azure-arm: | ^^^^^^^^^^^^^
==> azure-arm: note: ...so that the types are compatible
==> azure-arm: --> /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.18/src/attr.rs:74:15
==> azure-arm: |
==> azure-arm: 74 | match (self, other) {
==> azure-arm: | ^^^^^^^^^^^^^
==> azure-arm: = note: expected
(&AttrValue<'_>, &AttrValue<'_>)
==> azure-arm: found
(&AttrValue<'_>, &AttrValue<'_>)
==> azure-arm: note: but, the lifetime must be valid for the lifetime
'_
as defined on the impl at 72:30...==> azure-arm: --> /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.18/src/attr.rs:72:30
==> azure-arm: |
==> azure-arm: 72 | impl PartialEq for AttrValue<'> {
==> azure-arm: | ^^
==> azure-arm: note: ...so that the types are compatible
==> azure-arm: --> /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/git2-0.13.18/src/attr.rs:79:16
==> azure-arm: |
==> azure-arm: 79 | | (Self::Bytes(bytes), AttrValue::String(string)) => string.as_bytes() == *bytes,
==> azure-arm: | ^^^^^^^^^^^^^^^^^^
==> azure-arm: = note: expected
AttrValue<'_>
==> azure-arm: found
AttrValue<'_>
==> azure-arm:
==> azure-arm: error: aborting due to previous error
==> azure-arm:
==> azure-arm: For more information about this error, try
rustc --explain E0495
.==> azure-arm: error: failed to compile
cargo-audit v0.15.0
, intermediate artifacts can be found at/tmp/cargo-installg3EI0W
==> azure-arm:
==> azure-arm: Caused by:
==> azure-arm: could not compile
git2
==> azure-arm:
==> azure-arm: To learn more, run the command again with --verbose.
Summary output:
==> azure-arm: Summary Successfully installed bindgen, cbindgen, cargo-outdated! Failed to install cargo-audit (see error(s) above).
==> azure-arm: error: some crates failed to install
==> azure-arm: Provisioning step had errors: Running the cleanup provisioner, if present...
==> azure-arm: Removing the created Deployment object: 'pkrdpfzdtvmdcat'
==> azure-arm:
==> azure-arm: Cleanup requested, deleting resource group ...
==> azure-arm: Resource group has been deleted.
Build 'azure-arm' errored after 1 hour 7 minutes: Script exited with non-zero exit status: 101.Allowed exit codes are: [0]
Virtual environments affected
Image version and build link
Using Self-hosted Agents and the GenerateResourcesAndImage.ps1 script locally.
Is it regression?
N/A
Expected behavior
No response
Actual behavior
No response
Repro steps
Execute Packer build of the Ubuntu 20.04 template from release 20210726.
The text was updated successfully, but these errors were encountered: