Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wasmtime-jit fails to built when compiled standalone #200

Closed
marmistrz opened this issue Jul 19, 2019 · 1 comment · Fixed by #201
Closed

wasmtime-jit fails to built when compiled standalone #200

marmistrz opened this issue Jul 19, 2019 · 1 comment · Fixed by #201

Comments

@marmistrz
Copy link
Collaborator

The compilation succeeds if cargo build is executed from the repository root, but fails if cargo build is executed from wasmtime-jit. Tested on Arch Linux, nightly. (feature(alloc) may not be used on stable)

$ cd wasmtime-jit
$ cargo build 
...
   Compiling wasmtime-environ v0.1.0 (/home/marcin/proj/wasmtime/wasmtime-environ)
error[E0432]: unresolved import `std::ops`
  --> wasmtime-environ/src/compilation.rs:10:10
   |
10 | use std::ops::Range;
   |          ^^^ help: a similar path exists: `rayon::std::ops`

warning: trait objects without an explicit `dyn` are deprecated
  --> wasmtime-environ/src/cranelift.rs:92:51
   |
92 | fn get_address_transform(context: &Context, isa: &isa::TargetIsa) -> Vec<InstructionAddressMap> {
   |                                                   ^^^^^^^^^^^^^^ help: use `dyn`: `dyn isa::TargetIsa`
   |
   = note: #[warn(bare_trait_objects)] on by default

error[E0282]: type annotations needed
  --> wasmtime-environ/src/compilation.rs:47:27
   |
47 |                     body: buffer[range].to_vec(),
   |                           ^^^^^^^^^^^^^ cannot infer type
   |
   = note: type must be known at this point

error: aborting due to 2 previous errors

Some errors have detailed explanations: E0282, E0432.
For more information about an error, try `rustc --explain E0282`.
error: Could not compile `wasmtime-environ`.

To learn more, run the command again with --verbose.
sunfishcode added a commit to sunfishcode/wasmtime that referenced this issue Jul 19, 2019
Enable wasmtime-environ/std when wasmtime-jit's std feature is enabled.

Fixes bytecodealliance#200.
@sunfishcode
Copy link
Member

Thanks for the report! #201 has the fix.

sunfishcode added a commit that referenced this issue Jul 19, 2019
* Fix compilation of wasmtime-environ from within wasmtime-jit.

Enable wasmtime-environ/std when wasmtime-jit's std feature is enabled.

Fixes #200.

* Fix wasmtime-debug build too.
mooori added a commit to mooori/wasmtime that referenced this issue Feb 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants