简体   繁体   中英

The program 'llvm-config' version ==9.0.* is required but it could not be found

I wanted to install llvm-hs with the command cabal install llvm-hs -fshared-llvm , according to the installation guide of Accelerate on the website: https://www.acceleratehs.org/get-started.html . But something errors. After that I tried cabal install llvm-hs and then I got the error message:

Linking C:\Users\.......\cabal-tmp-14364\llvm-hs-9.0.1\dist\setup\setup.exe ...
setup.exe: The program 'llvm-config' version ==9.0.* is required but it could
not be found.

cabal: Leaving directory 'C:\Users\.......\cabal-tmp-14364\llvm-hs-9.0.1'
cabal.exe: Error: some packages failed to install:
llvm-hs-9.0.1-IXEp6h558cdJJTwzKkubg0 failed during the configure step. The
exception was:
ExitFailure 1

So I tried to figure out how I can 'install' llvm-config, but I can't really find the solution to this problem. Does anyone know the solution?

It seems that you are trying to install Accelerate for Windows with an LLVM backend. As far as I know, this is not possible.

Basically, it comes down to the fact that Accelerate, actually the llvm-hs package, needs LLVM as a shared library. This was not possible on Windows, although I'm unsure if anything has changed in that regard in the last 2 years.

There are still two options to still use Accelerate on Windows.

  1. Use it without a backend, this means you can still program in Accelerate and run it via the interpreter, although it will be slow in execution time.
  2. Try to use Windows Subsystem for Linux. If you want to use the GPU backend ( accelerate-llvm-ptx ), I believe that is now possible since of WSL 2 (following the instructions here ). Or if you want the multicore backend accelerate-llvm-native that should be possible. Although of course, you will need to install LLVM first, you can follow the normal install instructions for Linux.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM