13 November 2015

bootstrapping ghc

System: Slackware Linux (version 14.0)
CPUs: Intel(R) Atom(TM) CPU N270 @1.60GHz
Deps: gmp-5.0.5

Mikko Värri's build script took about 5 hours to run.

http://slackbuilds.org/repository/14.1/haskell/ghc/


ghc-7.8.4-i386-unknown-linux-deb7.tar.xz


bash-4.2# ./ghc.SlackBuild

...

bash-4.2# installpkg ghc-7.8.4-i486-1_SBo.tgz
Verifying package ghc-7.8.4-i486-1_SBo.tgz.
Installing package ghc-7.8.4-i486-1_SBo.tgz:
PACKAGE DESCRIPTION:
# ghc (The Glasgow Haskell Compiler)
#
# GHC is a state-of-the-art, open source, compiler and interactive
# environment for the functional language Haskell.
# This is a complete build, including interactive system, profiling
# libraries and documentation.
#
# Homepage: http://haskell.org/ghc/
#
Executing install script for ghc-7.8.4-i486-1_SBo.tgz.
Package ghc-7.8.4-i486-1_SBo.tgz installed.

bash-4.2# ghci
GHCi, version 7.8.4: http://www.haskell.org/ghc/  :? for help
Loading package ghc-prim ... linking ... done.
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
Prelude> :quit
Leaving GHCi.

bash-4.2#

Installation of the test-framework and statistics packages.

http://www.slackbuilds.org/repository/14.1/haskell/
https://hackage.haskell.org/package/test-framework
https://hackage.haskell.org/package/statistics

I prefer the documenatation for packages to be centrally located,
so I modify the SlackBuild scripts where available as follows:

GHC_VERSION=$(ghc --numeric-version)

+ DOCDIR=/usr/doc/ghc-${GHC_VERSION}/extralibs

-  --docdir=/usr/doc/$PRGNAM-$VERSION
+  --docdir=${DOCDIR}/$SRCNAM-$VERSION

- mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
- cp -a LICENSE  $PKG/usr/doc/$PRGNAM-$VERSION
- cat $CWD/$PRGNAM.SlackBuild > \
- $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild

+ mkdir -p $PKG/$DOCDIR/$SRCNAM-$VERSION
+ cp -a LICENSE $PKG/$DOCDIR/$SRCNAM-$VERSION
+ cat $CWD/$PRGNAM.SlackBuild > \
+ $PKG/$DOCDIR/$SRCNAM-$VERSION/$PRGNAM.SlackBuild

SlackBuilds for abstract-par, erf, and ieee754, are located in the sidebar;
follow the template for writing a slack-desc file, or use the one accompany-
ing the SlackBuild. 

bash-4.2# installpkg haskell-HUnit-1.2.5.2-i486-2_SBo.tgz \
> haskell-abstract-par-0.3.3-i486-1_SBo.tgz \
> haskell-ansi-terminal-0.6.2.1-i486-1_SBo.tgz \
> haskell-cereal-0.4.1.1-i486-1_SBo.tgz \
> haskell-dlist-0.7.1-i486-1_SBo.tgz \
> haskell-erf-2.0.0.0-i486-1_SBo.tgz \
> haskell-extensible-exceptions-0.1.1.4-i486-1_SBo.tgz \
> haskell-hostname-1.0-i486-2_SBo.tgz \
> haskell-ieee754-0.7.6-i486-1_SBo.tgz \
> haskell-mtl-2.1.3.1-i486-1_SBo.tgz \
> haskell-primitive-0.5.4.0-i486-1_SBo.tgz \
> haskell-random-1.1-i486-1_SBo.tgz \
> haskell-syb-0.4.4-i486-1_SBo.tgz \
> haskell-text-1.2.0.3-i486-1_SBo.tgz

...

bash-4.2# 

SlackBuilds for atomic-primops and libxml are located in the sidebar.

bash-4.2# installpkg haskell-ansi-wl-pprint-0.6.7.1-i486-1_SBo.tgz \
> haskell-atomic-primops-0.8.0.2-i486-1_SBo.tgz \
> haskell-hashable-1.2.3.1-i486-1_SBo.tgz \
> haskell-libxml-0.1.1-i486-1_SBo.tgz \
> haskell-regex-base-0.93.2-i486-3_SBo.tgz \
> haskell-tf-random-0.4-i486-1_SBo.tgz \
> haskell-vector-0.10.12.2-i486-1_SBo.tgz \
> haskell-xml-1.3.13-i486-1_SBo.tgz

...

bash-4.2# 

and vector-th-unbox, are located in the sidebar.

bash-4.2# installpkg haskell-mwc-random-0.13.3.2-i486-1_SBo.tgz \
> haskell-QuickCheck-2.7.6-i486-1_SBo.tgz \
> haskell-regex-posix-0.95.2-i486-1_SBo.tgz \
> haskell-scientific-0.3.3.4-i486-1_SBo.tgz \
> haskell-unordered-containers-0.2.5.1-i486-1_SBo.tgz \
> haskell-vector-binary-instances-0.2.1.0-i486-1_SBo.tgz \
> haskell-vector-th-unbox-0.2.1.3-i486-1_SBo.tgz

...

bash-4.2# 

SlackBuilds for abstract-deque, math-functions, and
vector-algorithms, are located in the sidebar.

bash-4.2# installpkg haskell-abstract-deque-0.3-i486-1_SBo.tgz \
> haskell-math-functions-0.1.5.2-i486-1_SBo.tgz \
> haskell-parallel-3.2.0.6-i486-1_SBo.tgz \
> haskell-test-framework-0.8.1.0-i486-1_SBo.tgz \
> haskell-vector-algorithms-0.7.0.1-i486-1_SBo.tgz

...

bash-4.2# 

SlackBuilds for chaselev-deque and monad-par-extras are located in the sidebar.

bash-4.2# installpkg haskell-attoparsec-0.12.1.2-i486-1_SBo.tgz \
> haskell-chaselev-deque-0.5.0.5-i486-1_SBo.tgz \
> haskell-monad-par-extras-0.3.3-i486-1_SBo.tgz \
> haskell-test-framework-hunit-0.3.0.1-i486-1_SBo.tgz \
> haskell-test-framework-quickcheck2-0.3.0.3-i486-1_SBo.tgz

...

bash-4.2# 

SlackBuilds for abstract-deque-tests and monad-par are located in the sidebar.

bash-4.2# installpkg haskell-abstract-deque-tests-0.3-i486-1_SBo.tgz \
> haskell-aeson-0.8.0.2-i486-1_SBo.tgz \
> haskell-monad-par-0.3.4.7-i486-1_SBo.tgz

...

bash-4.2# 

A SlackBuild for statistics is located in the sidebar.

bash-4.2# installpkg haskell-statistics-0.13.2.3-i486-1_SBo.tgz

...

bash-4.2#