1
votes

I am trying to compile the code presented in here using the make shown at the end of the web page but I am getting the following error:

[1 of 1] Compiling Main             ( mandelbrot.hs, mandelbrot.o )

<no location info>:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM

I checked the settings file of ghc and found that were like this:

 ("LLVM llc command", ""),
 ("LLVM opt command", "")

So I changed to map the commands as follows:

 ("LLVM llc command", "llc"),
 ("LLVM opt command", "opt")

But now I am getting a slightly different error:

[1 of 1] Compiling Main             ( mandelbrot.hs, mandelbrot.o )

<no location info>:
    Warning: Couldn't figure out LLVM version!
             Make sure you have installed LLVM

Searched on the web for probable causes but the results point to old bug reports where it says this issue was fixed.

I don't have any experience with LLVM and don't know how to procede.

I am using Windows 7 64bits with The Glorious Glasgow Haskell Compilation System, version 7.8.3.

1
What version of GHC are you using? What operating system are you using? - Rufflewind
Do you have LLVM installed and in your path? Try llvm-config --version. If this doesn't print out a version number then you don't have LLVM installed or set up properly. - bheklilr
@bheklilr, I tried the command in the command prompt and got nothing. Tried it on ghc and got just the ghc version. Isn't LLVM bundled together with ghc? - OneEyeQuestion
@OneEyeQuestion not that I know of. It has llvm support but does not come bundled with it. - bheklilr
How did you install GHC? (Did you use the Haskell Platform?) - Rufflewind

1 Answers

-1
votes

Not really answering your question but I got it to build with LLVM 3.4.2 on my Mac (LLVM 3.5 did not work). It does seem LLVM has some substantial benefits for this.

With LLVM

$ time ./Mandlebrot +RTS -N4 -RTS 16000 > /dev/null

real    0m10.635s
user    0m36.169s
sys 0m0.167s

Without LLVM

$ time ./Mandlebrot-nollvm +RTS -N4 -RTS 16000 > /dev/null

real    0m16.044s
user    1m0.704s
sys 0m0.165s

Sorry it doesn't help you on Windows. It's hard to install development tools on Windows. That's the main reason I don't use Windows.