[Haskell-cafe] GHC and libc
John Meacham
john at repetae.net
Fri May 21 04:53:23 EDT 2004
On Sat, May 15, 2004 at 07:44:06PM +0200, Per Larsson wrote:
> Thanks Duncan and Sven for your helpful answers.
>
> Per Larsson
>
> P.S Now everything seems to work, except that I get the compiler message:
>
> /usr/local/lib/ghc-6.2/libHSunix.a(User__17.o)(.text+0x160): In function
> 'SystemziPosixziUser_getUserEntryForName_entry':
> : Using 'getpwnam_r' in statically linked applications requires at runtime the
> shared libraries from the glibc version used for linking
>
> This seems to indicate that there are a few functions (probably in the Posix
> package) which can't be can't be statically linked?
Add the options
-static -optl-static -ldl
to your linking step to make it work. the 'nss' functions (looking up
hostnames and users) won't work. but everything else should. I use
static haskell compiled binaries on linux all the time. the '-ldl' is
the tricky one.
John
--
John Meacham - ⑆repetae.net⑆john⑈
More information about the Haskell-Cafe
mailing list