From hanatani at mbg.nifty.com Sat Apr 8 03:29:09 2006 From: hanatani at mbg.nifty.com (hanatani@mbg.nifty.com) Date: Sat Apr 8 03:24:33 2006 Subject: [nhc-bugs] EnumFromThen Message-ID: <3155427.49401144481349547.hanatani@mbg.nifty.com> Hello, I found a bug in nhc98-1.18. $ diff src/prelude/Prelude/Enum_Integer.hs src/prelude/Prelude/Enum_Integer.hs ~ 14c14 < enumFromThen x y = x : enumFromThen y (2*y-x) --- > enumFromThen x y = x : enumFromThen y (2*y+x) -- Yoichi Hanatani From Malcolm.Wallace at cs.york.ac.uk Mon Apr 10 06:23:22 2006 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Mon Apr 10 06:26:48 2006 Subject: [nhc-bugs] EnumFromThen In-Reply-To: <3155427.49401144481349547.hanatani@mbg.nifty.com> References: <3155427.49401144481349547.hanatani@mbg.nifty.com> Message-ID: <20060410112322.467b0117.Malcolm.Wallace@cs.york.ac.uk> hanatani@mbg.nifty.com wrote: > I found a bug in nhc98-1.18. Yes indeed! I wonder how that one escaped attention for so long... > $ diff src/prelude/Prelude/Enum_Integer.hs src/prelude/Prelude/Enum_Integer.hs > 14c14 > < enumFromThen x y = x : enumFromThen y (2*y-x) > --- > > enumFromThen x y = x : enumFromThen y (2*y+x) Your patch format is the wrong way round, but I get the idea. Thanks! Regards, Malcolm From Malcolm.Wallace at cs.york.ac.uk Wed Apr 12 07:18:35 2006 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Wed Apr 12 07:17:45 2006 Subject: [nhc-bugs] Linux install troubles In-Reply-To: <200603272114.k2RLEgSU007675@tecumseh.cs.dartmouth.edu> References: <200603272114.k2RLEgSU007675@tecumseh.cs.dartmouth.edu> Message-ID: <20060412121835.3dcbecf3.Malcolm.Wallace@cs.york.ac.uk> [ original message delayed through spam filtering ] Doug McIlroy wrote: > On Fedora Linux, I fetched nhc98-1.18.tar.gz (Linux executable). > > Got some relatively innocuous diagnostics from configure and make > install, but one stood out: > > ./configure: line 594: src/runtime/nhc98heap.c: No such file or > directory In the binary tarball, the directory src/runtime does not exist, so writing a file into it fails. However, line 594 of the configure script is protected by a test on the existence of directory src/, so I'm a little unsure why it even got there. > Bulling through anyway, I did an installation. and compiled a hello > world program. The result appears to be related to the configure > trouble: It is not related, no. > OS allocated a heap in high memory (>0x80000000) > which breaks this program's run-time system. > hpStart=0xb7d96008, hpEnd=0xb7e0b308 This is a known bug, triggered by more recent versions of Linux. I attach a source patch which is claimed to work around the problem (tested on a Fedora system). It isn't a full fix, but should avoid high-memory allocation in many circumstances. Regards, Malcolm -------------- next part -------------- Index: src/runtime/Kernel/collector.c =================================================================== RCS file: /home/cvs/root/nhc98/src/runtime/Kernel/collector.c,v retrieving revision 1.24 retrieving revision 1.26 diff -u -r1.24 -r1.26 --- src/runtime/Kernel/collector.c 7 Mar 2005 16:53:38 -0000 1.24 +++ src/runtime/Kernel/collector.c 28 Mar 2006 09:21:11 -0000 1.26 @@ -9,6 +9,7 @@ /*#define HEAPSIZE 100000 -- defined in top-level Makefile at config-time */ #define GCSTACKSIZE 20000 +#define SBRK 1 /* Use sbrk(2) instead of malloc(3) to allocate the heap */ WHEN_DYNAMIC(int ractive = 0;) @@ -46,7 +47,13 @@ Int totalSize = hpSize+spSize; Int tableSize = (totalSize+WORDSIZE)/(WORDSIZE+1)+1; /* Last one for end of marked */ - if(NULL == (hpStart = malloc ((int)totalSize * sizeof(Node)))) { + if ( +#if SBRK + ((NodePtr)-1)== (hpStart = (NodePtr)sbrk((int)totalSize * sizeof(Node))) +#else + NULL == (hpStart = malloc ((int)totalSize * sizeof(Node))) +#endif + ) { fprintf(stderr,"Not enough memory for heap and stack.\n"); exit(-1); } From charles.l.hethcoat-iii at boeing.com Fri Apr 14 11:58:34 2006 From: charles.l.hethcoat-iii at boeing.com (Hethcoat-III, Charles L) Date: Mon Apr 17 12:33:59 2006 Subject: [nhc-bugs] What's the correct procedure for upgrading? Message-ID: <5BFC7E55C08B014E963E1A9AE957381B01C39844@XCH-SE-2V2.se.nos.boeing.com> I hope nhc-bugs is the correct venue for this question. I installed NHC 1.16 on Cygwin (Windows XP), had some problems with it, and then realized I had grabbed an old package. I'm going to upgrade to 1.18 and try again. However, I'm a little bit concerned about the right way to do it. I haven't found any instructions for upgrading properly. Do I just install 1.18 and forget about 1.16? Or should I delete all of the 1.16 files first? I didn't see a Makefile target "uninstall", although there are some "*clean*" options there. Perhaps you could add this topic to your website? Thanks. Charles Hethcoat From Malcolm.Wallace at cs.york.ac.uk Tue Apr 18 08:10:34 2006 From: Malcolm.Wallace at cs.york.ac.uk (Malcolm Wallace) Date: Tue Apr 18 08:07:35 2006 Subject: [nhc-bugs] What's the correct procedure for upgrading? In-Reply-To: <5BFC7E55C08B014E963E1A9AE957381B01C39844@XCH-SE-2V2.se.nos.boeing.com> References: <5BFC7E55C08B014E963E1A9AE957381B01C39844@XCH-SE-2V2.se.nos.boeing.com> Message-ID: <20060418131034.282f11af.Malcolm.Wallace@cs.york.ac.uk> Charles, > Do I just install 1.18 and forget about 1.16? Or should I delete all > of the 1.16 files first? You can do either. There should be no conflicts either way. All of the 1.16 files should be overwritten by the 1.18 versions in any case. > I didn't see a Makefile target "uninstall", > although there are some "*clean*" options there. The 'clean' options just tidy up the build tree, but alternatively, it is safe simply to delete the whole build tree after installing. You are right that there is no 'uninstall' option, and perhaps there should be. If you want to delete an older version of nhc98, here are the places that installed files live: prefix=/usr/local (usually) $prefix/bin/ $prefix/lib/nhc98 $prefix/lib/hmake $prefix/include/nhc98 $prefix/man/man1 $prefix/doc/nhc98 > Perhaps you could add this topic to your website? A good idea. Regards, Malcolm