yhara.jp

Recent Posts

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

2022-05-27
Tech

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, LLVM_SYS_120_PREFIX is:

% 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.

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...

Solution

I got no error after cargo clean -p llvm-sys. :-/

More posts

Posts

(more...)

Articles

(more...)

Category

Ads

About

About the author