exposing hidden packages with runghc

I'm trying to install HTTP-3000.0.0 (because I don't have cabal-install, and it's a dependency for cabal-install 0.4.9) This is on a Debian 5.1 machine with GHC 6.8.2 and 6.8.3 on it. The command: sudo runghc Setup configure -p && sudo runghc Setup build && sudo runghc Setup install The error: Could not find module `Data.Array.MArray': it is a member of package array-0.1.0.0, which is hidden ghc-pkg does list the hidden package. I've seen other threads on this "hiding" problem and searched through the GHC user guide, but I haven't actually found a solution, just explanation. I've tried sending the -package flag through to GHC by adding it to the runghc command, but I'm not doing this right, obviously. Would someone be able to point me in the right direction? It would be much appreciated. Iain

I think this was the wrong list to use for this question, so I've forwarded
it to the GHC list. Please ignore this and accept my apologies.
Iain
2009/6/30 Iain Barnett
I'm trying to install HTTP-3000.0.0 (because I don't have cabal-install, and it's a dependency for cabal-install 0.4.9)
This is on a Debian 5.1 machine with GHC 6.8.2 and 6.8.3 on it.
The command: sudo runghc Setup configure -p && sudo runghc Setup build && sudo runghc Setup install
The error: Could not find module `Data.Array.MArray': it is a member of package array-0.1.0.0, which is hidden
ghc-pkg does list the hidden package.
I've seen other threads on this "hiding" problem and searched through the GHC user guide, but I haven't actually found a solution, just explanation. I've tried sending the -package flag through to GHC by adding it to the runghc command, but I'm not doing this right, obviously.
Would someone be able to point me in the right direction? It would be much appreciated.
Iain

On Tue, Jun 30, 2009 at 7:12 PM, Iain Barnett
I think this was the wrong list to use for this question, so I've forwarded it to the GHC list. Please ignore this and accept my apologies.
Iain
Actually, the GHC list is no better than this one; that's a Cabal issue. Cabal by default hides everything listed in ghc-pkg, only making available the ones listed in the .cabal file. So a solution to your problem would be something like editing http.cabal and adding array to the build-depends field. -- gwern

On Tue, 2009-06-30 at 15:44 +0100, Iain Barnett wrote:
I'm trying to install HTTP-3000.0.0 (because I don't have cabal-install, and it's a dependency for cabal-install 0.4.9)
I highly recommend against using such old versions. cabal-install only really became usable around version 0.6. The latest is 0.6.2 and that's the one you should try.
This is on a Debian 5.1 machine with GHC 6.8.2 and 6.8.3 on it.
The latest version of cabal-install should work fine there. Duncan

2009/7/1 Gwern Branwen
Cabal by default hides everything listed in ghc-pkg, only making available the ones listed in the .cabal file. So a solution to your problem would be something like editing http.cabal and adding array to the build-depends field.
-- gwern
that threw up syntax errors, obviously I was screwing up something I found
out that cabal installs locally by default but runghc installs globally by
default, so I went back and reinstalled everything with the --user flag and
this fixed the problem, regarding installing packages and hiding, that is.
2009/7/1 Daniel Fischer
But why are you trying to build such an outdated cabal-install?
Because I've had a lot of trouble installing the latest versions, and found
Dependency Hell to be just as bad as Version Hell was before .Net on
Windows, so I've been trying to work up the versions from the beginning, on
the logic that they should have less dependencies as there weren't as many
things to depend on. Then I have some sort of foundation to use.
2009/7/1 Duncan Coutts
This is on a Debian 5.1 machine with GHC 6.8.2 and 6.8.3 on it.
The latest version of cabal-install should work fine there.
Duncan
Unless you've actually tried installing it on there lately, then I'd have to disagree. I've now got GHC 6.10.3 running and Cabal 1.6.0.3, and all the packages needed for cabal-install, and still, it won't go on using runghc or ghc to build it. I will keep on trying, and when it's done I'll try and work out how to package it for Debian so it just works, and helps keep the suicide/murder rate down. Iain

On Thu, 2009-07-02 at 14:44 +0100, Iain Barnett wrote:
2009/7/1 Duncan Coutts
> This is on a Debian 5.1 machine with GHC 6.8.2 and 6.8.3 on it.
The latest version of cabal-install should work fine there.
Duncan
Unless you've actually tried installing it on there lately, then I'd have to disagree. I've now got GHC 6.10.3 running and Cabal 1.6.0.3, and all the packages needed for cabal-install, and still, it won't go on using runghc or ghc to build it.
Do you have any more details on that? What problem are you hitting exactly? A log file would help us see what's going on. I did test ghc-6.8 when releasing Cabal-1.6 and cabal-install-0.6.2. Duncan

2009/7/2 Duncan Coutts
Do you have any more details on that? What problem are you hitting exactly? A log file would help us see what's going on. I did test ghc-6.8 when releasing Cabal-1.6 and cabal-install-0.6.2.
Duncan
Which log files would be helpful? From looking at "ps ax" when it was
running it seems that the linking (ld) part of the install is the bit that takes a long time. About 8hrs on this machine, whether I used 1. ghc --make Setup 2. ./Setup configure --user 3. ./Setup build or subsequently 1. ./dist/build/cabal/cabal update 2. ./dist/build/cabal/cabal install cabal-install Just let me know what you need, and I'll be happy to try a fresh install to recreate the problem if needed - once I've backed up this one! Iain

On Sat, 2009-07-04 at 13:17 +0100, Iain Barnett wrote:
2009/7/2 Duncan Coutts
Do you have any more details on that? What problem are you hitting exactly? A log file would help us see what's going on. I did test ghc-6.8 when releasing Cabal-1.6 and cabal-install-0.6.2.
Duncan
Which log files would be helpful? From looking at "ps ax" when it was running it seems that the linking (ld) part of the install is the bit that takes a long time. About 8hrs on this machine,
Wow. That's crazy. I've never seen that before. It should be a few seconds at most, especially since it's not using "split-objs".
whether I used
1. ghc --make Setup 2. ./Setup configure --user 3. ./Setup build or subsequently 1. ./dist/build/cabal/cabal update 2. ./dist/build/cabal/cabal install cabal-install
Just let me know what you need, and I'll be happy to try a fresh install to recreate the problem if needed - once I've backed up this one!
Did you say this was an ordinary Debian install? What version, what hardware platform? What version of binutils was that? Was ld using a massive amount of memory? Was it using an amount of memory that pushed everything into swap? Presumably it's the final link that is taking so long, not compiling and linking Setup.hs ? Duncan

2009/7/4 Duncan Coutts
Did you say this was an ordinary Debian install? What version, what hardware platform?
What version of binutils was that? Was ld using a massive amount of memory? Was it using an amount of memory that pushed everything into swap? Presumably it's the final link that is taking so long, not compiling and linking Setup.hs ?
Duncan
Quick answers are yes, ordinary install - Debian 5.1 i386, I chose the basic workstation and desktop installs that are the defaults, nothing fancy. I used the packages for GHC 6.8.2 and then added 6.8.3 and 6.10.3 from source, slow but expected. Cabal 1.6 took hours and hours to install from source. The machine is an old compaq with 2.4Ghz P4 and 40Gb drive with lots of space, since I only just installed it, and 256Mb RAM. I know it's not a fast machine, but still... nothing else takes 8+ hrs to install! I didn't get any memory usage off it at the time because the whole machine was so locked up I could barely type, so "ps ax" was as far as I got before cursing, using "renice" to up the priorities, and then turn off the screen and leave it till it finished. binutils is version... GNU ld (GNU Binutils for Debian) 2.18.0.20080103 I reinstalled all the obvious things like gcc and, oh, this is better - Reinstalled the following packages: binutils (2.18.1~cvs20080103-7) gcc (4:4.3.2-2) gcc-4.1 (4.1.2-25) gcc-4.3 (4.3.2-1.1) pkg-config (0.22-1) Tomorrow I'll start another install and save some of the output for you. If there's any commands in particular you want me to pick up then let me know. Iain

The machine is an old compaq with 2.4Ghz P4 and 40Gb drive with lots of space, since I only just installed it, and 256Mb RAM.
... the whole machine was so locked up I could barely type ...
There is your answer I think - the physical memory is too small, and the machine was thrashing the swapspace. When that happens, it easily adds several orders of magnitude to the time taken to get anything done. Regards, Malcolm

The machine is an old compaq with 2.4Ghz P4 and 40Gb drive with lots of
space, since I only just installed it, and 256Mb RAM.
... the whole machine was so locked up I could barely type ...
There is your answer I think - the physical memory is too small, and the machine was thrashing the swapspace. When that happens, it easily adds several orders of magnitude to the time taken to get anything done.
As I wrote those words I thought it might be said, but let me put it another way. No other install on this machine has taken anywhere close (i.e.
2009/7/6 Malcolm Wallace
participants (4)
-
Duncan Coutts
-
Gwern Branwen
-
Iain Barnett
-
Malcolm Wallace