FrankReh added the bug label to Issue #8895.
FrankReh added the cranelift label to Issue #8895.
FrankReh opened issue #8895:
region
2.2.0 is from four years ago. Don't know if it was intended to compile on OpenBSD back then but it doesn't today.The most recent version is 3.0.2 and it does compile for OpenBSD 7.5. But some things about the API have changed and trying to call
cargo test --release
onwasmtime
fails to compile:Compiling cranelift-jit v0.110.0 (/home/frank/forks/wasmtime/cranelift/jit) error[E0308]: mismatched types --> cranelift/jit/src/memory.rs:39:45 | 39 | let alloc_size = region::page::ceil(size); | ------------------ ^^^^ expected `*const _`, found `usize` | | | arguments to this function are incorrect | = note: expected raw pointer `*const _` found type `usize` note: function defined here --> /home/frank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/region-3.0.2/src/page.rs:54:8 | 54 | pub fn ceil<T>(address: *const T) -> *const T { | ^^^^ error[E0308]: mismatched types --> cranelift/jit/src/memory.rs:40:27 | 40 | MmapMut::map_anon(alloc_size).map(|mut mmap| { | ----------------- ^^^^^^^^^^ expected `usize`, found `*const _` | | | arguments to this function are incorrect | = note: expected type `usize` found raw pointer `*const _` note: associated function defined here --> /home/frank/.cargo/registry/src/index.crates.io-6f17d22bba15001f/memmap2-0.2.3/src/lib.rs:658:12 | 658 | pub fn map_anon(length: usize) -> Result<MmapMut> { | ^^^^^^^^ error[E0308]: mismatched types --> cranelift/jit/src/memory.rs:46:22 | 46 | len: alloc_size, | ^^^^^^^^^^ expected `usize`, found `*const _` | = note: expected type `usize` found raw pointer `*const _`
FrankReh commented on issue #8895:
The change may be as simple as changing the type. Seems to be what occurred in the 02a1d481 commit to
region
.
FrankReh commented on issue #8895:
This seems to make the compiler happy. Still working out other test issues on OpenBSD so am not sure.
- let alloc_size = region::page::ceil(size); + let alloc_size = region::page::ceil(size as *const ()) as usize;
Last updated: Dec 23 2024 at 12:05 UTC