wasmtime
wasmtime copied to clipboard
Cranelift: wasmtime-jit-icache-coherence doesn't compile on FreeBSD
trafficstars
This causes CI to fail for https://github.com/bjorn3/rustc_codegen_cranelift/pull/1295.
error[E0432]: unresolved import `libc`
--> /.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-jit-icache-coherence-2.0.0/src/libc.rs:3:5
|
3 | use libc::{syscall, EINVAL, EPERM};
| ^^^^ help: a similar path exists: `crate::libc`
|
= note: `use` statements changed in Rust 2018; read more at <https://doc.rust-lang.org/edition-guide/rust-2018/module-system/path-clarity.html>
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-jit-icache-coherence-2.0.0/src/libc.rs:7:30
|
7 | const MEMBARRIER_CMD_GLOBAL: libc::c_int = 1;
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-jit-icache-coherence-2.0.0/src/libc.rs:8:51
|
8 | const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: libc::c_int = 32;
| ^^^^ use of undeclared crate or module `libc`
error[E0433]: failed to resolve: use of undeclared crate or module `libc`
--> /.cargo/registry/src/github.com-1ecc6299db9ec823/wasmtime-jit-icache-coherence-2.0.0/src/libc.rs:9:60
|
9 | const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: libc::c_int = 64;
| ^^^^ use of undeclared crate or module `libc`
FreeBSD isn't an officially-supported platform but we can take patches on a best-effort basis. I'm happy to take a look if someone wants to make a PR (but I don't have a FreeBSD system handy to test it myself).