Attempts to install libraries with GHC 6.12.1rc1

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.

On 13/10/2009 11:17, Neil Brown wrote:
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. )
network is one of those packages that has a configure script, but the configure script is generated by autoconf from configure.ac, so it is not stored in the darcs repository. When you get the network package from darcs, you need to $ autoreconf $ runhaskell Setup configure etc.
Anyway, it looked like that Posix module was in the unix library, so I thought I'd install that. That said:
unix is supplied with GHC 6.12, you shouldn't need to install it yourself.
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...
Fascinating ... I also get these complaints about -R. I'll look into it.
dist/build/System/Posix/Signals.hs:127:0: error: Signals.h: No such file or directory
Again I suspect this is because you need to run 'autoreconf' before configuring. Cheers, Simon

Simon Marlow wrote:
network is one of those packages that has a configure script, but the configure script is generated by autoconf from configure.ac, so it is not stored in the darcs repository. When you get the network package from darcs, you need to
$ autoreconf $ runhaskell Setup configure etc.
Great -- thanks. I can confirm that with the latest darcs version of the network library, doing that step allowed the library to build and install successfully (though still with the GCC spam I mentioned). (The latest hackage version of network still did not install properly even if I used autoreconf.) My next failing package install attempt was uvector, which fails with messages like those I got with the unix package: Data/Array/Vector/Prim/BUArr.hs:851:26: `haFD' is not a (visible) field of constructor `Handle__' Data/Array/Vector/Prim/BUArr.hs:851:35: `haBuffer' is not a (visible) field of constructor `Handle__' Data/Array/Vector/Prim/BUArr.hs:851:49: `haIsStream' is not a (visible) field of constructor `Handle__' Data/Array/Vector/Prim/BUArr.hs:852:10: Not in scope: data constructor `Buffer' Data/Array/Vector/Prim/BUArr.hs:852:19: `bufBuf' is not a (visible) field of constructor `Buffer' Data/Array/Vector/Prim/BUArr.hs:852:33: `bufWPtr' is not a (visible) field of constructor `Buffer' The latest darcs version of uvector is no different. Will these problems need to be fixed in the code on a per-package basis, or is there a cabal fix that can overcome them? Thanks, Neil.

On 13/10/2009 12:04, Neil Brown wrote:
My next failing package install attempt was uvector, which fails with messages like those I got with the unix package:
Data/Array/Vector/Prim/BUArr.hs:851:26: `haFD' is not a (visible) field of constructor `Handle__'
Data/Array/Vector/Prim/BUArr.hs:851:35: `haBuffer' is not a (visible) field of constructor `Handle__'
Data/Array/Vector/Prim/BUArr.hs:851:49: `haIsStream' is not a (visible) field of constructor `Handle__'
Data/Array/Vector/Prim/BUArr.hs:852:10: Not in scope: data constructor `Buffer'
Data/Array/Vector/Prim/BUArr.hs:852:19: `bufBuf' is not a (visible) field of constructor `Buffer'
Data/Array/Vector/Prim/BUArr.hs:852:33: `bufWPtr' is not a (visible) field of constructor `Buffer'
The latest darcs version of uvector is no different. Will these problems need to be fixed in the code on a per-package basis, or is there a cabal fix that can overcome them?
This is something that needs to be fixed in the uvector package - it is using internals from the IO library which changed in base-4.2. Cheers, Simon
participants (2)
-
Neil Brown
-
Simon Marlow