more on my ghc package issues

Hello, I "unregistered" unix-2.3.0.0. Now I cannot rebuild the Unix package. Please see the below log: vigalchin@ubuntu:~$ ghc-pkg latest unix unix-2.2.0.0 vigalchin@ubuntu:~$ ghc-pkg describe unix name: unix version: 2.2.0.0 license: BSD3 copyright: maintainer: libraries@haskell.org stability: homepage: package-url: description: This package gives you access to the set of operating system services standardised by POSIX 1003.1b (or the IEEE Portable Operating System Interface for Computing Environments - IEEE Std. 1003.1). . The package is not supported under Windows (except under Cygwin). category: author: exposed: True exposed-modules: System.Posix System.Posix.DynamicLinker.Module System.Posix.DynamicLinker.Prim System.Posix.Directory System.Posix.DynamicLinker System.Posix.Env System.Posix.Error System.Posix.Files System.Posix.IO System.Posix.Process System.Posix.Process.Internals System.Posix.Resource System.Posix.Temp System.Posix.Terminal System.Posix.Time System.Posix.Unistd System.Posix.User System.Posix.Signals System.Posix.Signals.Exts System.Posix.Semaphore System.Posix.SharedMem System.Posix.MQueue hidden-modules: import-dirs: /usr/local/lib/unix-2.2.0.0/ghc-6.8.2 library-dirs: /usr/local/lib/unix-2.2.0.0/ghc-6.8.2 hs-libraries: HSunix-2.2.0.0 extra-libraries: util dl extra-ghci-libraries: include-dirs: /usr/local/lib/unix-2.2.0.0/ghc-6.8.2/include includes: HsUnix.h execvpe.h depends: base-3.0.1.0 directory-1.0.0.0 hugs-options: cc-options: ld-options: framework-dirs: frameworks: haddock-interfaces: /usr/local/share/doc/unix-2.2.0.0/html/unix.haddock haddock-html: /usr/local/share/doc/unix-2.2.0.0/html vigalchin@ubuntu:~$ vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs configure unknown package: unix-2.3.0.0 In my .cabal file, I have specified the version as 2.2.0.0, 2.3.0.0 and 2.4.0.0 all with the same results: "unknown package: unix-2.3.0.0" Vasili

]
vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs configure unknown package: unix-2.3.0.0
I suggested this in my other message, before I saw this one, but just to be sure: does it help to do 'runhaskell Setup.hs clean' before doing the configure step? -Brent

vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs cleanup
unknown package: unix-2.3.0.0
no it doesn't.
Vasili
On Sat, Apr 12, 2008 at 9:20 AM, Brent Yorgey
]
vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs configure unknown package: unix-2.3.0.0
I suggested this in my other message, before I saw this one, but just to be sure: does it help to do 'runhaskell Setup.hs clean' before doing the configure step?
-Brent

On Apr 12, 2008, at 12:27 , Galchin, Vasili wrote:
vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs cleanup unknown package: unix-2.3.0.0
no it doesn't.
I suspect the Cabal stuff has a dependency on the unix package (at least on POSIXish systems, probably via the filepath stuff) and by deregistering unix-2.3.0.0 which Cabal was built against you broke it. Probably you need to do a full reinstall of GHC to recover at this point. -- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

I was afraid of the install. Hopefully with the Ubuntu package manager it will be fairly painless. Thanks, Vasili On Sat, Apr 12, 2008 at 11:30 AM, Brandon S. Allbery KF8NH < allbery@ece.cmu.edu> wrote:
On Apr 12, 2008, at 12:27 , Galchin, Vasili wrote:
vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs cleanup unknown package: unix-2.3.0.0
no it doesn't.
I suspect the Cabal stuff has a dependency on the unix package (at least on POSIXish systems, probably via the filepath stuff) and by deregistering unix-2.3.0.0 which Cabal was built against you broke it. Probably you need to do a full reinstall of GHC to recover at this point.
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

1) I did an Ubuntu purge followed by an install. Afterwards I rebuilt ghc 6.8.2. The same d*mn "unknown package: unix-2.3.0.0" message when I try to build unix and bytestring via runhaskell Setup.hs configure. 2) This strongly looks like the package database manager, i.e. ghc-pkg. Source please so I can understand where this d*amn "unknown package: unix-2.3.0.0" message is coming from and why? 3) Serious rant mode on ... I am a computer industry veteran(decades) who is trying to convince, coggle, etc. younger colleagues about the usefulness of FPLs for correctness, etc, and then => "unknown package ....". V. On Sat, Apr 12, 2008 at 11:30 AM, Brandon S. Allbery KF8NH < allbery@ece.cmu.edu> wrote:
On Apr 12, 2008, at 12:27 , Galchin, Vasili wrote:
vigalchin@ubuntu:~/FTP/Haskell/unix-2.2.0.0$ runhaskell Setup.hs cleanup unknown package: unix-2.3.0.0
no it doesn't.
I suspect the Cabal stuff has a dependency on the unix package (at least on POSIXish systems, probably via the filepath stuff) and by deregistering unix-2.3.0.0 which Cabal was built against you broke it. Probably you need to do a full reinstall of GHC to recover at this point.
-- brandon s. allbery [solaris,freebsd,perl,pugs,haskell] allbery@kf8nh.com system administrator [openafs,heimdal,too many hats] allbery@ece.cmu.edu electrical and computer engineering, carnegie mellon university KF8NH

On Sat, 2008-04-12 at 23:33 -0500, Galchin, Vasili wrote:
2) This strongly looks like the package database manager, i.e. ghc-pkg. Source please so I can understand where this d*amn "unknown package: unix-2.3.0.0" message is coming from and why?
Yes, ghc/ghc-pkg is giving this message because you're trying to use a package that depends on a package that you unregistered. In your case, you unregistered unix-2.3.0.0 but process-1.0.0.0 depended on that. Cabal depends on process-1.0.0.0 which means you now cannot runghc Setup.hs scripts because they all import Cabal. Look at the output of ghc-pkg list. It marks in {} the packages that are broken due to missing dependencies. Remember you also have two package databases, the per-user one and the global one. The per-user one is stored under ~/.ghc You can see the exact path in the ghc-pkg list output. The packages from the user db mask those from the global db, so if you have messed up the per-user one then you will still get problems even if you reset the global one to default. If you're just trying to get back to a known state then you can delete the per-user ghc package db. ghc-pkg will re-create it next time you register a package as a user.
3) Serious rant mode on ... I am a computer industry veteran(decades) who is trying to convince, coggle, etc. younger colleagues about the usefulness of FPLs for correctness, etc, and then => "unknown package ....".
The error messages from ghc-pkg are not very helpful and it does not prevent you from removing packages which other packages still depend on. The best advice at the moment is, don't un-register packages, at least not without considering what other packages still depend on them. There's no easy way of doing a reverse dependency lookup I think yet via ghc-pkg. You can see direct dependencies, eg $ ghc-pkg field containers depends depends: base-3.0.1.0 array-0.1.0.0 As it happens, the latest version of Cabal gives a much better error message in the case that you try to configure a package that depends on a broken package. It says exactly which package is broken due to which missing dependency. In this case we'd get a message like: The following installed packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used. package process-1.0.0.0 is broken due to missing package unix-2.3.0.0 It would be nice if ghc/ghci/runghc could give a similarly helpful error message. Duncan
participants (4)
-
Brandon S. Allbery KF8NH
-
Brent Yorgey
-
Duncan Coutts
-
Galchin, Vasili