profile
viewpoint

Ask questionstest failed to compile with llvm-7: No LLVM_SYS_70_PREFIX

Describe the bug

make test on WSL(Ubuntu 18.04, with initial llvm6 removed and llvm-7 installed by apt) fails:

error: failed to run custom build command for `wasmer-llvm-backend v0.4.0 (/home/huangjj27/wasmer/lib/llvm-backend)`
process didn't exit successfully: `/home/huangjj27/wasmer/target/debug/build/wasmer-llvm-backend-3d1adc9289268860/build-script-build` (exit code: 101)
--- stdout
Didn't find usable system-wide LLVM.
No suitable version of LLVM was found system-wide or pointed
                  to by LLVM_SYS_70_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

--- stderr
thread 'main' panicked at 'Could not find a compatible version of LLVM', lib/llvm-backend/build.rs:83:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.

what value should be set to LLVM_SYS_70_PREFIX?

Steps to reproduce

  1. remove preinstalled llvm: sudo apt remove llvm -y, and install llvm-7: sudo apt install llvm-7
  2. git clone git@github.com:wasmerio/wasmer.git to WSL
  3. cd wasmer
  4. make test

If applicable, add a link to a test case (as a zip file or link to a repository we can clone).

Expected behavior

it should pass compile and run the tests

Actual behavior

failed to compile test as shown

Additional context

related to #364

wasmerio/wasmer

Answer questions huangjj27

And I found that the llvm-7 I installed has a config with commaned llvm-config-7

useful!

Related questions

No questions were found.
source:https://uonfu.com/
answerer
Junjie Huang huangjj27 Guangzhou, Guangdong Province, PRC https://huangjj27.github.io @sysu 2017 graduate, major in software-enginering, coding with @rust-lang, working Industrial and Commercial Bank of China in for 3 years as an out source
Github User Rank List