sdiehl / kaleidoscope

Haskell LLVM JIT Compiler Tutorial
http://www.stephendiehl.com/llvm
Other
1.03k stars 132 forks source link

Can't install dependencies with ghc-7.6.3 #5

Closed Arminius closed 10 years ago

Arminius commented 10 years ago

When I try to set up the cabal sandbox, cabal tells me that installing the missing packages would break everything:

(master) % cabal sandbox init
Writing a default package environment file to
/home/arminius/Dev/kaleidoscope/cabal.sandbox.config
Creating a new sandbox at /home/arminius/Dev/kaleidoscope/.cabal-sandbox
(master) % cabal configure
Resolving dependencies...
Configuring kaleidoscope-0.1.0.0...
cabal: At least the following dependencies are missing:
haskeline ==0.7.0.0,
llvm-general ==3.3.8.2,
llvm-general-pure ==3.3.8.2,
mtl -any,
pandoc >=1.12,
transformers -any
(master) [1] % cabal install --only-dependencies
Resolving dependencies...
In order, the following would be installed:
asn1-types-0.2.3 (new package)
base-unicode-symbols-0.2.2.4 (new package)
base64-bytestring-1.0.0.1 (new package)
byteable-0.1.1 (new package)
cereal-0.4.0.1 (new package)
crypto-pubkey-types-0.4.2.2 (new package)
cryptohash-0.11.2 (new package)
data-default-class-0.0.1 (new package)
data-default-instances-base-0.0.1 (new package)
data-default-instances-containers-0.0.1 (new package)
data-default-instances-old-locale-0.0.1 (new package)
digest-0.0.1.2 (new package)
directory-1.0.0.3 (latest: 1.2.0.1) (new version)
dlist-0.6.0.1 (new package)
data-default-instances-dlist-0.0.1 (new package)
data-default-0.5.3 (new package)
extensible-exceptions-0.1.1.4 (new package)
nats-0.1.2 (new package)
primitive-0.5.2.1 (new package)
process-1.1.0.2 (latest: 1.2.0.0) (reinstall) changes: directory-1.2.0.1 ->
1.0.0.3
random-1.0.1.1 (new package)
securemem-0.1.3 (new package)
crypto-cipher-types-0.0.9 (new package)
cipher-aes-0.2.6 (new package)
cipher-rc4-0.1.4 (new package)
setenv-0.1.1.1 (new package)
syb-0.4.1 (new package)
terminfo-0.3.2.6 (latest: 0.4.0.0) (new package)
text-1.1.0.1 (new package)
blaze-builder-0.3.3.2 (new package)
blaze-markup-0.6.0.0 (new package)
blaze-html-0.7.0.1 (new package)
cookie-0.4.0.1 (new package)
hashable-1.2.1.0 (new package)
case-insensitive-1.1.0.3 (new package)
http-types-0.8.3 (new package)
scientific-0.2.0.2 (new package)
attoparsec-0.11.2.1 (new package)
tagsoup-0.13.1 (new package)
text-stream-decode-0.1.0.4 +text11 (new package)
transformers-0.3.0.0 (new package)
failure-0.2.0.1 (new package)
haskeline-0.7.0.0 (latest: 0.7.1.2) (new package)
mmorph-1.0.2 (new package)
mtl-2.1.2 (new package)
asn1-encoding-0.8.1.3 (new package)
asn1-parse-0.8.1 (new package)
exceptions-0.3.3 (new package)
hslua-0.3.10 (new package)
parsec-3.1.5 (new package)
llvm-general-pure-3.3.8.2 (latest: 3.4.1.0) (new package)
network-2.4.2.2 (new package)
HTTP-4000.2.11 (new package)
pem-0.2.1 (new package)
regex-base-0.93.2 (new package)
regex-pcre-builtin-0.94.4.8.8.34 (new package)
highlighting-kate-0.5.6.1 (new package)
socks-0.5.4 (new package)
temporary-1.2.0.1 (new package)
transformers-base-0.4.1 (new package)
monad-control-0.3.2.3 (new package)
lifted-base-0.2.2.1 (new package)
resourcet-0.4.10 (new package)
unordered-containers-0.2.3.3 (new package)
semigroups-0.12.2 (new package)
utf8-string-0.3.7 -bytestring-in-base (new package)
llvm-general-3.3.8.2 (latest: 3.4.1.0) (new package)
publicsuffixlist-0.1 (new package)
vector-0.10.9.1 (new package)
aeson-0.7.0.2 (new package)
crypto-random-0.0.7 (new package)
cprng-aes-0.5.2 (new package)
crypto-numbers-0.2.3 (new package)
crypto-pubkey-0.2.4 (new package)
pandoc-types-1.12.3.2 (new package)
void-0.6.1 (new package)
conduit-1.0.15.1 (new package)
x509-1.4.11 (new package)
x509-store-1.4.4 (new package)
x509-system-1.4.2 (new package)
x509-validation-1.5.0 (new package)
tls-1.2.2 (new package)
connection-0.2.0 (new package)
xml-1.3.13 (new package)
texmath-0.6.6 (new package)
yaml-0.8.7.2 (new package)
zlib-0.5.4.1 (new package)
zip-archive-0.1.3.3 (latest: 0.2.2) (new package)
zlib-bindings-0.1.1.3 (new package)
http-client-0.2.2.2 (new package)
http-client-conduit-0.2.0.1 (new package)
http-client-tls-0.2.1.1 (new package)
http-conduit-2.0.0.8 (new package)
pandoc-1.12.3.3 (new package)
cabal: The following packages are likely to be broken by the reinstalls:
haskell98-2.0.0.2
ghc-7.6.3
haddock-2.13.2.1
Cabal-1.16.0
bin-package-db-0.0.0.0
Use --force-reinstalls if you want to install anyway.

