Skip to content

Build failed with --cfg=rustix_use_libc #1622

@huajingyun01

Description

@huajingyun01

Hi everyone,
for context, I was trying to compile awww 0.12.1 on Alpine Linux (loongarch64) and encountered some errors related to rustix:

error[E0433]: failed to resolve: could not find `runtime` in `rustix`
   --> daemon/src/wallpaper.rs:315:48
    |
315 |                         match unsafe { rustix::runtime::kernel_fork() } {
    |                                                ^^^^^^^ could not find `runtime` in `rustix`
    |
note: found an item that was configured out
   --> /home/alpine/aports/community/awww/tmp/cargo/registry/src/index.crates.io-1949cf8c6b5b557f/rustix-1.1.4/src/lib.rs:317:9
    |
314 | #[cfg(linux_raw)]
    |       --------- the item is gated here
...
317 | pub mod runtime;
    |         ^^^^^^^

After checking, I found that the linux_raw backend does not support loongarch64, so I tried using the libc backend by setting RUSTFLAGS="$RUSTFLAGS --cfg=rustix_use_libc", but I got the same error.

Interestingly, I also tried building awww on x86_64 with the same RUSTFLAGS="$RUSTFLAGS --cfg=rustix_use_libc" and encountered the same error.

Is this a known issue? Any suggestions for this issue?
Thanks!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions