Skip to content

loongarch64-unknown-linux-musl target does not build #122266

Closed
@saethlin

Description

@saethlin
cargo +nightly build -Zbuild-std --target=loongarch64-unknown-linux-musl
rustc 1.78.0-nightly (2d24fe591 2024-03-09)
binary: rustc
commit-hash: 2d24fe591f30386d6d5fc2bb941c78d7266bf10f
commit-date: 2024-03-09
host: x86_64-unknown-linux-gnu
release: 1.78.0-nightly
LLVM version: 18.1.0

The output is miles of errors like this:

error[E0412]: cannot find type `c_char` in the crate root
  --> /home/ben/.cargo/registry/src/index.crates.io-6f17d22bba15001f/libc-0.2.153/src/unix/mod.rs:52:29
   |
6  | pub type c_schar = i8;
   | ---------------------- similarly named type alias `c_schar` defined here
...
52 |         pub gr_name: *mut ::c_char,
   |                             ^^^^^^
   |
help: a type alias with a similar name exists
   |
52 |         pub gr_name: *mut ::c_schar,
   |                             ~~~~~~~
help: consider importing this type alias
   |
155+         use ffi::c_char;
   |
help: if you import `c_char`, refer to it directly
   |
52 -         pub gr_name: *mut ::c_char,
52 +         pub gr_name: *mut c_char,
   |

I think this target has somehow slipped past our CI? Maybe I'm searching our codebase wrong, but I don't think I can find any tests for it? Note that this affects the -musl target specifically, as identified by the Miri cron job that tries to build all tier 2 targets: https://github.com/rust-lang/miri/blob/66cf3418bd5f9de9a726681c054b3852096d6a68/.github/workflows/sysroots.yml which just failed: https://github.com/rust-lang/miri/actions/runs/8219608617/job/22477773992

cc target maintainers: @heiher @xiangzhai @zhaixiaojuan @xen0n

Metadata

Metadata

Assignees

No one assigned

    Labels

    O-loongarchTarget: LoongArch (LA32R, LA32S, LA64)O-muslTarget: The musl libc

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions