Re: static linking with ghc

2005-03-27 Thread Tomasz Zielonka
On Sat, Mar 26, 2005 at 03:11:43PM +0100, Patrick Scheibe wrote:
 Is it possible to tell ghc to take all stuff out of the .so libs and compile 
 my source to a all-including executable?
 I know that ghc just calls the linker which is doing this part. The --static 
 flag for the linker just says: take the static library if possible for 
 linking
 But I don't have a static version of these libs and I don't want to recompile 
 all libraries.

I often build my applications with ghc -optl-static, which works for
me most of the time, but:
- You need to have static (.a) versions of libraries, which you
  don't have
- At least on linux the NSS (name service switch) libraries are linked
  in dynamically even in statically linked programs. If you have
  incompatible nss libraries, your programs may crash. The workaround is
  to compile glibc with --enable-static-nss
- There are some licensing issues with GMP

Best regards
Tomasz
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users


static linking with ghc

2005-03-26 Thread Patrick Scheibe
Hi,

I have a programm which is linked against some shared object libraries. Now I 
want to run my prog on a different machine (but same type, x86 linux). So I 
took the compiled prog and the needed .so files, put both in one directory 
and tried it on the other machine. That worked fine.

Is it possible to tell ghc to take all stuff out of the .so libs and compile 
my source to a all-including executable?
I know that ghc just calls the linker which is doing this part. The --static 
flag for the linker just says: take the static library if possible for 
linking
But I don't have a static version of these libs and I don't want to recompile 
all libraries.

Am I totally wrong?
Is this possible in general?
Are there some good papers except of the man ld??

Cheers
Patrick
___
Glasgow-haskell-users mailing list
Glasgow-haskell-users@haskell.org
http://www.haskell.org/mailman/listinfo/glasgow-haskell-users