Niklas Röjemo | 16 Apr 2013 22:36

Old nhc98 repository

Hi

I got a bit nostalgic and decided to try to install nhc98, but I'm 
afraid at least the download instructions and the start script is out of 
date.
Both the documentation and the start script uses --partial, and that 
option does not exist in the darcs I got when I installed one today from 
Ubuntu Software Center (darcs 2.7.99.1). The download seems to work when 
I removed --partial, but now darcs complains.

***********************************************************************
   _______   Sorry for the wait! The repository you are fetching is
  |       |  using the DEPRECATED 'old-fashioned' format. I'm getting a
  | O   O |  hashed copy instead, but this may take a while.
  |  ___  |
  | /   \ |  We recommend that the maintainer upgrade the remote copy
  |_______|  as well. See http://wiki.darcs.net/OF for more information.

***********************************************************************

If darcs 2.4.4 or later is available on the machine with the 
repositories then

darcs optimize --upgrade

is supposed to fix this problem.

   Regards,
   Niklas Röjemo
(Continue reading)

Kristen Eisenberg | 13 Oct 2011 15:37
Picon
Favicon

Fixing "OS allocated a heap in high memory"

Hey guys,

Recent changes to malloc on OpenBSD mean that nhc98 builds now die with
the "OS allocated a heap in high memory" error, as malloc is putting
things above the 0x80000000 line.

Switching the heap allocation to use mmap with a hint to allocate
somewhere lower fixes it at least on x86/openbsd. The ghc testsuite
runs, for example. The mmap code is stolen from MBlock.c in ghc.

Any options on this? Is it reasonable? (I'd like to use it as a custom
patch in the OpenBSD port of nhc98, but want to check I'm not doing
anything hideously wrong :)

Kristen Eisenberg
Billige Flüge
Marketing GmbH
Emanuelstr. 3,
10317 Berlin
Deutschland
Telefon: +49 (33)
5310967
Email:
utebachmeier at
gmail.com
Site:
http://flug.airego.de - Billige Flüge vergleichen
_______________________________________________
Nhc-bugs mailing list
Nhc-bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/nhc-bugs
Yu Di | 9 Jan 2008 19:26
Picon
Favicon

NHC Compilation Failure

Hi, I downloaded the source of nhc98-1.20 and tried to compile it, but when it is linking greencard-nhc98, I got multiple errors like:

.../nhc98-1.20/lib/x86_64-Linux/Prelude.a(RealFloat_Float.o)(.text+0x49): In function `FR_Prelude_46cFIsNeg':
: undefined reference to `signbit'
.../nhc98-1.20/lib/x86_64-Linux/Prelude.a(RealFloat_Float.o)(.text+0xc9): In function `FR_Prelude_46cFIsNormal':
: undefined reference to `isnormal'
.../nhc98-1.20/lib/x86_64-Linux/Prelude.a(RealFloat_Float.o)(.text+0x149): In function `FR_Prelude_46cFIsFinite':
: undefined reference to `isfinite'

Then, when it is linking lib/x86_64-Linux/MkProg, there is another error:

