Skip to content

Handle missing riscv64-unknown-linux-gnu #87

@cgwalters

Description

@cgwalters
$ head -5  /etc/os-release                                                                                                                                                                                                                                                           03/01/24 16:06:05 PM
NAME="CentOS Stream"
VERSION="9"
ID="centos"
ID_LIKE="rhel fedora"
VERSION_ID="9"
$ rustc --version
rustc 1.75.0 (82e1608df 2023-12-21) (Red Hat 1.75.0-1.el9)
$ cargo-vendor-filterer
Gathering metadata
Skipping rpmostree-rust
Skipping rpmostree-client
Skipping libdnf-sys
Gathering metadata for platforms
error: Executing cargo metadata: Error during execution of `cargo metadata`: error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --target riscv64gc-unknown-linux-gnu --crate-type bin --crate-type rlib --crate-type dylib --crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=split-debuginfo --print=crate-name --print=cfg` (exit status: 1)
  --- stderr
  error: could not create LLVM TargetMachine for triple: riscv64-unknown-linux-gn: No available targets are compatible with triple "riscv64-unknown-linux-gnu"
$

This however works with the Fedora rustc.

It seems to me RHEL rust toolchain apparently omits support for riscv64-unknown-linux-gnu...and hence using our default of tier = 2 breaks there.

Compare:

This is messy. If we do something like detect what targets the toolchain has, then the filtering is suddenly dependent on the host.

Maybe we can just allow opting-in to that via e.g.

[workspace.metadata.vendor-filter]
platforms = ["*-unknown-linux-gnu"]
tier = "2"
filter-host = true

And filter-host acknowledges some potential unreproducibility.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestgood first issueGood for newcomerstriagedThis issue was evaluated, no more information is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions