
The build fails with ghc-5.02.1 on a freebsd 4.4-stable machine: [..] gmake[2]: Entering directory `/var/tmp/src/nhc98-1.10/src/prelude/LowB' /var/tmp/src/nhc98-1.10/script/nhc98 -cpp -p -c +CTS -part -redefine -CTS -P.. -P../PreludeIO -P../IO -prelude -o /var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/objp/prelude/LowB/PrimOpenSocket.p.o PrimOpenSocket.hs Fail: GcodeFix.hs:165: Non-exhaustive patterns in function nthcon gmake[2]: *** [/var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/objp/prelude/LowB/PrimOpenSocket.p.o] Error 1 gmake[2]: Leaving directory `/var/tmp/src/nhc98-1.10/src/prelude/LowB' gmake[1]: *** [LowB.make] Error 2 gmake[1]: Leaving directory `/var/tmp/src/nhc98-1.10/src/prelude' gmake: *** [targets/ix86-FreeBSD/profprelude] Error 2 Any hints would be appreciated... Marko

The build fails with ghc-5.02.1 on a freebsd 4.4-stable machine:
gmake[2]: Entering directory `/var/tmp/src/nhc98-1.10/src/prelude/LowB' /var/tmp/src/nhc98-1.10/script/nhc98 -cpp -p -c +CTS -part -redefine -CTS -P.. -P../PreludeIO -P../IO -prelude -o /var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/objp/prelude/LowB/PrimOpenSocket.p.o PrimOpenSocket.hs
Fail: GcodeFix.hs:165: Non-exhaustive patterns in function nthcon
Try the following patch. If it doesn't solve the problem, let me know. Regards, Malcolm =================================================================== diff -u -r1.2 -r1.3 src/prelude/LowB/PrimOpenSocket.hs --- src/prelude/LowB/PrimOpenSocket.hs 2001/11/20 16:46:44 1.2 +++ src/prelude/LowB/PrimOpenSocket.hs 2001/12/19 14:54:16 1.3 @@ -1,6 +1,6 @@ module Prelude(cOpenSocket,primOpenSocket,SocketType) where -import IO +import IO hiding (IO(..)) import CString import DIO import DSocket

Malcolm,
From: Malcolm Wallace
The build fails with ghc-5.02.1 on a freebsd 4.4-stable machine: [..] Try the following patch. If it doesn't solve the problem, let me know.
It solves this problem. Thanks, but now the build fails later: [..] /var/tmp/src/nhc98-1.10/script/nhc98 -cpp -c +CTS -part -redefine -CTS -P../LowB/ -P../ix86-FreeBSD -prelude -o /var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/obj/prelude/PreludeIO/Show_IOError.o Show_IOError.hs ==================================== Error when renaming:: Identifier hGetFileName used at 30:23,18:39 is not defined. gmake[2]: *** [/var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/obj/prelude/PreludeIO/Show_IOError.o] Error 1 gmake[2]: Leaving directory `/var/tmp/src/nhc98-1.10/src/prelude/PreludeIO' gmake[1]: *** [PreludeIO.make] Error 2 gmake[1]: Leaving directory `/var/tmp/src/nhc98-1.10/src/prelude' gmake: *** [targets/ix86-FreeBSD/prelude] Error 2 Marko

