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

Rust fails to install successfully for Ubuntu 20.04 #3817

Closed
1 of 7 tasks
egg-r opened this issue Jul 29, 2021 · 7 comments
Closed
1 of 7 tasks

Rust fails to install successfully for Ubuntu 20.04 #3817

egg-r opened this issue Jul 29, 2021 · 7 comments
Assignees
Labels
Area: Image administration investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu

Comments

@egg-r
Copy link

egg-r commented Jul 29, 2021

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

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019

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.

@Darleev Darleev added Area: Image administration investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu and removed needs triage labels Jul 30, 2021
@Darleev
Copy link
Contributor

Darleev commented Jul 30, 2021

Hello @egg-r,
We will check the issue.

@dibir-magomedsaygitov dibir-magomedsaygitov self-assigned this Jul 30, 2021
@Zach-Zone
Copy link

Also now seeing this when creating a Windows 2019 image.

@miketimofeev
Copy link
Contributor

miketimofeev commented Jul 30, 2021

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.

@miketimofeev
Copy link
Contributor

@egg-r @Zach-Zone we have merged PRs with a workaround for all the OSs.
I'm going to close the issue. Please feel free to contact us if you have any concerns.
Thank you!

@Zach-Zone
Copy link

Zach-Zone commented Jul 30, 2021

I have tried to run a build on windows 2019 and I am still getting an error:
==> vhd: error[E0495]: cannot infer an appropriate lifetime due to conflicting requirements ==> vhd: --> C:\Rust\.cargo\registry\src\github.com-1ecc6299db9ec823\git2-0.13.18\src\attr.rs:74:15 ==> vhd: | ==> vhd: 74 | match (self, other) { ==> vhd: | ^^^^^^^^^^^^^ ==> vhd: | ==> vhd: note: first, the lifetime cannot outlive the anonymous lifetime defined on the method body at 73:26... ==> vhd: --> C:\Rust\.cargo\registry\src\github.com-1ecc6299db9ec823\git2-0.13.18\src\attr.rs:73:26 ==> vhd: | ==> vhd: 73 | fn eq(&self, other: &AttrValue<'_>) -> bool { ==> vhd: | ^^^^^^^^^^^^^ ==> vhd: note: ...so that the types are compatible ==> vhd: --> C:\Rust\.cargo\registry\src\github.com-1ecc6299db9ec823\git2-0.13.18\src\attr.rs:74:15 ==> vhd: | ==> vhd: 74 | match (self, other) { ==> vhd: | ^^^^^^^^^^^^^ ==> vhd: = note: expected(&AttrValue<'>, &AttrValue<'>)==> vhd: found(&AttrValue<'>, &AttrValue<'>)==> vhd: note: but, the lifetime must be valid for the lifetime'as defined on the impl at 72:30... ==> vhd: --> C:\Rust\.cargo\registry\src\github.com-1ecc6299db9ec823\git2-0.13.18\src\attr.rs:72:30 ==> vhd: | ==> vhd: 72 | impl PartialEq for AttrValue<'_> { ==> vhd: | ^^ ==> vhd: note: ...so that the types are compatible ==> vhd: --> C:\Rust\.cargo\registry\src\github.com-1ecc6299db9ec823\git2-0.13.18\src\attr.rs:79:16 ==> vhd: | ==> vhd: 79 | | (Self::Bytes(bytes), AttrValue::String(string)) => string.as_bytes() == *bytes, ==> vhd: | ^^^^^^^^^^^^^^^^^^ ==> vhd: = note: expectedAttrValue<'>==> vhd: foundAttrValue<'_>==> vhd: ==> vhd: error: aborting due to previous error ==> vhd: ==> vhd: For more information about this error, tryrustc --explain E0495. ==> vhd: error: failed to compile cargo-audit v0.14.1, intermediate artifacts can be found at C:\Users\packer\AppData\Local\Temp\cargo-install4WVZkK==> vhd: ==> vhd: Caused by: ==> vhd: could not compilegit2==> vhd: ==> vhd: To learn more, run the command again with --verbose. ==> vhd: error: could not findcargo-outdatedin registryhttps://github.com/rust-lang/crates.io-index` with version =0.14.1
==> vhd: Summary Successfully installed cbindgen! Failed to install bindgen, cargo-audit, cargo-outdated (see error(s) above).
==> vhd: error: some crates failed to install
`

@miketimofeev
Copy link
Contributor

@Zach-Zone please pull the latest main and try again, this should work now.

@Zach-Zone
Copy link

@miketimofeev yes i have taken a fresh pull form main this morning and it looks to be getting past this now. Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Image administration investigate Collect additional information, like space on disk, other tool incompatibilities etc. OS: Ubuntu
Projects
None yet
Development

No branches or pull requests

5 participants