haskell - Can't compile a simple hello world using GHC 7.8rc2 and Windows 7 (or install packages with cabal) -


i can't compile simple hello world or install packages cabal install when using ghc 7.8, cabal 1.18.1.3 , cabal-install 1.18.0.2.

when doing cabal install stm (or other package) command prompt windows shows "ghc.exe has stopped working" window, , output is:

reading available packages... choosing modular solver. resolving dependencies... ready install stm-2.4.2 extracting waiting install task finish... c:\users\%user%\appdata\roaming\cabal\packages\hackage.haskell.org\stm\2.4.2\stm-2.4.2.tar.gz c:\users\%user%\appdata\local\temp\stm-2.4.2-6556... updating stm.cabal latest revision index. configuring stm-2.4.2... creating c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist\setup creating c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist creating c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist\setup "c:\ghc-7.8.0\bin\ghc.exe" "--make" "-odir" "c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist\setup" "-hidir" "c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist\setup" "-i" "-ic:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2" "-package-id" "cabal-1.18.1.3-ac8664a5c71d605f2a4a8e21170969e0" "c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist\setup\setup.hs" "-o" "c:\users\%user%\appdata\local\temp\stm-2.4.2-6556\stm-2.4.2\dist\setup\setup.exe" failed install stm-2.4.2 last 10 lines of build log ( c:\users\%user%\appdata\roaming\cabal\logs\stm-2.4.2.log ): world file date. cabal.exe: error: packages failed install: stm-2.4.2 failed during configure step. exception was: user error 

i installed(?) ghc 7.8 , cabal-install following steps

before doing this, uninstalled previous haskell platform, deleted folders cabal , ghc %user%\appdata\roaming, , other haskell stuff program files folder.

i not sure if ghc needed additional installation steps

i need ghc 7.8 because want try out ghcjs.

ps:

i added lang=c env variables compiling not throw utf-8 encoding error.

cabal --version shows:

cabal-install version 1.18.0.2 using version 1.18.1 of cabal library 

which seems ok except cabal library shows 1.18.1 instead of 1.18.1.3, i'm not sure that's error.

ghc-pkg list shows:

c:/ghc-7.8.0\lib\package.conf.d: cabal-1.18.1.3 win32-2.3.0.1 array-0.5.0.0 base-4.7.0.0 bin-package-db-0.0.0.0 binary-0.7.1.0 rts-1.0 bytestring-0.10.4.0 containers-0.5.4.0 deepseq-1.3.0.2 directory-1.2.0.2 filepath-1.3.0.2 (ghc-7.8.0.20140228) ghc-prim-0.3.1.0 (haskell2010-1.1.1.1) (haskell98-2.0.0.3) hoopl-3.10.0.0 hpc-0.6.0.1 integer-gmp-0.5.1.0 old-locale-1.0.0.6 old-time-1.1.0.2 pretty-1.1.1.1 process-1.2.0.0 template-haskell-2.9.0.0 time-1.4.1 transformers-0.3.0.0 

** edit **: trying compile stm manually going folder , running ghc generates same error window , gives output:

edit 2: actually, can't compile simple hello world ghc helloworld.hs:

main = putstrln "hello, world!"

compiling "-v3" gives following (uninformative) output:

glasgow haskell compiler, version 7.8.0.20140228, stage 2 booted ghc version 7.6.3 using binary package database: c:\ghc-7.8.0\lib\package.conf.d\package.cache wired-in package ghc-prim mapped ghc-prim-0.3.1.0-ce20d91f79b43ede95508e8cfd2188b0 wired-in package integer-gmp mapped integer-gmp-0.5.1.0-67cd00feecdc491a633c46b0f7652b46 wired-in package base mapped base-4.7.0.0-d4a0afe8e5c5f0dff2237b1231b56978 wired-in package rts mapped builtin_rts wired-in package template-haskell mapped template-haskell-2.9.0.0-f798cb95c80f3e3751ec33b413381b57 wired-in package dph-seq not found. wired-in package dph-par not found. hsc static flags: wired-in package ghc-prim mapped ghc-prim-0.3.1.0-ce20d91f79b43ede95508e8cfd2188b0 wired-in package integer-gmp mapped integer-gmp-0.5.1.0-67cd00feecdc491a633c46b0f7652b46 wired-in package base mapped base-4.7.0.0-d4a0afe8e5c5f0dff2237b1231b56978 wired-in package rts mapped builtin_rts wired-in package template-haskell mapped template-haskell-2.9.0.0-f798cb95c80f3e3751ec33b413381b57 wired-in package dph-seq not found. wired-in package dph-par not found. *** chasing dependencies: chasing modules from: *asd.hs stable obj: [] stable bco: [] ready upsweep   [nonrec       modsummary {          ms_hs_date = 2014-03-10 04:11:51 utc          ms_mod = main:main,          ms_textual_imps = [import (implicit) prelude]          ms_srcimps = []       }] *** deleting temp files: deleting: compile: input file asd.hs created temporary directory: c:\users\facuq\appdata\local\temp\ghc6824_1 *** checking old interface main:main: [1 of 1] compiling main             ( asd.hs, asd.o ) *** parser: *** renamer/typechecker: *** desugar: result size of desugar (after optimization)   = {terms: 7, types: 5, coercions: 0} *** simplifier: result size of simplifier = {terms: 7, types: 5, coercions: 0} *** tidy core: result size of tidy core = {terms: 7, types: 5, coercions: 0} *** coreprep: result size of coreprep = {terms: 9, types: 6, coercions: 0} *** stg2stg: *** codeoutput: *** new codegen: *** cpsz: *** cpsz: 

it's bug in ghc; confirmed on ghc mailing list, , 2 people can reproduce (ghc's bug manager thread).


Comments

Popular posts from this blog

Android layout hidden on keyboard show -

google app engine - 403 Forbidden POST - Flask WTForms -

c - Why would PK11_GenerateRandom() return an error -8023? -