
10 Nov
2009
10 Nov
'09
4:29 p.m.
MightyByte
After a bit of googling, I came to the conclusion that I needed to compile it with "ghc --make -static -optl-static Foo.hs". Using only "-static" or "-optl-static" by themselves did not generate a statically linked binary. But when I compile with both those parameters I get a bunch of linker errors: [..] (.text+0x59c): undefined reference to `pthread_mutex_lock'
For some reason, GHC doesn't link with the pthreads library, so you need to compile (link) with two options: -opt-static -optl-pthread -k -- If I haven't seen further, it is by standing in the footprints of giants