GHC 7.4.1 Release Candidate 1 is out!

If you have not noticed yet, then please note that GHC 7.4.1 Release Candidate 1 is out. Please also note that 7.4.1 will be the first public release which will support registerised compilation on ARM/Linux platform. If you are a haskell fan and do have some ARM/Linux platform available, please do not forget to give it a try.
What’s basically needed is to have some recent Ubuntu installed together with its provided GNU C++ and GHC compilers. If you do have this, then just grab the LLVM 3.0 source code and unpack it somewhere and run following inside its directory:

$ ./configure
$ make ENABLE_OPTIMIZED=1 OPTIMIZE_OPTION=-O1

when it finishes successfully (it really should), then inside the Release/bin subdirectory you do have LLVM binaries. Extend your PATH variable:

$ export PATH=$PATH:`pwd`/Release/bin

and then move somewhere and download ghc-7.4.0.20111219-src.tar.bz2 which is 7.4.1 RC1 distribution tarball. Unpack it somewhere go into its directory (ghc-7.4.0.20111219) and run:

$ ./configure
$ make

Here the compilation should fail with error like:

"inplace/bin/ghc-stage2"   -H32m -O    -package-name dph-prim-par-0.5.2.0 -hide-all-packages -i -ilibraries/dph/dph-prim-par/. -ilibraries/dph/dph-prim-par/dist-install/build -ilibraries/dph/dph-prim-par/dist-install/build/autogen -Ilibraries/dph/dph-prim-par/dist-install/build -Ilibraries/dph/dph-prim-par/dist-install/build/autogen -Ilibraries/dph/dph-prim-par/.    -optP-include -optPlibraries/dph/dph-prim-par/dist-install/build/autogen/cabal_macros.h -package base-4.5.0.0 -package dph-base-0.5.2.0 -package dph-prim-interface-0.5.2.0 -package dph-prim-seq-0.5.2.0 -package old-time-1.1.0.0 -package random-1.0.1.1 -package vector-0.9.1  -Odph -funbox-strict-fields -fcpr-off -Werror -XHaskell98 -XTypeFamilies -XGADTs -XRankNTypes -XBangPatterns -XMagicHash -XUnboxedTuples -XTypeOperators -XFlexibleInstances -XFlexibleContexts -O2  -no-user-package-conf -rtsopts     -odir libraries/dph/dph-prim-par/dist-install/build -hidir libraries/dph/dph-prim-par/dist-install/build -stubdir libraries/dph/dph-prim-par/dist-install/build -hisuf hi -osuf  o -hcsuf hc -c libraries/dph/dph-prim-par/./Data/Array/Parallel/Unlifted/Distributed/Types/Unit.hs -o libraries/dph/dph-prim-par/dist-install/build/Data/Array/Parallel/Unlifted/Distributed/Types/Unit.o
ghc-stage2: panic! (the 'impossible' happened)
  (GHC version 7.4.0.20111219 for arm-unknown-linux):
        Cant do annotations without GHCi
    {libraries/vector/Data/Vector/Fusion/Stream/Monadic.hs:104:19-33}
    base:GHC.Exts.ForceSpecConstr{d rbL}

Please report this as a GHC bug:  http://www.haskell.org/ghc/reportabug

make[1]: *** [libraries/vector/dist-install/build/Data/Vector/Fusion/Stream/Monadic.o] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [all] Error 2

This is expected result caused by the fact that GHC does not support GHCi on ARM yet. We are working on it be assured. Anyway, ghc-stage2 compiler should work for you quite well:

$ ./inplace/bin/ghc-stage2 --info
 [("Project name","The Glorious Glasgow Haskell Compilation System")
 ,("GCC extra via C opts"," -fwrapv")
 ,("C compiler command","/export/home/karel/arm-sfw/gcc-linaro-2011.12-0/bin/gcc")
 ,("C compiler flags"," -fno-stack-protector  -Wl,--hash-size=31 -Wl,--reduce-memory-overheads")
 ,("ar command","/usr/bin/ar")
 ,("ar flags","q")
 ,("ar supports at file","YES")
 ,("touch command","touch")
 ,("dllwrap command","/bin/false")
 ,("windres command","/bin/false")
 ,("perl command","/usr/bin/perl")
 ,("target os","OSLinux")
 ,("target arch","ArchARM {armISA = ARMv7, armISAExt = [VFPv3,NEON]}")
 ,("target has GNU nonexec stack","False")
 ,("target has subsections via symbols","False")
 ,("Project version","7.4.0.20111219")
 ,("Booter version","6.12.3")
 ,("Stage","2")
 ,("Build platform","arm-unknown-linux")
 ,("Host platform","arm-unknown-linux")
 ,("Target platform","arm-unknown-linux")
 ,("Have interpreter","NO")
 ,("Object splitting supported","NO")
 ,("Have native code generator","NO")
 ,("Support SMP","YES")
 ,("Unregisterised","NO")
 ,("Tables next to code","YES")
 ,("RTS ways","l debug  thr thr_debug thr_l  ")
 ,("Leading underscore","NO")
 ,("Debug on","False")
 ,("LibDir","/export/home/karel/src/ghc-7.4.0.20111219/inplace/lib")
 ,("Global Package DB","/export/home/karel/src/ghc-7.4.0.20111219/inplace/lib/package.conf.d")
 ,("Gcc Linker flags","[\"-Wl,--hash-size=31\",\"-Wl,--reduce-memory-overheads\"]")
 ,("Ld Linker flags","[\"--hash-size=31\",\"--reduce-memory-overheads\"]")
 ]

