Closed larry0x closed 1 week ago
Hmm, something is going wrong here -- you shouldn't ever need to delete a directory in ~/.cargo
. The intent of this feature was to allow Cranelift developers to see a version of the code in-tree when developing Cranelift, and should not be used when Cranelift is pulled in as a dependency from crates.io. Could you say more about your environment and how you're using Cranelift?
@cfallin I don't use cranelift directly so not sure what's supposed to happen... I use wasmer. At wasmer 5.0.0 my program compiles with no problem. Once bumped to wasmer 5.0.1, compiling my program results in this error:
error: failed to run custom build command for `cranelift-codegen v0.110.2`
Caused by:
process didn't exit successfully: `/Users/[...]/target/release/build/cranelift-codegen-725296997bf7694e/build-script-build` (exit status: 1)
--- stdout
cargo:rerun-if-changed=build.rs
--- stderr
Error: directory isle_generated_code/ exists but is only used when
`--feature isle-in-source-tree` is specified. To prevent confusion,
this build script requires the directory to be removed when reverting
to the usual generated code in target/. Please delete the directory and
re-run this build.
I followed the instruction and deleted:
~/.cargo/registry/src/index.crates.io-{hash}/cranelift-codegen-{version}/isle_generated_code
Now the program compiles just fine.
@larry0x OK, thanks for the additional info. This error does not happen when using Cranelift by itself, or with Wasmtime (in this repo). We do not provide support for Wasmer -- that is a different project. I would recommend asking them for help if the issue occurs again; they may be setting options in some way that is causing this issue.
PR #4143 added this error if a
isle_generated_code/
directory exists and an "isle-in-source-tree" feature isn't enabled:It says to delete the directory. However, for users who are not familiar with the inner workings of cranelift, it's not clear where this directory is. It took me a long while to find it:
It may be helpful to add the
explicit_isle_dir
value to the error message so that users are informed exactly which directory they are supposed to delete.