Skip to content

Compile errors with --all-features on non-Linux #11019

Closed

Description

@xtqqczze

In pre-commit hook we have:

entry: cargo +stable clippy --workspace --all-targets --all-features -- -D warnings

but currently this fails on non-Linux systems:

cargo clippy --workspace --all-targets --all-features
error[E0433]: failed to resolve: could not find `selinux` in `uucore`
   --> src/uu/id/src/id.rs:145:36
    |
145 |         selinux_supported: uucore::selinux::is_selinux_enabled(),
    |                                    ^^^^^^^ could not find `selinux` in `uucore`
error[E0433]: failed to resolve: could not find `smack` in `uucore`
   --> src/uu/id/src/id.rs:198:27
    |
198 |             match uucore::smack::get_smack_label_for_self() {
    |                           ^^^^^ could not find `smack` in `uucore`
error[E0425]: cannot find value `uumain` in crate `chcon`
   --> target/debug/build/coreutils-dbc4be9239a5e04a/out/uutils_map.rs:152:27
    |
152 |         ("chcon", (chcon::uumain, chcon::uu_app)),
    |                           ^^^^^^ not found in `chcon`

etc

Activity

  1. oech3 commented on Feb 18, 2026

    @oech3
    Contributor

    You should install SELinux related header packages on the system. We cannot fix it at cargo side.

  2. xtqqczze commented on Feb 18, 2026

    @xtqqczze
    CollaboratorAuthor

    You should install SELinux related header packages on the system. We cannot fix it at cargo side.

    #11016 will fix selinux/smack errors for non-Linux platforms.

  3. xtqqczze commented on Feb 18, 2026

    @xtqqczze
    CollaboratorAuthor

    You should install SELinux related header packages on the system.

    @oech3 Is this possible on non-Linux systems?

  4. oech3 commented on Feb 18, 2026

    @oech3
    Contributor

    depending on Linux distribution what you use. No

  5. changed the title [-]Failure to compile with `--all-features`[/-] [+]Compile errors with `--all-features`[/+] on Feb 18, 2026
  6. changed the title [-]Compile errors with `--all-features`[/-] [+]Compile errors with `--all-features` on macOS[/+] on Apr 3, 2026
  7. xtqqczze commented on Apr 29, 2026

    @xtqqczze
    CollaboratorAuthor
    $ cargo clippy --workspace --all-targets --all-features -q --keep-going
    error[E0425]: cannot find value `uumain` in crate `chcon`
       --> target/debug/build/coreutils-f72911ea23e264cf/out/uutils_map.rs:152:27
        |
    152 |         ("chcon", (chcon::uumain, chcon::uu_app)),
        |                           ^^^^^^ not found in `chcon`
    
    error[E0425]: cannot find value `uu_app` in crate `chcon`
       --> target/debug/build/coreutils-f72911ea23e264cf/out/uutils_map.rs:152:42
        |
    152 |         ("chcon", (chcon::uumain, chcon::uu_app)),
        |                                          ^^^^^^ not found in `chcon`
    
    error[E0425]: cannot find value `uumain` in crate `runcon`
       --> target/debug/build/coreutils-f72911ea23e264cf/out/uutils_map.rs:214:29
        |
    214 |         ("runcon", (runcon::uumain, runcon::uu_app)),
        |                             ^^^^^^ not found in `runcon`
    
    error[E0425]: cannot find value `uu_app` in crate `runcon`
       --> target/debug/build/coreutils-f72911ea23e264cf/out/uutils_map.rs:214:45
        |
    214 |         ("runcon", (runcon::uumain, runcon::uu_app)),
        |                                             ^^^^^^ not found in `runcon`
    
  8. changed the title [-]Compile errors with `--all-features` on macOS[/-] [+]Compile errors with `--all-features` on non-Linux[/+] on Apr 29, 2026
  9. oech3 commented on May 16, 2026

    @oech3
    Contributor

    This issue does not making a sense for me.
    Platform specific feature is guarded by Cargo.toml to prevent error.
    But --all-features means you are deliberately breaking it. In the cases, it is natural to cause eror.

  10. oech3 commented on May 17, 2026

    @oech3
    Contributor

    I guess there are many missing utils making some sense on "native" Windows for people on MSYS2.

  11. oech3 commented on May 17, 2026

    @oech3
    Contributor

    But why should we support this?
    [Edit] Just guard this part of hook by Linux

  12. xtqqczze commented on May 19, 2026

    @xtqqczze
    CollaboratorAuthor

    cargo clippy --workspace --all-targets --all-features is now successful for macOS, #12386 will enforce in CI.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions