Attempts to install libraries with GHC 6.12.1rc1

Neil Brown nccb2 at
Tue Oct 13 06:17:53 EDT 2009


I downloaded the new GHC release candidate.  It compiled and installed 
first time, which was great.  However, this is not true of all the 
libraries.  I'm posting here in the hope that it helps other users 
trying to get it to work, or library maintainers to see what breaks in 
the new compiler.  I know most people should wait for the Haskell 
platform, but I'm happy to jump through hoops to try the release candidate.

So, after installing GHC, I tried to bootstrap cabal-install with the script, but that told me it required parsec and network.  
(I have since seen a post on this list that cabal-install won't work, 
but anyway....)  Parsec (and mtl, which it needed) installed fine with 
6.12.1-rc1.  The network package said:

    Not in scope: data constructor `System.Posix.Internals.Stream'

  (I also tried the latest version of network from the darcs repository, 
but that said:

  Warning: defaultUserHooks in Setup script is deprecated.
  Configuring network-
  Warning: The 'build-type' is 'Configure' but there is no 'configure' 
  Setup.hs: Missing dependency on a foreign library:
  * Missing header file: HsNet.h

  Even though HsNet.h is in the include directory already... odd.

Anyway, it looked like that Posix module was in the unix library, so I 
thought I'd install that.  That said:

Preprocessing library unix-
gcc: unrecognized option 
gcc: unrecognized option 
gcc: unrecognized option 
gcc: unrecognized option '-R/home/nccb2/lib/ghc-'
gcc: unrecognized option '-R/home/nccb2/lib/ghc-'
#... Above 5 lines repeated a lot of times
#gcc --version is 4.3.3
Building unix-

     error: Signals.h: No such file or directory

I searched for Signals.h on my file system:


So I tried configuring with 
which got further, but that said:

[13 of 21] Compiling System.Posix.IO  ( dist/build/System/Posix/IO.hs, 
dist/build/System/Posix/IO.o )

System/Posix/IO.hsc:217:11: Not in scope: `haFD'

System/Posix/IO.hsc:218:2: Not in scope: `flushWriteBufferOnly'

System/Posix/IO.hsc:219:2: Not in scope: `unlockFile'

    `haFD' is not a (visible) constructor field name

These functions seem to have gone in base-4, so I changed the unix.cabal 
file's base-depends  to base < 4.  That takes away the unlockFile error, 
but the others remain.  Which is odd, because flushWriteBufferOnly is in 
GHC.Handle in base-3, which System/Posix/IO.hsc imports.

So now I'm stuck.  Can anyone say what the fix is that I need to apply 
to the unix package to get it working?



P.S. parallel, stm, HUnit and QuickCheck-2 all installed fine too.

More information about the Glasgow-haskell-users mailing list