Skip to content

test: rbitcoin-net tests don't build on macOS #1182

Closed

Description

@Naomi-Gift

On a Mac, cargo test --workspace stops with a build error before any tests run:

error[E0433]: cannot find module or crate `libc` in this scope
   --> crates/rbitcoin-net/tests/i2p_sam.rs:197

i2p_sam.rs uses libc on every unix system, but rbitcoin-net/Cargo.toml only adds libc on Linux. So on macOS the test can't find it.

CI doesn't catch this because it runs on Linux. It only hits people running the tests on their own Mac. They have to skip rbitcoin-net to run the rest of the suite.

Fix:

Add libc to rbitcoin-net/Cargo.toml for all unix systems, not just Linux. Or only use libc in i2p_sam.rs when running on Linux.

Activity

  1. niteshbalusu11 commented on Oct 24, 2026

    @niteshbalusu11
    Contributor

    Duplicate of #1179. Fixed by #1184 (merged in 4096982), which adds libc as a cfg(unix) dev-dependency of rbitcoin-net. This can be closed.

  2. reardencode commented on Oct 24, 2026

    @reardencode
    Owner

    Fixed in 1184, ty!

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

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions