Skip to content

Build errors for stdbuf on OpenBSD #9178

@lcheylus

Description

@lcheylus

On OpenBSD current/amd64 with Rust 1.90.0 + fix from PR #9158 (fix build/tests for uptime on OpenBSD), there are some errors when trying to build stdbuf:

$ rustc -vV
rustc 1.90.0 (1159e78c4 2025-09-14) (built from a source tarball)
binary: rustc
commit-hash: 1159e78c4747b02ef996e55082b704c09b970588
commit-date: 2025-09-14
host: x86_64-unknown-openbsd
release: 1.90.0
LLVM version: 19.1.7

$ cargo build -v --no-default-features --features unix
(...)
error[E0433]: failed to resolve: use of unresolved module or unlinked crate `platform`
  --> src/uu/stdbuf/build.rs:62:47
   |
62 |         let lib_name = format!("libstdbuf{}", platform::DYLIB_EXT);
   |                                               ^^^^^^^^ use of unresolved module or unlinked crate `platform`
   |
   = help: if you wanted to use a crate named `platform`, use `cargo add platform` to add it to your `Cargo.toml`

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `platform`
   --> src/uu/stdbuf/build.rs:105:43
    |
105 |     let lib_name = format!("libstdbuf{}", platform::DYLIB_EXT);
    |                                           ^^^^^^^^ use of unresolved module or unlinked crate `platform`
    |
    = help: if you wanted to use a crate named `platform`, use `cargo add platform` to add it to your `Cargo.toml`

error[E0433]: failed to resolve: use of unresolved module or unlinked crate `platform`
   --> src/uu/stdbuf/build.rs:106:69
    |
106 |     let dest_path = Path::new(&out_dir).join(format!("libstdbuf{}", platform::DYLIB_EXT));
    |                                                                     ^^^^^^^^ use of unresolved module or unlinked crate `platform`
    |
    = help: if you wanted to use a crate named `platform`, use `cargo add platform` to add it to your `Cargo.toml`

For more information about this error, try `rustc --explain E0433`.
error: could not compile `uu_stdbuf` (build script) due to 3 previous errors

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