build on windows failed could not compile `seccompiler` (lib) due to 8 previous errors
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 2.7k
- Forks
- 144
- Avg merge
- 12h 21m
- Merged PRs (30d)
- 146
Description
```
error[E0432]: unresolved imports `libc::SECCOMP_RET_ALLOW`, `libc::SECCOMP_RET_DATA`, `libc::SECCOMP_RET_ERRNO`, `libc::SECCOMP_RET_KILL_PROCESS`, `libc::SECCOMP_RET_KILL_THREAD`, `libc::SECCOMP_RET_LOG`, `libc::SECCOMP_RET_TRACE`, `libc::SECCOMP_RET_TRAP`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\backend\mod.rs:24:5
|
24 | SECCOMP_RET_ALLOW, SECCOMP_RET_DATA, SECCOMP_RET_ERRNO, SECCOMP_RET_KILL_PROCESS,
| ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^^^^^^^^ no `SECCOMP_RET_KILL_PROCESS` in the root
| | | |
| | | no `SECCOMP_RET_ERRNO` in the root
| | no `SECCOMP_RET_DATA` in the root
| no `SECCOMP_RET_ALLOW` in the root
25 | SECCOMP_RET_KILL_THREAD, SECCOMP_RET_LOG, SECCOMP_RET_TRACE, SECCOMP_RET_TRAP,
| ^^^^^^^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^^ ^^^^^^^^^^^^^^^^ no `SECCOMP_RET_TRAP` in the root
| | | |
| | | no `SECCOMP_RET_TRACE` in the root
| | no `SECCOMP_RET_LOG` in the root
| no `SECCOMP_RET_KILL_THREAD` in the root
error[E0425]: cannot find value `SECCOMP_RET_KILL_PROCESS` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\backend\bpf.rs:78:41
|
78 | bpf_stmt(BPF_RET | BPF_K, libc::SECCOMP_RET_KILL_PROCESS),
| ^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `SECCOMP_FILTER_FLAG_TSYNC` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\lib.rs:325:47
|
325 | apply_filter_with_flags(bpf_filter, libc::SECCOMP_FILTER_FLAG_TSYNC)
| ^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `prctl` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\lib.rs:344:29
|
344 | let rc = unsafe { libc::prctl(libc::PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) };
| ^^^^^ not found in `libc`
error[E0425]: cannot find value `PR_SET_NO_NEW_PRIVS` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\lib.rs:344:41
|
344 | let rc = unsafe { libc::prctl(libc::PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0) };
| ^^^^^^^^^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find function `syscall` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\lib.rs:359:15
|
359 | libc::syscall(
| ^^^^^^^ not found in `libc`
error[E0425]: cannot find value `SYS_seccomp` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\lib.rs:360:19
|
360 | libc::SYS_seccomp,
| ^^^^^^^^^^^ not found in `libc`
error[E0425]: cannot find value `SECCOMP_SET_MODE_FILTER` in crate `libc`
--> C:\Users\Administrator\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\seccompiler-0.5.0\src\lib.rs:361:19
|
361 | libc::SECCOMP_SET_MODE_FILTER,
| ^^^^^^^^^^^^^^^^^^^^^^^ not found in `libc`
Some errors have detailed explanations: E0425, E0432.
For more information about an error, try `rustc --explain E0425`.
error: could not compile `seccompiler` (lib) due to 8 previous errors
warning: build failed, waiting for other jobs to finish...
```
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
Reproduce the Windows build failure and inspect the seccompiler-0.5.0 sources named in the errors: backend/mod.rs, backend/bpf.rs, and lib.rs. Compare the referenced libc APIs with the Windows target, then verify that the project builds successfully on Windows without these compilation errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- operating-systems, security
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100