Stream: git-wasmtime

Topic: wasmtime / issue #2269 freebsd support


view this post on Zulip Wasmtime GitHub notifications bot (May 05 2022 at 16:47):

alexcrichton labeled issue #2269:

Building for FreeBSD results in compile_error!("unsupported platform")

Feature

Support for FreeBSD

Benefit

FreeBSD as an OS that has long supported pthread, kqueue, flexibility for compiler preferences, sandboxing, VMs (QEMU) and multiple architectures (ARM). Recently I've found that its stable as a VM on macOS. I personally find it easy to use for testing and it gives me another platform to test against which has exposed otherwise-unseen bugs.

Implementation

Trap handlers need to be updated and there are tests involving return values that usually fail.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2023 at 15:14):

sec commented on issue #2269:

Bumping on this one, when trying to build (from main or latest release source), under FreeBSD 13.1-RELEASE-p3 GENERIC amd64, it fails with:

error[E0412]: cannot find type `__itt_domain` in crate `ittapi_sys`
 --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/domain.rs:9:36
  |
9 | pub struct Domain(*mut ittapi_sys::__itt_domain);
  |                                    ^^^^^^^^^^^^ not found in `ittapi_sys`

error[E0425]: cannot find value `__itt_domain_create_ptr__3_0` in crate `ittapi_sys`
  --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/domain.rs:20:40
   |
20 |         let create_fn = access_sys_fn!(__itt_domain_create_ptr__3_0);
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `ittapi_sys`
...
...
...
error[E0412]: cannot find type `__itt_id` in crate `ittapi_sys`
  --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/task.rs:57:29
   |
57 | const ITT_NULL: ittapi_sys::__itt_id = ittapi_sys::__itt_id {
   |                             ^^^^^^^^ not found in `ittapi_sys`

error[E0422]: cannot find struct, variant or union type `__itt_id` in crate `ittapi_sys`
  --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/task.rs:57:52
   |
57 | const ITT_NULL: ittapi_sys::__itt_id = ittapi_sys::__itt_id {
   |                                                    ^^^^^^^^ not found in `ittapi_sys`

Some errors have detailed explanations: E0412, E0422, E0425.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `ittapi` due to 22 previous errors

Is there some depedency missed? Doing the same build. under the same FreeBSD version, but aarch64/arm64 - compile is fine (with one patch needed, but that's not relevant here) ?

view this post on Zulip Wasmtime GitHub notifications bot (Jan 13 2023 at 16:38):

sec edited a comment on issue #2269:

Bumping on this one, when trying to build (from main or latest release source), under FreeBSD 13.1-RELEASE-p3 GENERIC amd64, it fails with:

error[E0412]: cannot find type `__itt_domain` in crate `ittapi_sys`
 --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/domain.rs:9:36
  |
9 | pub struct Domain(*mut ittapi_sys::__itt_domain);
  |                                    ^^^^^^^^^^^^ not found in `ittapi_sys`

error[E0425]: cannot find value `__itt_domain_create_ptr__3_0` in crate `ittapi_sys`
  --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/domain.rs:20:40
   |
20 |         let create_fn = access_sys_fn!(__itt_domain_create_ptr__3_0);
   |                                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in `ittapi_sys`
...
...
...
error[E0412]: cannot find type `__itt_id` in crate `ittapi_sys`
  --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/task.rs:57:29
   |
57 | const ITT_NULL: ittapi_sys::__itt_id = ittapi_sys::__itt_id {
   |                             ^^^^^^^^ not found in `ittapi_sys`

error[E0422]: cannot find struct, variant or union type `__itt_id` in crate `ittapi_sys`
  --> /home/sec/.cargo/registry/src/github.com-1ecc6299db9ec823/ittapi-0.3.1/src/task.rs:57:52
   |
57 | const ITT_NULL: ittapi_sys::__itt_id = ittapi_sys::__itt_id {
   |                                                    ^^^^^^^^ not found in `ittapi_sys`

Some errors have detailed explanations: E0412, E0422, E0425.
For more information about an error, try `rustc --explain E0412`.
error: could not compile `ittapi` due to 22 previous errors

Is there some depedency missed? Doing the same build. under the same FreeBSD version, but aarch64/arm64 - compile is fine (with one patch needed, but that's not relevant here) ?

edit: using newest ittapi sources (that include FreeBSD binding) compile fine, but that require some manual copying/patching.

view this post on Zulip Wasmtime GitHub notifications bot (Jan 18 2023 at 18:56):

abrown commented on issue #2269:

Can we resolve this issue by bumping the version of the ittapi crate? (If not, I may have to release a new version of that crate which I am happy to do).

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2023 at 14:30):

sec commented on issue #2269:

I haven't saw new verison of this crate with changes needed to compile - I did "copy over" from latest main and changes checksumsa to match and build

view this post on Zulip Wasmtime GitHub notifications bot (Jan 19 2023 at 16:39):

abrown commented on issue #2269:

I published a new version of the ittapi crate yesterday, v0.3.3, that enables FreeBSD support. If you bump that dependency in Wasmtime I think things should work?

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2023 at 06:46):

sydbarrett74 commented on issue #2269:

/bump

I run FreeBSD 13.1, as well. Has there been any movement on this?

TIA.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2023 at 15:53):

abrown commented on issue #2269:

I think #5606 closed this issue. I'll close it and we can re-open a new one if there are other issues.

view this post on Zulip Wasmtime GitHub notifications bot (Mar 17 2023 at 15:53):

abrown closed issue #2269:

Building for FreeBSD results in compile_error!("unsupported platform")

Feature

Support for FreeBSD

Benefit

FreeBSD as an OS that has long supported pthread, kqueue, flexibility for compiler preferences, sandboxing, VMs (QEMU) and multiple architectures (ARM). Recently I've found that its stable as a VM on macOS. I personally find it easy to use for testing and it gives me another platform to test against which has exposed otherwise-unseen bugs.

Implementation

Trap handlers need to be updated and there are tests involving return values that usually fail.


Last updated: Dec 23 2024 at 12:05 UTC