I was able to solve this by just installing the right packages (no linking).
sudo apt-get install libgmp3c2 freeglut3 freeglut3-dev -y
I'll note that I already had these dependencies installed:
make libssl-dev build-essential curl git-core
Raring is caught in a valley between having a GHC too new for Haskell Platform 2012.4.0.0 and too old for 2013.2.0.0. This valley can be bridged with some pain and duct tape.
You can install the Haskell Platform 2013.2.0.0 from source if you have GHC already installed. It's a bit of a process, but it does work.
First, install GHC 7.6.2:
sudo apt-get install ghc
Now you need GHC 7.6.3 as it is a pre-req for Haskell Platform 2013.2.0.0.
CAUTION:
You might think installing from the unknown-linux archives of
GHC will work. It won't. The GHC in those archives is dynamically
linked against /usr/lib/libgmp.so.3 which is unavailable on Raring
which has libgmp.so.10. Do NOT be tempted to symlink this library
to it's earlier version's name and location to fake out the linker. I
went there and it is a path to very confusing failures and is a very
bad practice so I mended my ways and built GHC from source.
Next, you need to get and build GHC 7.6.3 from source (GHC is a self-hosted compiler so it needs GHC to build it):
wget http://www.haskell.org/ghc/dist/7.6.3/ghc-7.6.3-src.tar.bz2
tar xjvf ghc-7.6.3-src.tar.bz2
cd ghc-7.6.3
./configure
make
sudo make install
Compiling GHC took quite a while (several hours, > halflife of Cesium isotope Cs-134m) for me so this is likely a very good time for a break or sleep. It goes through three stages (0, 1, and 2) of building the compiler and then building the compiler's next stage with the compiler that was built.
To speed the compile process up, you can use
make -j 8
in the above step to leverage multi-core CPU.
Then, get and build the Haskell Platform from source (I'll use 2013.2.0.0 as an example):
wget http://lambda.haskell.org/platform/download/2013.2.0.0/haskell-platform-2013.2.0.0.tar.gz
tar xzvf haskell-platform-2013.2.0.0.tar.gz
cd haskell-platform-2013.2.0.0
./configure
make
sudo make install
Compiling the Haskell Platform took quite >30 minutes for me so this is another good time for a break.
You should now have a working Haskell Platform 2013.2.0.0 with GHC 7.6.3 correctly linked against libgmp.so.10.
Best Answer
Note that I would usually just do
sudo apt-get install haskell-platform
, which should just sort everything out. However it hasn't been packaged for 13.04 yet.Get these dependencies, if you don't already have them:
The Haskell platform seems to be looking for a
libgmp.so.3
, but thelibgmp
package only supplieslibgmp.so
,libgmp.so.10
andlibgmp.so.10.0.5
. The fix:(Disclaimer: This worked for me. Not sure if it's a sensible thing to do)