Halo~
I ran into the following error while trying to run a binary generated
by GHC 6.8.x on our production machines with a not-so-recent linux
installed (kernel 2.6.9).
$ ./restyscript
restyscript: timer_create: Invalid argument
Evan building a pure static-linking executable did not solve the problem.
Then I downloaded the binary GHC 6.8.3 from haskell.org on that
machine, but the ghc crashes as well:
$ ghc
Floating point exception
My teammate chaos++ found that the last time precision argument passed
to the timer_create function was just too big. Manually editing the
binary executable (the restyscript file in the previous example)
solved this issue completely, but, yeah, it's terribly hacky.
So I decided to build a GHC 6.8.3 from source on that old system using
GHC 6.4.2. Fortunately, the binary GHC 6.4.2 from haskell.org does
work there. The newly-built GHC solves all the problem. No
floating-point exception nor invalid argument for timer_create. I've
put my binary distribution on my site here:
http://agentzh.org/misc/ghc-6.8.3-i386-old-linux.tar.bz2
Hopefully it'll be useful for someone else ;) Not sure if it's worth
putting to the official download page as well :)
Ideally GHC should inspect the kernel version and timer_create support
at *runtime*, rather compile-time. It'll make our lives much easier ;)
Thanks!
-agentzh
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe