On Tue, Nov 10, 2009 at 4:29 PM, Ketil Malde <ke...@malde.org> wrote: > MightyByte <mightyb...@gmail.com> writes: > >> 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
Excellent, that appears to have solved my problem. It still gives me the warning: (.text+0x3068): warning: Using 'getaddrinfo' in statically linked applications requires at runtime the shared libraries from the glibc version used for linking But glibc is pretty standard, so I don't think this will be a problem for me. Thanks for the help. _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe