Attempts to install libraries with GHC 6.12.1rc1
Neil Brown
nccb2 at kent.ac.uk
Tue Oct 13 06:17:53 EDT 2009
Hi,
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
bootstrap.sh 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:
Network/Socket.hsc:1707:45:
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-2.2.1.4...
Warning: The 'build-type' is 'Configure' but there is no 'configure'
script.
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-2.3.2.0...
gcc: unrecognized option
'-R/home/nccb2/lib/ghc-6.12.0.20091010/base-4.2.0.0'
gcc: unrecognized option
'-R/home/nccb2/lib/ghc-6.12.0.20091010/integer-gmp-0.2.0.0'
gcc: unrecognized option
'-R/home/nccb2/lib/ghc-6.12.0.20091010/ghc-prim-0.2.0.0'
gcc: unrecognized option '-R/home/nccb2/lib/ghc-6.12.0.20091010'
gcc: unrecognized option '-R/home/nccb2/lib/ghc-6.12.0.20091010'
#... Above 5 lines repeated a lot of times
#gcc --version is 4.3.3
Building unix-2.3.2.0...
dist/build/System/Posix/Signals.hs:127:0:
error: Signals.h: No such file or directory
I searched for Signals.h on my file system:
/home/nccb2/ghc-6.10.4/includes/Signals.h
/home/nccb2/lib/ghc-6.10.4/include/Signals.h
/home/nccb2/lib/ghc-6.12.0.20091010/include/rts/Signals.h
/home/nccb2/ghc-6.12.0.20091010/includes/rts/Signals.h
/home/nccb2/ghc-6.12.0.20091010/rts/posix/Signals.h
So I tried configuring with
--extra-include-dirs=/home/nccb2/lib/ghc-6.12.0.20091010/include/rts
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'
System/Posix/IO.hsc:223:13:
`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?
Thanks,
Neil.
P.S. parallel, stm, HUnit and QuickCheck-2 all installed fine too.
More information about the Glasgow-haskell-users
mailing list