Re: Deadlock again (was Re: GHC 4.04.19990916 produces coredumping executable)

2000-01-13 Thread Michael Weber

On Sun, Jan 09, 2000 at 00:32:56 +, Ian Jackson wrote:
> Michael Weber writes ("Re: Deadlock again (was Re: GHC 4.04.19990916 produces 
>coredumpin g executable)"):
> > New versions for Debian usually can be found on my site (see signature) at
> > first, the latest is ghc4_4.05.19991206-1.deb.
> 
> Thanks, but the version Simon referred me to was from 1999-12-25.  I
> tried to build it myself from the anonymous CVS but had some problems
> integrating the Debian patches - see below.
> 
> Michael: obviously it would be best for me to use the Debian sources,
> but is it _necessary_ ?  Ie, are there any changes you've made to
> problems which prevented the compiler from working ? 

Sometimes, there are small glitches in the build process, which I correct,
furthermore some Debian specific things, but usually I report them back to
upstream. For instance, I already sent (most of) the patches in the
`debian/patches/' dir of my latest version to the mailing-list and SimonM
incorporated them (or at least had a look at them, and corrected the
problem somehow else).

BTW: because of the slw CVS the source tarballs are meant as snapshots,
too. And (as a QA means), I was able to build a compiler out of these
sources, that can build itself again.

> When were directory layout changes made to the source tree - ie, Michael,
> does the 4.05 version that you provide have the relevant changes so it will
> work reasonably with the pre-4.06 ?

yes, 19991206 already has the new library scheme.

> I get the feeling I'm thrashing around rather here.  I'm currently
> downloading the 19991206.orig.tar.gz from your site at rwth-aachen, and
> will try that (and also try it after `cvs update' to the version Simon
> suggests).  But, if it doesn't have the new directory structure then it's
> probably not much use to me.

It's definitely the better version (wrt. to building), since I
revamped the build process entirely. It's cleaner and easier now.

> Now, I could try to fix the problem properly and send you (Michael)
> the diffs, but I think it would take me some time to get used to the
> somewhat arcane build system in the Debian GHC package.  If you could
> do it I'd appreciate it.

I'll have a look at it this week...

> Simon Marlow writes ("RE: Deadlock again (was Re: GHC 4.04.19990916 produces 
>coredumping executable)"):
>> As for finding the location of a black-hole or infinite loop, there are two
>> techniques available.  The first is to fire up your program in gdb, stop it
>> at the black hole, have a look at the stack and try to map what you find
>> there back on to the Haskell source (not an easy task :-). 

yes, I can emphasize this, after having spent some hours in gdb... :-)

> Michael, here is what I did to get a non-working GHC 1999-12-25 .deb:
> First, I obtained ghc-4.04.19990916.orig.tar.gz and -3.{dsc,diff.gz}

...which was bad luck, since the new library scheme was introduced in
October/November, IIRC...

> Attempts to build it with `debian/rules build' and `fakeroot debian/rules
> binary' were not very successful.  Firstly, there were a number of patches
> in debian/patches which were rejected.  Is there some reason those weren't
> in the .diff.gz ?

In earlier Debian packages, I had the old scheme (patches in .diff.gz), but
I found the current patch strategy saving me some time. To me, it's more
convenient, since I can switch forth and back to the patched/unpatched
version of the sources, I just have to 
  $ debian/rules patch
[see, what's been rejected]
  $ debian/rules unpatch
[copy a better patch in debian/patches/]
  $ debian/rules patch
[repeat]

Also, I can disable patches temporarily by just renaming them...,
furthermore, I'm easily able to distinguish between debian-specific patches
and GHC-specific ones, which can be sent to upstream...

As you might have seen now: many many reasons for switching... ;-)

> I had to run autoconf by hand in each directory with a configure.in (with
> find -name configure.in | xargs -n1 sh -c ), and then
> was about to run debian/rules build to produce a build-stamp (this took
> perhaps 4 hours).

Nope, for me it always has been sufficient to 
   $ autoconf ; configure
in the root of the build tree (besides, there is a `debian/rules configure')

> It then failed because of the lack of an `fptools' directory.  It looks
... `hslibs' ... ?
> like things have been reorganised substantially since the
> 4.04.19990916.orig.gz package. [...]

yes, this all should be solved with 19991206 already, see above.

Ok, as promised, I'll have a look at the X-Mas version of GHC.


Cheers,
Michael
-- 
Those who open their minds too far often let their brains fall out.
Those who open their minds too far often let their brains fall out.
Those who open their minds too far often let their braGeneral Protection Fault
in msborg32.dll.



Re: Deadlock again (was Re: GHC 4.04.19990916 produces coredumpin g executable)

2000-01-13 Thread Michael Weber

On Sun, Jan 09, 2000 at 15:24:03 +, Ian Jackson wrote:

> * `foreign' seems to have become a keyword !  My program uses it as a
> variable/function name and I had to rename it to avoid a parse error.
> I couldn't find anything about it in my documentation.

IIRC, it is only, iff option `-fglasgow-exts' is given, which allows
something like:

\begin{code}
foreign import "foo" bar :: IO ()
\end{code}


Cheers,
Michael
-- 
Those who open their minds too far often let their brains fall out.
Those who open their minds too far often let their brains fall out.
Those who open their minds too far often let their braGeneral Protection Fault
in msborg32.dll.



Re: strange evaluation problem

2000-01-13 Thread Michael Weber

On Fri, Jan 07, 2000 at 09:44:09 +0100, Michael Weber wrote:
> Unfortunately, this neithers explains Sven's problem nor mine, since
> unpackCStringIO needn't be present to show the error.

It seems, today's GHC made the problem disappear (or, at least, it
disappeared between 1999/12/06 and 2000/01/09), my test case now works as
expected...

Sven, what about yours?

Did the change happen casually or did somebody put some work in it (if so,
thanks! :-) )?


Cheers,
Michael
-- 
If builders built buildings the way programmers wrote programs, then the
first woodpecker that came along would destroy civilization.
-- Gerald Weinberg



some patches to CVS ghc from 2000/01/09

2000-01-13 Thread Michael Weber

Hi! 

I had to apply some patches to make today's GHC build, they're attached.

The patch to ghc/mk/paths.mk is necessary, because the ordering of variables
is important when using "simply expanded variables", i.e. the `:=' ones (I'm
using make-3.78.1).


