[nhc-bugs] nhc -T problem
Malcolm Wallace
Malcolm.Wallace@cs.york.ac.uk
Wed, 23 May 2001 14:43:20 +0100
[ Moved from nhc-users to nhc-bugs ]
Wojciech Moczydlowski, Jr writes:
> I've just installed nhc 1.04, and tried to execute: hmake 1 -T
> in a directory containing file 1.hs:
> and I've got the following error message:
>
> [khaliff@90-mia-3 khaliff]$ hmake 1 -T
> nhc98 -T -c -o 1.T.o 1.hs
> nhc98 -T -o 1 1.T.o
> 1.T.o(.data+0x1a8): undefined reference to N_Prelude_46mkNTId'
> 1.T.o(.data+0x1b0): undefined reference to N_Prelude_46mkSR'
> 1.T.o(.data+0x1b8): undefined reference to N_Prelude_46mkTNm'
> 1.T.o(.data+0x1bc): undefined reference to F_Prelude_46mkTRoot'
> 1.T.o(.data+0x1e8): undefined reference to N_Prelude_46lazySat'
> 1.T.o(.data+0x310): undefined reference to N_Prelude_46mkNTId'
> 1.T.o(.data+0x318): undefined reference to N_Prelude_46mkSR'
> 1.T.o(.data+0x320): undefined reference to N_Prelude_46mkTNm'
> 1.T.o(.data+0x324): undefined reference to F_Prelude_46mkTRoot'
> 1.T.o(.data+0x364): undefined reference to N_Prelude_46lazySat'
We have not been able to reproduce this problem.
Can you identify which processor/OS you are using?
The missing symbol names look suspicious;
. they should not have a quote ' character at the end
. the N_ prefix should be FN_
. the F_ prefix should be CF_
It is possible that the problem is due to using a strange linker -
can you tell whether it is Gnu ld (via gcc) or some other linker?
One experiment that might fix the problem is to edit the script/nhc98.inst
shell script. Line 530 is:
LDLIBS=$MAINROUTINE" "$NHC98LIBDIR/$MACHINE/mutlib$CFG.o" "$NHC98LIBDIR/$MACHINE/mutator$CFG.o" "$NHC98LIBDIR/$MACHINE/Prelude$CFG.a" "$NHC98LIBDIR/$MACHINE/Runtime$CFG.a" "$NHC98LIBDIR/$MACHINE/Prelude$CFG.a" "$NHC98LIBDIR/$MACHINE/libdebug$CFG.a" "$NHC98LIBDIR/$MACHINE/Runtime$CFG.a" "$NHC98LIBDIR/$MACHINE/Prelude$CFG.a" "$NHC98LIBDIR/$MACHINE/Runtime$CFG.a
Try adding another
" "$NHC98LIBDIR/$MACHINE/Prelude$CFG.a
to the end of this line, and maybe another
" "$NHC98LIBDIR/$MACHINE/Runtime$CFG.a
also. Afterwards, you must run ./configure again to re-generate the
actual runnable script/nhc98.
Regards,
Malcolm