bscarlet / llvm-general

Rich LLVM bindings for Haskell (with transfer of LLVM IR to and from C++, detailed compilation pass control, etc.)
http://hackage.haskell.org/package/llvm-general
132 stars 38 forks source link

odd error message when building with ghc 7.8 #82

Closed cartazio closed 10 years ago

cartazio commented 10 years ago
carter llvm-general/llvm-general ‹llvm-3.4› » cabal configure                                                 1 ↵
Resolving dependencies...
cabal: The package 'llvm-general' requires Cabal library version 1.18.0 but no
suitable version is installed.

i have cabal 1.18.1.3 installed.. :(

cartazio commented 10 years ago

i then tried building the setup.hs and running it and i get this gem (i have all of these libs installed, but it says otherwise)

carter llvm-general/llvm-general ‹llvm-3.4*› » ./Setup configure           
Configuring llvm-general-3.4.0.0...
Setup: At least the following dependencies are missing:
llvm-general-pure ==3.4.0.0,
mtl >=2.0.1.0,
parsec >=3.1.3,
setenv >=0.1.0,
utf8-string >=0.3.7
bscarlet commented 10 years ago

Is ghc 7.8 released? I don't see it on ghc.hackage.org.

cartazio commented 10 years ago

7.8 is in RC. (and i have my own wee build). So i'm doing a semi annual "try building everything"

Oddly, i can cabal install llvm-general -fshared-llvm --ghc-options="-pgmc clang -pgma clang -XRankNTypes -XImpredicativeTypes" (nb: not sure if the pgmc / pgma bits are needed, that was cargoculting on my part) from hackage, but I can't cabal install/build in the git repo for 3.4 (theres some other issues that resolves, creates etc, i'll file those tickets suitable)

cartazio commented 10 years ago

the point being: i seem to be able to run cabal build on the sdists from hackage, but not directly on the subdirectorys in the git repo

bscarlet commented 10 years ago

Well, that's quite peculiar, but suggests something's weird about your environment. I'm not going to be able get into playing with 7.8 before it's released, so I can't do much right now. If you work out more of what's going on, do let me know.

cartazio commented 10 years ago

yes, i have NO CLUE whats going on wrt the git repo issue. (and needless to say, i'm not exactly pleased :) )

bscarlet commented 10 years ago

Well, the git repo contains two packages, llvm-general-pure and llvm-general. Are you installing llvm-general-pure first?

When I build, I coordinate building the two using the Shake.hs script, which uses cabal-dev. (I haven't switched to cabal sandboxes yet).

You might try "runhaskell Shake.hs" from the root directory of the git repo. The default shake target will build the two packages into a cabal-dev sandbox in the same directory, and run the tests. If that works you have a simple problem, if it doesn't then you have a messy one.

cartazio commented 10 years ago

hrmmmm... I was doing a cd llvm-general-pure ; cabal install ; cd .. ; cd llvm-general ; cabal install with no sandboxes. I'll try with sandboxing andor the shake script

bscarlet commented 10 years ago

Um... None of the commands you list is the "cabal configure" command you originally said caused the error. Please give a more literal and detailed sequence of commands and errors, preferably running only one command at a time.

cartazio commented 10 years ago

oh ok. i'll do a more detailed repro tomorrow. (was just giving another way to do the repro)

cartazio commented 10 years ago

ryan newton hit a related problem https://github.com/haskell/cabal/issues/1666 (well the same one)

cartazio commented 10 years ago

ok, this problem seems to be gone with the current RC (though still the -fshared-llvm + using libc++ rather than libstdc++ stuff)