wasmerio/wasmer-install

cargo install with llvm fails on windows

alensiljak opened this issue · 4 comments

I'm trying to enable LLVM compiler on Windows with

cargo install wasmer-cli --features=llvm

but it fails with

error: No suitable version of LLVM was found system-wide or pointed
              to by LLVM_SYS_140_PREFIX.

              Consider using `llvmenv` to compile an appropriate copy of LLVM, and
              refer to the llvm-sys documentation for more information.

              llvm-sys: https://crates.io/crates/llvm-sys
              llvmenv: https://crates.io/crates/llvmenv
   --> C:\Users\xy\.cargo\registry\src\index.crates.io-6f17d22bba15001f\llvm-sys-140.1.2\src\lib.rs:487:1
    |
487 | / std::compile_error!(concat!(
488 | |     "No suitable version of LLVM was found system-wide or pointed
489 | |        to by LLVM_SYS_",
490 | |     env!("CARGO_PKG_VERSION_MAJOR"),
...   |
497 | |        llvmenv: https://crates.io/crates/llvmenv"
498 | | ));
    | |__^

error: could not compile `llvm-sys` (lib) due to previous error

Llvmenv does not contain the v16, which I have installed via the official installer.
What exactly am I missing?

For now, we need llvm-14 for wasmer. llvm-16 will not work.

Great, thanks. Can I manually point LLVM_SYS_140_PREFIX to Program Files\LLVM or something? Or will it automatically find it?

It should automaticaly find it if llvm-config is accessible on the PATH. Else you can point yes.

Thank you. One of the problems is that there is no llvm-config available in the windows installer.
Will try building from source.