If you would like to run full GHC testsuite with this, then you will need to grab it from ghc-7.4 branch. For this please have a look at GHC page expaining details how to get source code here. Once you do have ghc-7.4 branch including testsuite checked out, just copy testsuite subdirectory to ghc-7.4.0.20111219 directory and then run:

$ cd testsuite
$ make TIMEOUT=1500 WAY="normal threaded1 threaded2"

This will take some time, but at the end you should get overall summary of testing. In my case it looked:

OVERALL SUMMARY for test run started at Fri Dec 23 20:15:32 CET 2011
    3158 total tests, which gave rise to
    6816 test cases, of which
       0 caused framework failures
    2731 were skipped

    3880 expected passes
     135 expected failures
       1 unexpected passes
      69 unexpected failures

Unexpected passes:
   quasiquotation  T5204 (normal)

Unexpected failures:
   ../../libraries/random/tests  rangeTest [bad exit code] (normal,threaded1,threaded2)
   annotations/should_run        annrun01 [exit code non-0] (normal,threaded1,threaded2)
   cabal                         ghcpkg05 [bad stderr] (normal)
   cabal/cabal04                 cabal04 [bad exit code] (normal)
   codeGen/should_compile        jmp_tbl [exit code non-0] (normal)
   codeGen/should_compile        massive_array [exit code non-0] (normal)
   dph/classes                   dph-classes-fast [exit code non-0] (normal,threaded1,threaded2)
   dph/dotp                      dph-dotp-fast [exit code non-0] (normal,threaded1,threaded2)
   dph/dotp                      dph-dotp-opt [exit code non-0] (normal,threaded1,threaded2)
   dph/primespj                  dph-primespj-fast [exit code non-0] (normal,threaded1,threaded2)
   dph/primespj                  dph-primespj-opt [exit code non-0] (normal,threaded1,threaded2)
   dph/quickhull                 dph-quickhull-fast [exit code non-0] (normal,threaded1,threaded2)
   dph/quickhull                 dph-quickhull-opt [exit code non-0] (normal,threaded1,threaded2)
   dph/sumnats                   dph-sumnats [exit code non-0] (normal,threaded1,threaded2)
   dph/words                     dph-words-fast [exit code non-0] (normal)
   dph/words                     dph-words-opt [exit code non-0] (normal)
   driver                        5313 [exit code non-0] (normal,threaded1,threaded2)
   driver/recomp009              recomp009 [bad exit code] (normal)
   ghc-api/T4891                 T4891 [bad exit code] (normal)
   ghc-api/apirecomp001          apirecomp001 [bad exit code] (normal)
   ghc-api/dynCompileExpr        dynCompileExpr [exit code non-0] (normal,threaded1,threaded2)
   ghci/linking                  ghcilink001 [bad exit code] (normal)
   ghci/linking                  ghcilink002 [bad exit code] (normal)
   ghci/linking                  ghcilink003 [bad exit code] (normal)
   ghci/linking                  ghcilink004 [bad exit code] (normal)
   ghci/linking                  ghcilink005 [bad exit code] (normal)
   ghci/linking                  ghcilink006 [bad exit code] (normal)
   ghci/scripts                  ghci024 [bad exit code] (normal)
   perf/compiler                 T1969 [stat not good enough] (normal)
   perf/compiler                 T3064 [stat not good enough] (normal)
   perf/compiler                 T4801 [stat not good enough] (normal)
   perf/compiler                 T5030 [stat not good enough] (normal)
   perf/compiler                 T5631 [stat not good enough] (normal)
   quasiquotation/qq007          qq007 [exit code non-0] (normal)
   quasiquotation/qq008          qq008 [exit code non-0] (normal)
   rts                           T2615 [exit code non-0] (normal,threaded1,threaded2)
   rts                           derefnull [bad exit code] (threaded2)
   rts                           testblockalloc [bad exit code] (normal,threaded1)
   safeHaskell/flags             Flags02 [exit code non-0] (normal)
   safeHaskell/safeLanguage      SafeLang01 [stderr mismatch] (normal)
   safeHaskell/safeLanguage      SafeLang12 [stderr mismatch] (normal)
   safeHaskell/safeLanguage      SafeLang16 [stderr mismatch] (normal)
About these ads

2 thoughts on “GHC 7.4.1 Release Candidate 1 is out!

    • Why do you think you will need to wait? Just go ahead, search GHC devel mailing list for arm +linker, grab the code and start coding yourself…

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s