[Hat] Building hat

Daniel Burrows dburrows at debian.org
Sun Mar 5 13:35:12 EST 2006


  Hi,

  I'm trying to update the Debian packaging of hat so that hat is functional
in Debian again (the currently Debian package doesn't work with any Haskell
implementation available in Debian).  I've run into several bugs (?) that I
was able to work around, but I've now hit one that has me stumped.

  The first problem that I had is that the script to detect the current
ghc version is wrong.  It searches for the regular expression "^[0-9]*".
Problem is, the ghc invocation it uses generates the following file:

----- cut here -----


604
----- cut here -----

  As a result, hat's idea of the ghc version is "\n\n604", which wreaks all
kinds of havoc as I'm sure you can imagine.  The solution is to use the
regular expression "^[0-9]\+" or the equivalent form "^[0-9][0-9]*".

  Next, I ran into some files that are in a different directory from what
the build scripts want and break the build as a consequence.  For instance,

make[2]: *** No rule to make target `Foreign/ForeignPtr.hs', needed by `/home/daniel/debian-pkgs/NMU/hat/hat-2.04/debian/build-tools/targets/ix86-Linux/obj/hatlib/ghc6/Hat/Foreign/ForeignPtr.o'.  Stop.

  ForeignPtr is in Hat/Foreign/, not Foreign/.  I dealt with this by
copying the file into the correct directory, and I did the same with
PreludeBasic.hx (which is in the root of the hatlib source directory
but is expected to be in Hat/).

  However, I now get this error message:

/home/daniel/debian-pkgs/NMU/hat/hat-2.04/debian/build-tools/script/hat-trans -P. -I. -trusted -prelude -D__GLASGOW_HASKELL__=604 Foreign/ForeignPtr.hs
hat-trans: ./Hat/Hack.hx: openFile: does not exist (No such file or directory)

  Hack.hx exists nowhere in the source tree.

  I don't really know what a .hx file is, but they appear to be some sort
of specially processed form of the .hs modules.  It looks like you forgot
to include some files in the source distribution; would it be possible for
you to email them to me?

    Thanks,
  Daniel
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://www.haskell.org//pipermail/hat/attachments/20060305/e89a37cf/attachment.bin


More information about the Hat mailing list