Stream: wasmtime

Topic: ✔ OCaml version needed for fuzzing


view this post on Zulip Joel Dice (Jul 15 2022 at 16:05):

Hi. I'm trying to get cargo +nightly fuzz run api_calls working in wasmtime and having trouble determining which OCaml version(s) are compatible with the spec interpreter. The repo README.md claims OCaml 4.07 or higher will work, but using 4.07 gives:

Error: syntax/types.cmi
       is not a compiled interface for this version of OCaml.
It seems to be for an older version of OCaml.

While using the latest (4.14) gives:

Error: syntax/types.cmi
is not a compiled interface for this version of OCaml.
It seems to be for a newer version of OCaml.

(Aside: I sure wish it would tell me which version to use). I've just started a binary search for the right version (4.10.1 is also too old, apparently), but if someone knows offhand, it would save me some time.

WebAssembly specification, reference interpreter, and test suite. - spec/interpreter at master · conrad-watt/spec

view this post on Zulip Joel Dice (Jul 15 2022 at 16:21):

Conclusion: 4.13.1 works. I guess I could regenerate the cmi files with 4.14, but I don't necessarily want to force others to upgrade, so I'll just use 4.13.1.

view this post on Zulip Notification Bot (Jul 15 2022 at 16:21):

Joel Dice has marked this topic as resolved.

view this post on Zulip Alex Crichton (Jul 15 2022 at 16:23):

You can also build fuzzers with --no-default-features to disable building the ocaml-needing fuzzers

view this post on Zulip Joel Dice (Jul 15 2022 at 16:25):

Thanks, Alex.

BTW, I accidentally reversed the error messages when pasting them into my post above, but I can't edit it anymore -- just an FYI in case it's confusing.

view this post on Zulip Conrad Watt (Jul 19 2022 at 18:24):

I'm sorry for the confusion! I've now updated the readme of my fork with more helpful information regarding the OCaml build.

view this post on Zulip Conrad Watt (Jul 19 2022 at 18:38):

It's normal to need to regenerate cmi files locally when the OCaml version is switched, but 4.07 compilation will fail with the fuzzing version of the interpreter for other reasons, and might leave partially built things around that cause unhelpful error messages

I've updated the docs to clarify that OCaml 4.11.2 is the preferred version, although later ones should also work


Last updated: Nov 22 2024 at 16:03 UTC