cabal probems with binary/containers packages

It all started with this: Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found) so I tried
cabal upgrade binary
Resolving dependencies... Configuring containers-0.2.0.1... Preprocessing library containers-0.2.0.1... Building containers-0.2.0.1... Data/IntMap.hs:182:7: Could not find module `Data.Data': it is a member of package base, which is hidden cabal: Error: some packages failed to install: binary-0.5.0.2 depends on containers-0.2.0.1 which failed to install. containers-0.2.0.1 failed during the building phase. The exception was: exit: ExitFailure 1 help.... Thanks, Brian

On Tue, 2009-10-27 at 21:37 -0700, brian wrote:
It all started with this:
Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found)
so I tried
cabal upgrade binary
Don't do that. Just use cabal install binary. Upgrade means install the named package and also try to install the latest version of all of its dependencies. That's generally not a good idea. It's choosing to upgrade your containers package and you probably do not want to do that. We're thinking about how to changing the behaviour of upgrade so that you can upgrade the dependencies you want without also upgrading the ones that you really wanted to be kept the same (like the core or perhaps even the platform libs).
Building containers-0.2.0.1...
Data/IntMap.hs:182:7: Could not find module `Data.Data': it is a member of package base, which is hidden
This is because the containers packages doesn't say that it needs base version 4. In fact it doesn't say what version it needs at all. Duncan

Hi Duncan, That works just fine: Installing library in /Users/briand/.cabal/lib/binary-0.5.0.2/ghc-6.10.1 Registering binary-0.5.0.2... Reading package info from "dist/installed-pkg-config" ... done. Writing new package config file... done. and still ghc gives me: Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found) The question, of course, is to figure out why ghc is trying to load the old version. I know binary isn't dynamically linked, because ghc works unless I'm trying to use the binary package. Is there something broken in the 0.5.0.2 release that causes ghc to look for the old library ? Brian On Oct 28, 2009, at 4:00 AM, Duncan Coutts wrote:
On Tue, 2009-10-27 at 21:37 -0700, brian wrote:
It all started with this:
Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found)
so I tried
cabal upgrade binary
Don't do that. Just use cabal install binary.
Upgrade means install the named package and also try to install the latest version of all of its dependencies. That's generally not a good idea. It's choosing to upgrade your containers package and you probably do not want to do that.
We're thinking about how to changing the behaviour of upgrade so that you can upgrade the dependencies you want without also upgrading the ones that you really wanted to be kept the same (like the core or perhaps even the platform libs).
Building containers-0.2.0.1...
Data/IntMap.hs:182:7: Could not find module `Data.Data': it is a member of package base, which is hidden
This is because the containers packages doesn't say that it needs base version 4. In fact it doesn't say what version it needs at all.
Duncan

Just found the following file: .ghc/powerpc-darwin-6.10.1/pkg-config and it is referring to 0.5.0.1. Is there anyway to regenerate the file, or is it broken because of a problem with the package ? Thanks, Brian On Oct 28, 2009, at 4:00 AM, Duncan Coutts wrote:
On Tue, 2009-10-27 at 21:37 -0700, brian wrote:
It all started with this:
Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found)
so I tried
cabal upgrade binary
Don't do that. Just use cabal install binary.
Upgrade means install the named package and also try to install the latest version of all of its dependencies. That's generally not a good idea. It's choosing to upgrade your containers package and you probably do not want to do that.
We're thinking about how to changing the behaviour of upgrade so that you can upgrade the dependencies you want without also upgrading the ones that you really wanted to be kept the same (like the core or perhaps even the platform libs).
Building containers-0.2.0.1...
Data/IntMap.hs:182:7: Could not find module `Data.Data': it is a member of package base, which is hidden
This is because the containers packages doesn't say that it needs base version 4. In fact it doesn't say what version it needs at all.
Duncan

On Wed, 2009-10-28 at 07:07 -0700, brian wrote:
Just found the following file:
.ghc/powerpc-darwin-6.10.1/pkg-config
and it is referring to 0.5.0.1.
Is there anyway to regenerate the file, or is it broken because of a problem with the package ?
It all started with this:
Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found)
What's (probably) going on is that you deleted the files for the binary-0.5.0.1 package but did not unregister it. You probably also have other registered packages that depend on binary-0.5.0.1 (because that's the version they were built against). You can use ghc-pkg to forcibly unregister binary-0.5.0.1 and rebuild the other packages that depended on it. Generally I recommend just leaving old packages and rebuilding things when necessary (which cabal-install will do automatically) rather than going about deleting or unregistering older versions of packages. Duncan

That was indeed the problem. I edited the pkg-config file by hand. I followed your advice anyway and unregistered and re-installed. Everythingworks now. Thanks for your help. Brian On Oct 28, 2009, at 11:58 AM, Duncan Coutts wrote:
On Wed, 2009-10-28 at 07:07 -0700, brian wrote:
Just found the following file:
.ghc/powerpc-darwin-6.10.1/pkg-config
and it is referring to 0.5.0.1.
Is there anyway to regenerate the file, or is it broken because of a problem with the package ?
It all started with this:
Loading package binary-0.5.0.1 ... can't load .so/.DLL for: HSbinary-0.5.0.1 (dlopen(libHSbinary-0.5.0.1.dylib, 9): image not found)
What's (probably) going on is that you deleted the files for the binary-0.5.0.1 package but did not unregister it. You probably also have other registered packages that depend on binary-0.5.0.1 (because that's the version they were built against).
You can use ghc-pkg to forcibly unregister binary-0.5.0.1 and rebuild the other packages that depended on it.
Generally I recommend just leaving old packages and rebuilding things when necessary (which cabal-install will do automatically) rather than going about deleting or unregistering older versions of packages.
Duncan
participants (2)
-
brian
-
Duncan Coutts