[haskell-llvm] Compiling the llvm-base on Windows fails

Gaster, Benedict Benedict.Gaster at amd.com
Wed Aug 8 04:12:17 BST 2012


So after spending more of the afternoon looking into this problem than I originally expected, I did manage to get HelloJIT compiling and executing as expected. So that was good :)

However, I'm sure I did not find the root of the problem and in the end just worked around it by generating the files that are normally automatically generated myself, actually I just copied them from the OS X versions and edited the path to the LLVM install and added the MinGW libraries.

The root of the problem is Setup.hs does not produce a llvm-base.buildinfo file that is correct and it does not produce a hs_llvm_config.h at all! At least is it not doing so on my system. I'm running Windows 7 with MSYS 1.1 and the latest MinGW. I was doing all the building in a MSYS shell but I get the same problems in a standard Windows shell too.

One clear problem is that the llvm-base.buildinfo.windows.in does not contain valid LLVM 3.x libraries for the linker and so even when it did build I was initially getting lots of undefined symbols.

Regards,

Ben

- Benedict R. Gaster
Enjoy Berlin and submit a paper to Multiprog 2013: http://multiprog.ac.upc.edu/

From: Gaster, Benedict
Sent: Tuesday, August 07, 2012 11:26 AM
To: 'haskell-llvm at projects.haskell.org'
Subject: Compiling the llvm-base on Windows fails

I have for a little while had llvm-base-3.0.1.tar.gz built and working under OS X but I'm having a problem building it under Windows 7.

ghc -v

The Glorious Glasgow Haskell Compilation System, version 7.4.1

As there is a small issue with compiling llvm-base with LLVM 3.1, described below, I downloaded and patched the fix (which is the same as I did on OS X) and then it fails with:

C:\cygwin\tmp\llvm-base-3.0.1.0>cabal configure --configure-option=--with-llvm-prefix=\cygwin\tmp\llvm-install
Resolving dependencies...
Configuring llvm-base-3.0.1.0...
setup.exe: llvm.buildinfo.windows.in: does not exist

I've tried it both from a Cygwin bash shell and also a cmd prompt and I get basically the same error.

I'm assuming that this package is known to work on Windows? Any help would be really great.

Regards,

Ben

The problem with LLVM 3.1 is that cbits/extra.cpp has the line:

      error.Print("llvm-py", buf);

But Print is actually print in llvm::SMDiagnostic. (I don't know if this was a change between LLVM 3.0 and 3.1?)


- Benedict R. Gaster
Enjoy Berlin and submit a paper to Multiprog 2013: http://multiprog.ac.upc.edu/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://projects.haskell.org/pipermail/haskell-llvm/attachments/20120808/a455af29/attachment.htm>


More information about the Haskell-llvm mailing list