Skip to content

ubuntu2004 build fails with "error[E0283]: type annotations needed" #2550

@henti

Description

@henti

Description
Building ubuntu2004 image from ubuntu20/20210123.1 while building cargo I get the following error:

==> azure-arm: error[E0283]: type annotations needed
==> azure-arm:    --> /usr/share/rust/.cargo/registry/src/github.com-1ecc6299db9ec823/cargo-0.50.0/src/cargo/util/config/de.rs:530:63
==> azure-arm:     |
==> azure-arm: 530 |                 seed.deserialize(Tuple2Deserializer(1i32, env.as_ref()))
==> azure-arm:     |                                                           ----^^^^^^--
==> azure-arm:     |                                                           |   |
==> azure-arm:     |                                                           |   cannot infer type for type parameter `T` declared on the trait `AsRef`
==> azure-arm:     |                                                           this method call resolves to `&T`
==> azure-arm:     |
==> azure-arm:     = note: cannot satisfy `std::string::String: AsRef<_>`
==> azure-arm:
==> azure-arm: error: aborting due to previous error
==> azure-arm:
==> azure-arm: For more information about this error, try `rustc --explain E0283`.
==> azure-arm: error: failed to compile `cargo-outdated v0.9.14`, intermediate artifacts can be found at `/tmp/cargo-installPzevWT`
==> azure-arm:
==> azure-arm: Caused by:
==> azure-arm:   could not compile `cargo`
==> azure-arm:
==> azure-arm: To learn more, run the command again with --verbose.
==> azure-arm: Script exited with non-zero exit status: 101.Allowed exit codes are: [0]

Area for Triage:
Rust

Question, Bug, or Feature?:
Bug

Virtual environments affected

  • Ubuntu 16.04
  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11.0
  • Windows Server 2016 R2
  • Windows Server 2019

Expected behavior
Image build succeeds

Actual behavior
Image build fails

Repro steps
A description with steps to reproduce the issue. If your have a public example or repo to share,
please provide the link.

  1. git clone git@github.com:actions/virtual-environments.git
  2. cd virtual-environments
  3. image="ubuntu2004"
  4. os="linux"
  5. ResourceGroupName="company-uk-south"
  6. AzureLocation="uksouth"
  7. ImageGenerationRepositoryRoot=$(pwd)
  8. builderScriptPath=${ImageGenerationRepositoryRoot}/images/$os/$image.json
  9. storageAccountName="$(echo $ResourceGroupName | sed 's/-//g')001"
  10. echo "GithubFeedToken=$PAT" > ~/.ssh/GitHubFeedToken
  11. . ~/.ssh/GitHubFeedToken
  12. packer build -on-error=ask
    -var subscription_id=$SubscriptionId
    -var location=$AzureLocation
    -var resource_group=$ResourceGroupName
    -var storage_account=$storageAccountName
    -var github_feed_token=$GithubFeedToken
    $builderScriptPath

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions