[Haskell-cafe] Static linking for machines that don't have Haskell

Ketil Malde ketil at malde.org
Sun Oct 2 09:03:54 CEST 2011

Roshan James <rpjames at umail.iu.edu> writes:

> This gives me several warnings of the form:
> */usr/lib/haskell-packages/ghc6/lib/network-
> In function `sw4B_info':*
> *(.text+0x584c): warning: Using 'getservbyport' in statically linked
> applications requires at runtime the shared libraries from the glibc version
> used for linking*

Yes, the Linux libc doesn't really support static linking, and in fact
actively subverts it by dynamically loading other libraries from
hardwired paths. I'm sure there's a good reason for it.

Some things can be worked around by setting environment variables etc,
but generally, try to compile on the oldest system you can find (since
backwards compatibility is better supported than forward), and use the
same distribution.  Use strace to see what dynamic libraries your
executable tries to load, and Google to see what can be done about

The best solution would be to use a different libc.

If I haven't seen further, it is by standing in the footprints of giants

More information about the Haskell-Cafe mailing list