.../nhc98-1.20/lib/x86_64-Linux/Prelude.a(RemoveFile.o)(.data+0xc): undefined reference to `FR_Directory_46unlink_35'

and soon after this the whole make fails because there is no lib/x86_64-Linux/MkConfig.

uname -a shows:

Linux ... 2.6.9-55.ELsmp #1 SMP Fri Apr 20 16:36:54 EDT 2007 x86_64 x86_64 x86_64 GNU/Linux

and targets/x86_64-Linux/config.cache shows:

INSTALLDIR=...
DOCDIR=...
BUILDWITH=gcc
BUILDOPTS=""
BUILDDIR=.../nhc98-1.20/targets
RTSFLAG=yes
CC=gcc
COPTS=""
ENDIAN=-DLOW_BYTE_FIRST
HEAP=100000
LIB=yes
BIN=yes
INC=yes
MAN=yes
DOCS=no
EXE=
CURSES="-ltermcap -lcurses"
READLINE=""
INSTALLVER="v1.20 (2007-11-22)"
INSTALLINFO="config: x86_64-Linux/ by ... on Wed Jan  9 12:00:05 CST 2008"
FW=""

Can anybody help me on how to get this build to work? Thanks!

Di, Yu1.9




Looking for last minute shopping deals? Find them fast with Yahoo! Search.
_______________________________________________
Nhc-bugs mailing list
Nhc-bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/nhc-bugs
Ian Lynagh | 28 Nov 2006 17:50
Picon
Gravatar

cpphs and hugs


Hi,

With cpphs 0.7 "compiled" with hugs I get the following when trying to
haddock missingh:

--------------
missingh-0.16.2$ /usr/bin/cpphs -Obar.hs MissingH/Time/ParseDate.hs --noline --strip
-Dlinux_BUILD_OS -Dlinux_HOST_OS -Di386_BUILD_ARCH -Di386_HOST_ARCH -D__GLASGOW_HASKELL__=606 -D__HADDOCK__

Program error: <handle>: IO.getContents: protocol error (invalid character encoding)
missingh-0.16.2$
--------------

I believe this is because there is a mismatch between my locale and the
encoding of the file, in particular with the \"o in Bjorn Bringert's
name. I think opening the file in binary mode would fix this, but I
couldn't swear to it.

I tried upgrading to 1.2 to see if it is fixed, and trying to haddock
missingh then gave an almighty pattern match failure. A somewhat smaller
failure occurs when trying to process /dev/null:

--------------
$ /tmp/cpphs/inst/bin/cpphs /dev/null

Program error: pattern match failure: macroProcess ((instEq_v4051 `elem` CpphsOption_CpphsLayout)
[]) Bool_True (preDefine ((instEq_v4051 `elem` CpphsOption_CpphsAnsi) []) Bool_True
(runCpphs_v4067 [])) (tokenise_v3906 ((instEq_v4051 `elem` CpphsOption_CpphsAnsi) [])
((instEq_v4051 `elem` CpphsOption_CpphsStrip) []) SubMode_Any)
$
--------------

cpphs compiled with GHC seems fine.

Thanks
Ian
GaMeR uWe | 25 Jul 2006 21:06
Picon
Favicon

nhc98 bug

I found something in the nhc98's configure script that leads me to believe that there is a bug somewhere, I don't see the point in searching for it on my own as it is nothing big, just slightly annoying.

When ./configure is run, the file nhc98-1.18/lib/ix86-linux/config is created, however make cannot be run because of the following message it will output, "*** missing separator.". I then checked what the file generated by ./configure contained and I found the problem. It contained:

"...
GHCSYM=

604
TRUE=/bin/true"

Where ... represents other variables set before GHCSYM (none of those above had a problem). As you can see, there is a gap between GHCSYM= and the value of 604 which seems to belong to GHCSYM. So I changed it to GHCSYM=604 and then everything compiled and installed. nhc98 does execute from the terminal, I havn't tried compiling anything yet but I am sure it will compile things without a problem, I just thought I'd let you know about this problem with that file.

Thanks.

_______________________________________________
Nhc-bugs mailing list
Nhc-bugs <at> haskell.org
http://www.haskell.org/mailman/listinfo/nhc-bugs
Karl Crary | 18 Jul 2006 00:26
Picon
Favicon

Trouble getting nhc98 to work

Dear NHC98 maintainers,

I was experimenting with nhc98 because I was led to believe that using 
it, I might be able to use the Haskell FFI to link with libraries built 
using Cygwin.  Unfortunately, I never got far enough to try that; it's 
failing right out of the box.

First I tried the binary distribution.  The configure and install 
process seemed to go smoothly, but in my first attempt to use the 
compiler I get:

/usr/local/bin/nhc98: line 131: 
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA: No such 
file or directory
/usr/local/bin/nhc98: line 131: 
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA: No such 
file or directory
/usr/local/bin/nhc98: line 131: 
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/hmake-PRAGMA: No such 
file or directory
/usr/local/bin/nhc98: line 547: 
C:/cygwin/usr/local/lib/nhc98/ix86-CYGWIN_NT-5.1/nhc98comp: No such file 
or directory

I then tried to build from source, but with no better luck.  Configure 
seems to go smoothly, but the build breaks down quickly:

bash-3.1$ make
ghc  -cpp -o lib/ix86-CYGWIN_NT-5.1/hmake-PRAGMA script/hmake-PRAGMA.hs
cd src/runtime;        make all nhc98heap.exe
make[1]: Entering directory `/c/nhc98-1.18/src/runtime'
Makefile:27: *** target pattern contains no `%'.  Stop.
make[1]: Leaving directory `/c/nhc98-1.18/src/runtime'
make: *** [targets/ix86-CYGWIN_NT-5.1/runtime] Error 2
bash-3.1$ gmake
bash: gmake: command not found
bash-3.1$ which make
/usr/bin/make
bash-3.1$ make
cd src/runtime;        make all nhc98heap.exe
make[1]: Entering directory `/c/nhc98-1.18/src/runtime'
Makefile:27: *** target pattern contains no `%'.  Stop.
make[1]: Leaving directory `/c/nhc98-1.18/src/runtime'
make: *** [targets/ix86-CYGWIN_NT-5.1/runtime] Error 2

Any idea what I might be doing wrong?

    -- Karl Crary
Shin-Cheng Mu | 22 May 2006 15:39
Picon
Favicon

Bus Error and Segmentation Fault when Heap Profiling is On

Hi,

This is another potential bug. Unfortunately I currently
cannot reproduce it on smaller programs. I tried to do
heap profiling on the following code:

    http://www.psdlab.org/~scm/hx.tar.gz

The main program is hxpc.hs. I tried to compile it with

    hmake -nhc98 -p hxpc

and run it on a small sample input

    scm$ cat > temp.xml
    <a><b><item>123</item></b><c></c></a>
    scm$ ./hxpc temp.xml
    Bus error
    scm$ ./hxpc temp.xml +RTS -p
    Segmentation fault

Increasing the heap size does not seem to help.

If I compile the program without the -p option, it runs fine.

Since Malcolm Wallace has already profiled the program
on his machine, it seems to be a platform specific problem
I installed NHC98 1.18_4 using Darwin Ports, on a PowerPC
G4 based Mac, running OS X 10.4 and GCC 4.0.

sincerely,
Shin-Cheng Mu 
Shin-Cheng Mu | 22 May 2006 15:28
Picon
Favicon

ld: Undefined symbols on OS X when compiling with -t

Hi,

I just installed NHC98 using Darwin Ports on a PowerPC
G4 based Mac, running OS X 10.4 with GCC 4.0. NHC works
fine without profiling options. When I turned on time
profiling, however, NHC98 appears to have problems linking:

   scm$ cat text.hs
   main = print (foldr (+) 0 [1..10000])

   scm$ hmake -nhc98 -t text
   nhc98   -t   -c  -o text.z.o text.hs
   nhc98  -t    -o text text.z.o
   /tmp/tprofusr3456.c: In function 'tprofTMInitTreeUsr':
   /tmp/tprofusr3456.c:21: warning: incompatible implicit declaration  
of built-in function 'strdup'
   /usr/bin/ld: Undefined symbols:
   _FN_NHC_46Internal_46_95apply1
   _FN_NHC_46Internal_46_95apply2
   _TMSUB_NHC_46DErrNo
   _TM_NHC_46DErrNo
   _TMSUB_NHC_46PackedString
   _TM_NHC_46PackedString
   collect2: ld returned 1 exit status

Is it a bug, or is something missing in Darwin Ports?

sincerely,
Shin-Cheng Mu
Hethcoat-III, Charles L | 14 Apr 2006 17:58
Picon
Favicon

What's the correct procedure for upgrading?

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
Doug McIlroy | 27 Mar 2006 23:14
Favicon

Linux install troubles

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

Bulling through anyway, I did an installation. and compiled a hello world program.
The result appears to be related to the configure trouble:

OS allocated a heap in high memory (>0x80000000)
    which breaks this program's run-time system.
  hpStart=0xb7d96008, hpEnd=0xb7e0b308
hanatani | 8 Apr 2006 09:29

EnumFromThen

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

Gmane