spacedriveapp / spacedriveapp/spacebot
Windows build fails due to unconditional Unix-only daemonization dependency (daemonize)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.4k
- Forks
- 367
- PR merge metrics
- No merged PRs in 30d
Description
Summary
Building spacebot on Windows fails because the crate unconditionally depends on daemonize and compiles Unix-specific daemon code.
This is not caused by open (even though Cargo output may show Compiling open v5.3.3 nearby). The failing crate is daemonize.
Environment
- OS: Windows (observed on Windows 11)
- Rust: stable (edition 2024 project)
Error (excerpt)
Cargo fails while compiling daemonize-0.5.0 with errors like:
could not find unix in os- missing
libc::uid_t,gid_t,umask,fork,setsid, etc. on Windows
Why this happens
spacebot declares daemonize = "0.5" as a normal dependency:
Cargo.toml:86
and calls it from the daemon module:
src/daemon.rs:87src/daemon.rs:107src/main.rs:184
The daemon module also uses Unix-only APIs directly (e.g. std::os::unix::net::UnixStream in src/daemon.rs:71), so Windows builds need cfg(unix) gating regardless of the daemonize dependency.
Expected behavior
- Windows builds should either:
- compile successfully with daemonization functionality disabled / unsupported.
Suggested fix
- Move Unix-only deps behind target-specific dependencies, e.g.:
daemonize- likely
libcif only used for daemon code
- Gate Unix daemon implementation with
#[cfg(unix)] - Provide Windows stubs / error messages for daemon commands (e.g. "daemon mode is not supported on Windows yet")
Notes
Cargo output may mention Compiling open v5.3.3, but Cargo.lock shows open does not depend on daemonize; this appears to be parallel build output interleaving.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the dependency declaration at Cargo.toml:86 and the Unix-specific references in src/daemon.rs:71, 87, and 107, plus the call site in src/main.rs:184. Run a Windows build to confirm the failure, then verify that Unix daemonization remains available while Windows builds compile and daemon commands report unsupported functionality.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, operating-systems
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100