Ubuntu 11.10 comes with this library libgmp.so.10 and previous versions come with libgmp.so.3. When you make ghc --make app.hs, it dynamically links libgmp.so.10. This won't run on 11.04 or earlier with the error message libgmp.so.10 not found. So, I compiled using ghc -static -optl-static -optl-pthread --make app.hs. (http://stackoverflow.com/questions/7344744/haskell-program-built-on-ubuntu-11-10-doesnt-run-on-ubuntu-10-04 got it running).

I even ran ldd to check dependencies:
ldd app
  not a dynamic executable

Now, it fails with 
app: mkTextEncoding: invalid argument (Invalid argument)

I'm trying to deploy to Heroku. Here's the repository: https://github.com/abdulsattar/hkonhk.
Here's the heroku app: http://hkonhk.herokuapp.com/
And here's the output of heroku log (after the push):

2011-12-30T07:13:58+00:00 heroku[slugc]: Slug compilation started
2011-12-30T07:14:06+00:00 heroku[web.1]: State changed from crashed to created
2011-12-30T07:14:06+00:00 heroku[web.1]: State changed from created to starting
2011-12-30T07:14:06+00:00 heroku[slugc]: Slug compilation finished
2011-12-30T07:14:08+00:00 heroku[web.1]: Starting process with command `./app`
2011-12-30T07:14:08+00:00 app[web.1]: app: mkTextEncoding: invalid argument (Invalid argument)
2011-12-30T07:14:10+00:00 heroku[web.1]: State changed from starting to crashed
2011-12-30T07:14:10+00:00 heroku[web.1]: Process exited
2011-12-30T07:14:11+00:00 heroku[router]: Error H10 (App crashed) -> GET hkonhk.herokuapp.com/ dyno= queue= wait= service= status=503 bytes=

I've asked about this many times on #haskell, but I couldn't get it working. Help would be highly appreciated.
--
Warm Regards,

AbdulSattar Mohammed