BTW: Might I still suggest to change this CString.lhs:unpackCStringIO case:
\begin{code}
unpackCStringIO :: Addr -> IO String
unpackCStringIO addr
 | addr == nullAddr = return ""
\end{code}

to:

\begin{code}
unpackCStringIO :: Addr -> IO String
unpackCStringIO addr
 | addr == nullAddr = return "(null)"
\end{code}


Cheers,
Michael
-- 
Compaq Safety & Comfort Guide:
"Stand up and take a few minutes to stretch and exercise several times a
 day."


--- ghc4-4.06.2109/hslibs/lang/CString.lhs.orig Sun Jan  9 16:45:19 2000
+++ ghc4-4.06.2109/hslibs/lang/CString.lhs  Sun Jan  9 16:45:11 2000
@@ -75,7 +75,7 @@
ch <- readCharOffAddr addr (I# nh)
if ch == '\0'
 then return []
-  else do
+else do
  ls <- unpack (nh +# 1#)
  return (ch : ls)
 


--- /tmp/fooSun Jan  9 15:22:36 2000
+++ ghc4-4.06.2109/ghc/mk/paths.mk  Sun Jan  9 15:45:22 2000
@@ -25,21 +25,22 @@
 GHC_UTILS_DIR  := $(TOP)/utils
 GHC_INTERPRETER_DIR:= $(TOP)/interpreter
 
-GHC_INPLACE:= $(GHC_DRIVER_DIR)/ghc-inplace
 GHC_HSCPP_DIR  := $(GHC_UTILS_DIR)/hscpp
-GHC_HSCPP  := $(GHC_HSCPP_DIR)/hscpp
+GHC_HSP_DIR:= $(GHC_HSC_DIR)
+GHC_HSC_DIR:= $(GHC_COMPILER_DIR)
 GHC_MKDEPENDHS_DIR := $(GHC_UTILS_DIR)/mkdependHS
+GHC_SYSMAN_DIR := $(GHC_RUNTIME_DIR)/gum
+GHC_UNLIT_DIR  := $(GHC_UTILS_DIR)/unlit
+
+GHC_INPLACE:= $(GHC_DRIVER_DIR)/ghc-inplace
+GHC_HSCPP  := $(GHC_HSCPP_DIR)/hscpp
 GHC_MKDEPENDHS := $(GHC_MKDEPENDHS_DIR)/mkdependHS-inplace
 GHC_HSP:= $(GHC_HSP_DIR)/hsp
-GHC_HSP_DIR:= $(GHC_HSC_DIR)
 GHC_HSC:= $(GHC_HSC_DIR)/hsc
-GHC_HSC_DIR:= $(GHC_COMPILER_DIR)
 GHC_SYSMAN := $(GHC_RUNTIME_DIR)/gum/SysMan
-GHC_SYSMAN_DIR := $(GHC_RUNTIME_DIR)/gum
 
 UNLIT  := $(GHC_UNLIT_DIR)/unlit
 GHC_UNLIT  := $(GHC_UNLIT_DIR)/unlit
-GHC_UNLIT_DIR  := $(GHC_UTILS_DIR)/unlit
 
 #-
 # Stuff for the C-compiling phase in particular...



RegexString warning

2000-01-13 Thread Keith Wansbrough

Building latest CVS (with ghc-4.02 on Linux):


../../ghc/driver/ghc-inplace -lbfd -liberty -recomp -cpp -fglasgow-exts 
-fvia-C -Rghc-timing  -ihtml -static -DDEBUG -fno-prune-tydecls -O 
-fno-specialise  -syslib lang-c RegexString.lhs -o RegexString.o 
-osuf o

RegexString.lhs:12:
Warning: The export item `Regex(..)'
 suggests that `Regex' has constructor or class methods
 but it has none; it is a type synonym or abstract type or 
class
<>


--KW 8-)
-- 
: Keith Wansbrough, MSc, BSc(Hons) (Auckland) ---:
: PhD Student, Computer Laboratory, University of Cambridge, UK. :
: Native of Antipodean Auckland, New Zealand: 174d47'E, 36d55'S. :
: http://www.cl.cam.ac.uk/users/kw217/ mailto:[EMAIL PROTECTED] :
::