Building a GHC-7.4 with Eden support
Note that
binary packages for Eden on a single multicore machine and the source distribution are
available here. Building Eden is almost the same as building GHC without it, espacialy if you don't want to use PVM or MPI, you can follow the instructions for standard GHC. Please have a look at the GHC documentation on
building GHC.
See also our building instructions for GHC-Eden-6.12.
Prerequisites
- Shortcut for ubuntu 11.11 or ubuntu 12.04:
- You can use the following command to install all dependencies and set PVM_ROOT:
#> sudo apt-get install libopenmpi-dev openmpi-bin pvm-dev ghc autoconf libtool happy alex libncurses5-dev patch xutils-dev && echo >> ~/.bashrc && echo 'export PVM_ROOT=/usr/lib/pvm3' >> ~/.bashrc && echo 'export PVM_RSH=`which ssh`' >> ~/.bashrc && echo 'export PVM_ARCH=pvmgetarch' >> ~/.bashrc && source ~/.bashrc
To build GHC with Eden support on a Linux machine, you need:
- the source distribution of GHC-Eden
- a working GCC
- a working GHC, preferably versions 7.x. If not yet available, install GHC via your standard package manager or use a binary package (GHC is needed to build GHC).
- other tools you need to build GHC 7.4 (autoconf, libtool, happy, alex, libncurses5-dev, patch, ...)
- To run Eden programs on a cluster, you need MPI and/or PVM
- MPI: Eden should work with any MPI distribution. We tested it with Open MPI
- PVM: If you want to use PVM, you need to set the environment variable PVM_ROOT (in the file ~/.bashrc if you use the bash, or a similar file if you use another shell) BEFORE you build the Eden compiler and to run Eden programs:
export PVM_ROOT=<PATH> #(<PATH> being the location of the pvm binaries (bin) and libraries (lib) -- this is e.g. "/usr/lib/pvm3" for an ubuntu system)
export PVM_RSH=`which ssh`
export PVM_ARCH=`$PVM_ROOT/lib/pvmgetarch`
MPI and/or PVM must be installed and correctly configured prior to building Eden. Otherwise it will only be possible to use Eden on a single machine.
Building instructions
-
You can create a special directory for the build (optional) and link it to the sources.
#>mkdir mybuild
#>cd mybuild
#>lndir <path_to_ghc> .
-
Suppose you have created a build tree "mybuild", navigate to"mybuild", else navigate to the folder you've downloaded Eden.
-
You can change build settings in the file 'mk/build.mk' (optional, default is an optimised build).
- Open 'mk/build.mk.sample' with your preferred text editor. The first lines will hold build profiles, each consisting of a descriptive line and a line holding the corresponding command (the lines beginning with "#BuildFlavour").
- Uncomment (i.e. remove the leading "#") the line holding the command for your profile of choice.
- Save as 'mk/build.mk'.
- Now execute:
- #>./boot
- #>./configure
- with typical options:
- --prefix=<installation_path>
- --with-gcc=<path_to_custom_gcc>
- the configure script will show you in the summary if it detected support for MPI or PVM, check that you have installed the header and binary files if MPI/PVM was not detected.
- #>make
- with typical option -j<i> to build with i parallel threads
- #>make install
- you can use the inplace compiler also without installation. It is available in the path inplace/bin/ghc-stage2.
- Use 'make maintainer-clean' if you want to make a new build with different settings.