Ticket #812 (closed defect: invalid)

Opened 2 years ago

Last modified 2 years ago

setup.exe: internal error: unexpected package db stack: [UserPackageDB]

Reported by: fryguybob Owned by:
Priority: normal Milestone:
Component: cabal-install tool Version: 1.10.0.0
Severity: normal Keywords:
Cc: Difficulty: unknown
GHC Version: Platform: Windows

Description

When trying to install Cairo with the new Haskell Platform (2011.2.0.0). I get the error:

> cabal install cairo --ghc-option=-DCABAL_VERSION_MINOR=10
...
Registering cairo-0.12.0...
setup.exe: internal error: unexpected package db stack: [UserPackageDB]
...

The CABAL_VERSION_MINOR flag is suggested if you try without it but doesn't make a difference in the outcome.

I'm on Windows 7 64-bit.

> cabal --version
cabal-install version 0.10.2
using version 1.10.1.0 of the Cabal library
> ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.0.2

Attached is the -v2 log.

Attachments

buildlog.txt Download (69.1 KB) - added by fryguybob 2 years ago.

Change History

Changed 2 years ago by fryguybob

Changed 2 years ago by fryguybob

  • status changed from new to closed
  • resolution set to invalid

If I change Gtk2hsSetup.hs from:

#if CABAL_VERSION_CHECK(1,10,0)
                                    installedPkgInfo pkg lbi inplace [packageDb]
#else
                                    installedPkgInfo pkg lbi inplace packageDb
#endif

to

#if CABAL_VERSION_CHECK(1,10,0)
                                    installedPkgInfo pkg lbi inplace (withPackageDB lbi)
#else
                                    installedPkgInfo pkg lbi inplace packageDb
#endif

It registers correctly. The packageDb here is defined as:

    packageDb = case flagToMaybe (regPackageDB regFlags) of
                    Just db -> db
                    Nothing -> registrationPackageDB (withPackageDB lbi)

In Distribution\Simple\Register.hs it has:

    -- FIXME: there's really no guarantee this will work.
    -- registering into a totally different db stack can
    -- fail if dependencies cannot be satisfied.
    packageDbs = nub $ withPackageDB lbi
                    ++ maybeToList (flagToMaybe  (regPackageDB regFlags))

Anyway, it appears that the issue is with Gtk2HsSetup.hs and I will close this and add to a related ticket there ( http://hackage.haskell.org/trac/gtk2hs/ticket/1203).

Note: See TracTickets for help on using tickets.