It solves this problem. Thanks, but now the build fails later:
[..] /var/tmp/src/nhc98-1.10/script/nhc98 -cpp -c +CTS -part -redefine -CTS -P../LowB/ -P../ix86-FreeBSD -prelude -o /var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/obj/prelude/PreludeIO/Show_IOError.o Show_IOError.hs
==================================== Error when renaming:: Identifier hGetFileName used at 30:23,18:39 is not defined. gmake[2]: *** [/var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/obj/prelude/PreludeIO/Show_IOError.o] Error 1
I guess you have already applied 'patch-1.10-IO'. It turns out that there is a bug in this patch. I will replace the patch with a correct one on the FTP site, but for you, the easiest fix is to apply the following secondary patch. Regards, Malcolm =================================================================== diff -u -r1.8 -r1.11 include/IO.hi --- include/IO.hi 2001/12/17 11:37:29 1.8 +++ include/IO.hi 2001/12/18 18:49:34 1.11 @@ -253,6 +253,9 @@ {-# NEED hGetLine #-} hGetLine{-# 1 #-}::(Handle -> (Prelude.IO Prelude.String)); +{-# NEED hGetFileName #-} +hGetFileName{-# 1 #-}::(Handle -> (Prelude.Maybe Prelude.String)); + {-# NEED ioeGetFileName #-} ioeGetFileName{-# 1 #-}::(Prelude.IOError -> (Prelude.Maybe Prelude.FilePath)); @@ -300,5 +303,5 @@ isEOF{-# 0 #-}::(Prelude.IO Prelude.Bool); interface ! Prelude {-# NEED IO #-} -data IO a; +newtype {-# #-} IO a; } =================================================================== diff -u -r1.5 -r1.7 include/IO.T.hi --- include/IO.T.hi 2001/12/17 11:37:29 1.5 +++ include/IO.T.hi 2001/12/18 18:49:34 1.7 @@ -238,6 +238,9 @@ {-# NEED hGetLine #-} hGetLine{-# 2 #-}::(Prelude.SR -> (Prelude.Trace -> (Prelude.R (Prelude.Trace -> ((Prelude.R Handle) -> (Prelude.R (Prelude.IO Prelude.String))))))); +{-# NEED hGetFileName #-} +hGetFileName{-# 2 #-}::(Prelude.SR -> (Prelude.Trace -> (Prelude.R (Prelude.Trace -> ((Prelude.R Handle) -> (Prelude.R (Prelude.Maybe Prelude.String))))))); + {-# NEED ioeGetFileName #-} ioeGetFileName{-# 2 #-}::(Prelude.SR -> (Prelude.Trace -> (Prelude.R (Prelude.Trace -> ((Prelude.R Prelude.IOError) -> (Prelude.R (Prelude.Maybe Prelude.FilePath)))))));

Malcolm, another successful step, now it builds this far: [..] nhc98 +RTS -K10M -RTS +CTS -H20M -CTS -c -d /var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/obj/hat HatTrace.gc Warning unrecognized run-time flag -K10M ignored. ==================================== Error when renaming:: Type constructor ForeignObj defined 2 times. gmake[1]: *** [/var/tmp/src/nhc98-1.10/lib/ix86-FreeBSD/hat-observe] Error 1 gmake[1]: Leaving directory `/var/tmp/src/nhc98-1.10/src/tracer/hat' gmake: *** [lib/ix86-FreeBSD/hat-stack] Error 2 Marko

Marko,
another successful step, now it builds this far:
[..] nhc98 +RTS -K10M -RTS +CTS -H20M -CTS -c -d /var/tmp/src/nhc98-1.10/targets/ix86-FreeBSD/obj/hat HatTrace.gc Warning unrecognized run-time flag -K10M ignored.
==================================== Error when renaming:: Type constructor ForeignObj defined 2 times. gmake[1]: *** [/var/tmp/src/nhc98-1.10/lib/ix86-FreeBSD/hat-observe] Error 1 gmake[1]: Leaving directory `/var/tmp/src/nhc98-1.10/src/tracer/hat' gmake: *** [lib/ix86-FreeBSD/hat-stack] Error 2
I think you probably already have an older version of nhc98 installed, and this part of the build is using the old version. If you `make install' the 1.10 version, then `make' again, I believe it should complete the build correctly. Then you can `make install' a second time. Regards, Malcolm

Malcolm,
From: Malcolm Wallace
I think you probably already have an older version of nhc98 installed, and this part of the build is using the old version. If you `make install' the 1.10 version, then `make' again, I believe it should complete the build correctly. Then you can `make install' a second time.
Exactly, now it built successfully. Thanks for your support! Marko
participants (2)
-
Malcolm Wallace
-
Marko Schuetz