When I do use --force-reinstalls, the build fails:

cabal: Error: some packages failed to install:
conduit-1.0.15.1 depends on directory-1.0.0.3 which failed to install.
connection-0.2.0 depends on directory-1.0.0.3 which failed to install.
directory-1.0.0.3 failed during the building phase. The exception was:
ExitFailure 1
haskeline-0.7.0.0 depends on directory-1.0.0.3 which failed to install.
http-client-conduit-0.2.0.1 depends on directory-1.0.0.3 which failed to
install.
http-client-tls-0.2.1.1 depends on directory-1.0.0.3 which failed to install.
http-conduit-2.0.0.8 depends on directory-1.0.0.3 which failed to install.
llvm-general-3.3.8.2 failed during the configure step. The exception was:
ExitFailure 1
pandoc-1.12.3.3 depends on directory-1.0.0.3 which failed to install.
process-1.1.0.2 depends on directory-1.0.0.3 which failed to install.
temporary-1.2.0.1 depends on directory-1.0.0.3 which failed to install.
tls-1.2.2 depends on directory-1.0.0.3 which failed to install.
x509-1.4.11 depends on directory-1.0.0.3 which failed to install.
x509-store-1.4.4 depends on directory-1.0.0.3 which failed to install.
x509-system-1.4.2 depends on directory-1.0.0.3 which failed to install.
x509-validation-1.5.0 depends on directory-1.0.0.3 which failed to install.
yaml-0.8.7.2 depends on directory-1.0.0.3 which failed to install.
zip-archive-0.1.3.3 depends on directory-1.0.0.3 which failed to install.
(master) [1] %

Further up in the log, these are the errors for directory-1.0.0.3:

Building directory-1.0.0.3...
Preprocessing library directory-1.0.0.3...
[1 of 1] Compiling System.Directory ( System/Directory.hs, dist/dist-sandbox-749f3e8e/build/System/Directory.o )

System/Directory.hs:595:10:
    Not in scope: `Prelude.catch'
    Perhaps you meant one of these:
      `Prelude.acosh' (imported from Prelude),
      `Prelude.acosh' (imported from Prelude),
      `Prelude.atan' (imported from Prelude)

System/Directory.hs:741:40: Not in scope: `c_opendir'

System/Directory.hs:742:42:
    Not in scope: `c_closedir'
    Perhaps you meant `c_close' (imported from System.Posix.Internals)

System/Directory.hs:747:22:
    Not in scope: type constructor or class `CDirent'

System/Directory.hs:747:38:
    Not in scope: type constructor or class `CDir'

System/Directory.hs:750:12: Not in scope: `readdir'

System/Directory.hs:757:33:
    Not in scope: `d_name'
    Perhaps you meant `System.Posix.rename' (imported from System.Posix)

System/Directory.hs:758:21: Not in scope: `freeDirEnt'

System/Directory.hs:764:28: Not in scope: `end_of_dir'

System/Directory.hs:1079:5:
    Not in scope: `Prelude.catch'
    Perhaps you meant one of these:
      `Prelude.acosh' (imported from Prelude),
      `Prelude.acosh' (imported from Prelude),
      `Prelude.atan' (imported from Prelude)
Failed to install directory-1.0.0.3

So among other things, the library directory depends on obsolete functions in the prelude which are no longer included in GHC. Which versions of GHC does kaleidoscope support?

For further information: I am running ghc-7.6.3 and cabal-1.18.0.3 on Arch Linux.

sdiehl commented 10 years ago

I bumped the version of haskeline on master that seemed to be causing the version conflict on 7.6.3. Let me know if that fixes your problem.

Also made pandoc an optional dependency.

Arminius commented 10 years ago

Thanks! That solved that issue. Only remaining problem is that llvm-general fails because Arch comes with llvm-3.4, but that's another issue. I'll see if it works with the fix described in #2.