bytecodealliance / bytecodealliance/wasmtime

Cranelift: jit: "region" "2.2.0" dependency doesn't compile on OpenBSD 7.5

Open
#8,895 2 comments 0 reactions 0 assignees View on GitHub
bug cranelift
Dominant language
Rust
Stars
18.6k
Forks
1.8k
Avg merge
1d 18h
Merged PRs (30d)
126

Description

`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` on `wasmtime` 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(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 {
| ^^^^^^^^

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 _`
```

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.