I got this error while compiling Shiika.
Compiling llvm-sys v120.2.4 error: No suitable version of LLVM was found system-wide or pointed to by LLVM_SYS_120_PREFIX.
llvm-sys checks the version in its
build.rs. On my current environment,
% echo $LLVM_SYS_120_PREFIX /usr/local/opt/llvm@12
In this case build.rs tries
/usr/local/opt/llvm@12/bin/llvm-config --version which returns
12.0.1. Then it compares this with
CRATE_VERSION is decided from the version of llvm-sys crate. In this time it is
v120.2.4 but only the part
120 is important. It means
12.0 and matches to the version retuned by llvm-config. Oh then why it raises error...
I got no error after
cargo clean -p llvm-sys. :-/