Re: Cygwin and nhc98-1.0pre19



About this list Date view Thread view Subject view Author view

Malcolm Wallace (malcolm-nhc@cs.york.ac.uk)
Wed, 14 Jun 2000 11:56:07 +0100


Thanks Mike for your usual patience with nhc98 and Cygwin. > This takes a long time to build! On my 500MHz machine, it takes 114 minutes to build everything with just a C compiler. But doing "make basic" rather than "make all" with just a C compiler, takes only 3 minutes. These are the extremes! There's a wide variation depending on your machine, which compiler you use to build with, and how many pieces you decide to build. > 1. The makefile for the new interpreter hi assumes that hmake can > find nhc98 in the normal executable PATH, but as I had not included > the scripts directory in the path it could not find it. Ok, I have fixed this. > 2. When copying the final executable hi.exe to the lib directory, mv > can't find it because on Windows it's called hi.exe rather than hi. > 3. Similar problem with executable main.exe in compiler98 Fixed now also. These fixes will appear in the next pre-release, but patches are attached to the end of this email for those who need them sooner. > 4. In some bizarre twist of logic make decided that it had to > remake the profiler prelude library (which already existed) but this > time around failed because it couldn't find IsDigit.hi? Maybe I'm > misunderstanding what's happening. It is possible that make decided to re-do the profiling library if you got errors at a later stage. However, after making the profiling library, all the .hi files are wiped out ready for building the tracing library. Hence, if make returns to re-do profiling, they will be reported as missing. This problem should be relatively rare. Unfortunately, the only workaround I know is to remove all the profiling object files and re-make them. rm -r targets/ix86-CYGWIN_NT-4.0/objp/prelude > 5. Hi dies after displaying the neat banner: Oh dear. This looks like a unix/windows incompatibility in some system function (possibly "doesFileExist", or "unsafePerformIO"). It is difficult to investigate further without having Cygwin available here. Does your "hi.exe.core" (which claims to hold a stack trace) look interesting? > Is there any example code for the FFI lying around somewhere? The FFI is specified in a document which is currently part of Sigbjorn Finne's H/Direct manual, but which will soon be moving to a more generic location on haskell.org. The current (temporary) URL is http://www.dcs.gla.ac.uk/fp/software/hdirect/ffi.html There are some small examples in that document, and various larger examples out on the web, such as Manuel Chakravarty's GTK+ binding: http://www.cse.unsw.edu.au/~chak/haskell/gtk/ and Sven Panne's OpenGL binding: http://www.pms.informatik.uni-muenchen.de/mitarbeiter/panne/haskell_libs/HOpenGL.html > What is involved in getting the FFI to do GUI callbacks - I notice > in the todo project list on your web site that it is unable to do that? The FFI specification allows for dynamic import and export of functions, so for instance a Haskell function can be registered as a callback from a standard GUI library like GTK+. However, nhc98 does not currently implement the dynamic part of the specification, just the static imports and exports. Dynamic linking might be added at a later date, but we don't know when. Regards, Malcolm ----cut here for Cygwin patches---- diff -u -r1.28 Makefile --- Makefile 2000/06/09 14:06:13 1.28 +++ Makefile 2000/06/14 10:51:11 @@ -316,7 +316,7 @@ touch $(TARGDIR)/$(MACHINE)/greencard $(TARGDIR)/$(MACHINE)/cgreencard $(TARGDIR)/$(MACHINE)/chmake: $(HMAKEC) cd src/hmake; $(MAKE) fromC - cd src/interpreter; $(MAKE) BUILDWITH=nhc98 install + cd src/interpreter; $(MAKE) fromC touch $(TARGDIR)/$(MACHINE)/chmake script/errnogen.c: script/GenerateErrNo.hs diff -u -r1.5 src/interpreter/Makefile --- src/interpreter/Makefile 2000/06/02 11:04:40 1.5 +++ src/interpreter/Makefile 2000/06/14 10:50:31 @@ -1,6 +1,6 @@ include Makefile.inc -PROG = $(MACHINE)/hi +PROG = $(MACHINE)/hi$(EXE) SRCS = $(MACHINE)/hi.hs $(MACHINE)/HmakeConfig.hs $(MACHINE)/LocalConfig.hs @@ -25,6 +25,13 @@ cp hi.hs $(MACHINE) $(MACHINE)/HmakeConfig.hs: HmakeConfig.hs cp HmakeConfig.hs $(MACHINE) + +fromC: $(SRCS) # actually, make with fresh nhc98, not from C. + cd $(MACHINE); $(LOCAL)nhc98 -c LocalConfig.hs + cd $(MACHINE); $(LOCAL)nhc98 -c -cpp HmakeConfig.hs + cd $(MACHINE); $(LOCAL)nhc98 -c -cpp hi.hs + $(LOCAL)nhc98 -o $(PROG) $(MACHINE)/*.o + mv $(PROG) $(DST) paper.ps: paper.dvi


About this list Date view Thread view Subject view Author view