[nhc-bugs] -t doesn't link

Ian Lynagh igloo at earth.li
Mon Nov 1 15:26:12 EST 2004


Hi,

Even trivial programs don't link for me if I use the -t flag:

$ echo 'main = putStrLn "Foo"' > q.hs
$ nhc98 q.hs -o q -t
/usr/lib/nhc98/ix86-Linux/PreludeAll.z.a(Monad_IO.z.o)(.data+0x228): undefined reference to `FN_NHC_46Internal_46_95apply1'
/usr/lib/nhc98/ix86-Linux/PreludeAll.z.a(PutStrLn.z.o)(.data+0x3c): undefined reference to `FN_NHC_46Internal_46_95apply1'
/usr/lib/nhc98/ix86-Linux/PreludeAll.z.a(Show_IOError.z.o)(.data+0x1e8): undefined reference to `FN_NHC_46Internal_46_95apply1'
[...]
/usr/lib/nhc98/ix86-Linux/PreludeAll.z.a(COrd.z.o)(.data+0x1c0): undefined reference to `FN_NHC_46Internal_46_95apply2'
/usr/lib/nhc98/ix86-Linux/PreludeAll.z.a(ShowParen.z.o)(.data+0x50): undefined reference to `FN_NHC_46Internal_46_95apply1'
collect2: ld returned 1 exit status
$ 

This happens with both the 1.16-11 deb and CVS checked out earlier today.
Both used ghc to compile nhc.

Additionally, just an aesthetic issue, with dash as sh I also get:
sh: Illegal option --

$ sh --version
sh: Illegal option --

"if sh --version | grep -i gnu >/dev/null" in tprofprel should probably be
"if sh --version 2> /dev/null | grep -i gnu >/dev/null" or somesuch.


Thanks
Ian



More information about the Nhc-bugs mailing list