0

I built llvm 3.0, downloaded from here. I did:

./configure CC=gcc CXX=g++ --enable-shared

sudo make -j5 -s install

Next, I cloned the LLVM bindings from here. I am trying:

runhaskell Setup configure

But I get:

Configuring llvm-3.0.0.0...

Setup.lhs: At least the following dependencies are missing:

llvm-base ==3.0.*, type-level -any

I am running Linux Mint 64-bit (equivalent to Ubuntu 11.0). GHC is 6.12.3. I tried a cabal install but apparently the llvm version is too old to run some examples (am I mistaken?).

What am I doing wrong?

1 Answer 1

2

Bryan recently split the llvm package in two, that split has not yet made it to hackage. So if you don't want to simply cabal install the hackage version,

  1. install the type-level package (cabal install should work fine)
  2. cd into the base subdirectory of the llvm-repo, install llvm-base
  3. cd into the llvm directory, install

I have not tried it, so it might not work, but usually Bryan's repos are buildable, so there's a good chance that it does.

Sign up to request clarification or add additional context in comments.

7 Comments

I am not sure if it's appropriate to post a follow-up here. But I'll do. I tried building llvm-base and I got a compilation error requiring the macro __STDC_CONSTANT_MACROS to be defined before including DataTypes. Even if I add -D option manually to gcc (by redefining gcc as a bash script.. I know it's horrible), I get "Could not find module `LLVM.Target.TARGET':" in LLVM/Target/Native.hs:8:7.
TARGET is a macro specifying the architecture. That must be defined somewhere to choose the correct module, a quick look didn't reveal where exactly. I doubt it would work with adding -DTARGET=X86 (for example) to the -cpp-options in the .cabal file. It's probably best to just install the latest hackage version.
I did try that.. It gives a bunch of link errors when I try to compile any of the examples.
Not surprising. After a look in configure.ac, you might have a better chance with export target=YOUR_PLATFORM before installing, but I'm not too optimistic. Why don't you just install the hackage version?
No I meant I tried installing the hackage version (not I tried the options). It fails to compile the examples.. Maybe I am doing something wrong.. A lot of linking errors!
|

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.