
flushed as in happy, not like a buffer, with my recent OpenGL and haskell hacking I attempted to install cairo to try rendering a cairo generated image into a GL texture but once again, the sometimes obstreperous cabal is making it hard. <rant> I sometimes think that cabal is the "weak" point for newbies like me accepting Haskell in all its goodness... if you can't cleanly and simply install libraries then ultimately you will walk away for something less obstructive... </rant> Can anybody tell me that this means and how to solve it ? Thanks, Sean. ----- scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ cabal --version cabal-install version 0.10.2 using version 1.10.2.0 of the Cabal library scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ ghci --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 ----- /tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs:25:2: warning: #warning Setup.hs is guessing the version of Cabal. If compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when building (prefixed by --ghc-option= when using the 'cabal' command) [1 of 2] Compiling Gtk2HsSetup ( /tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs, /tmp/cairo-0.12.013023/cairo-0.12.0/dist/setup/Gtk2HsSetup.o ) /tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs:201:69: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the sixth argument of `registerPackage', namely `packageDb' In the expression: registerPackage verbosity installedPkgInfo pkg lbi inplace packageDb In a case alternative: _ | modeGenerateRegFile -> die "Generate Reg File not supported" | modeGenerateRegScript -> die "Generate Reg Script not supported" | otherwise -> registerPackage verbosity installedPkgInfo pkg lbi inplace packageDb cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1

That looks like it might be a bug in the source. What it says, in short, is that it expects that sixth argument in (i.e., registerPackage _ _ _ _ _ O) to be a PackageDBStack, but instead it's a PackageDB. The lines around where the error occurs are #if CABAL_VERSION_CHECK(1,10,0) installedPkgInfo pkg lbi inplace [packageDb] #else installedPkgInfo pkg lbi inplace packageDb #endif So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`? On Jul 7, 2011, at 4:19 AM, Sean Charles wrote:
flushed as in happy, not like a buffer, with my recent OpenGL and haskell hacking I attempted to install cairo to try rendering a cairo generated image into a GL texture but once again, the sometimes obstreperous cabal is making it hard.
<rant> I sometimes think that cabal is the "weak" point for newbies like me accepting Haskell in all its goodness... if you can't cleanly and simply install libraries then ultimately you will walk away for something less obstructive... </rant>
Can anybody tell me that this means and how to solve it ? Thanks, Sean.
----- scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ cabal --version cabal-install version 0.10.2 using version 1.10.2.0 of the Cabal library scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ ghci --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 -----
/tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs:25:2: warning: #warning Setup.hs is guessing the version of Cabal. If compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when building (prefixed by --ghc-option= when using the 'cabal' command) [1 of 2] Compiling Gtk2HsSetup ( /tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs, /tmp/cairo-0.12.013023/cairo-0.12.0/dist/setup/Gtk2HsSetup.o )
/tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs:201:69: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the sixth argument of `registerPackage', namely `packageDb' In the expression: registerPackage verbosity installedPkgInfo pkg lbi inplace packageDb In a case alternative: _ | modeGenerateRegFile -> die "Generate Reg File not supported" | modeGenerateRegScript -> die "Generate Reg Script not supported" | otherwise -> registerPackage verbosity installedPkgInfo pkg lbi inplace packageDb cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

Omit parens, sub 'e.g.,' for 'i.e.,'. I look a fool. :D On Jul 7, 2011, at 6:38 AM, Jack Henahan wrote:
That looks like it might be a bug in the source. What it says, in short, is that it expects that sixth argument in (i.e., registerPackage _ _ _ _ _ O) to be a PackageDBStack, but instead it's a PackageDB.
The lines around where the error occurs are
#if CABAL_VERSION_CHECK(1,10,0) installedPkgInfo pkg lbi inplace [packageDb] #else installedPkgInfo pkg lbi inplace packageDb #endif
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`?
On Jul 7, 2011, at 4:19 AM, Sean Charles wrote:
flushed as in happy, not like a buffer, with my recent OpenGL and haskell hacking I attempted to install cairo to try rendering a cairo generated image into a GL texture but once again, the sometimes obstreperous cabal is making it hard.
<rant> I sometimes think that cabal is the "weak" point for newbies like me accepting Haskell in all its goodness... if you can't cleanly and simply install libraries then ultimately you will walk away for something less obstructive... </rant>
Can anybody tell me that this means and how to solve it ? Thanks, Sean.
----- scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ cabal --version cabal-install version 0.10.2 using version 1.10.2.0 of the Cabal library scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ ghc --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 scharles@ubuntu:~/stuff/hackinge/objitsu/trunk/haskell/felt/src$ ghci --version The Glorious Glasgow Haskell Compilation System, version 6.12.3 -----
/tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs:25:2: warning: #warning Setup.hs is guessing the version of Cabal. If compilation of Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when building (prefixed by --ghc-option= when using the 'cabal' command) [1 of 2] Compiling Gtk2HsSetup ( /tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs, /tmp/cairo-0.12.013023/cairo-0.12.0/dist/setup/Gtk2HsSetup.o )
/tmp/cairo-0.12.013023/cairo-0.12.0/Gtk2HsSetup.hs:201:69: Couldn't match expected type `PackageDBStack' against inferred type `PackageDB' In the sixth argument of `registerPackage', namely `packageDb' In the expression: registerPackage verbosity installedPkgInfo pkg lbi inplace packageDb In a case alternative: _ | modeGenerateRegFile -> die "Generate Reg File not supported" | modeGenerateRegScript -> die "Generate Reg Script not supported" | otherwise -> registerPackage verbosity installedPkgInfo pkg lbi inplace packageDb cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`? Resolving dependencies... target `DCABAL_VERSION_MINOR=10' is not a module name or a source file cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
:) I also tried moving the furniture around ... cabal --ghc-option=DCABAL_VERSION_MINOR=10 install cairo and cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo just in case but to no avail, same message in all cases....

Might need quotes (single or double should be fine, unless I'm an idiot :D ) around the DCABAL business. I can never remember the correct syntax on those bits. Failing that, you can probably get in touch with the package developer and see if he has any ideas. What OS are you on, by the way? On Jul 7, 2011, at 7:02 AM, Sean Charles wrote:
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`? Resolving dependencies... target `DCABAL_VERSION_MINOR=10' is not a module name or a source file cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
:)
I also tried moving the furniture around ...
cabal --ghc-option=DCABAL_VERSION_MINOR=10 install cairo and cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo
just in case but to no avail, same message in all cases....

Oh, wait. Duh. I forgot the `-` at the beginning. Should be something of the form `--ghc-option=-DCABAL_VERSION_MINOR=10`, possibly with quotes. On Jul 7, 2011, at 7:08 AM, Jack Henahan wrote:
Might need quotes (single or double should be fine, unless I'm an idiot :D ) around the DCABAL business. I can never remember the correct syntax on those bits. Failing that, you can probably get in touch with the package developer and see if he has any ideas. What OS are you on, by the way?
On Jul 7, 2011, at 7:02 AM, Sean Charles wrote:
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`? Resolving dependencies... target `DCABAL_VERSION_MINOR=10' is not a module name or a source file cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
:)
I also tried moving the furniture around ...
cabal --ghc-option=DCABAL_VERSION_MINOR=10 install cairo and cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo
just in case but to no avail, same message in all cases....
_______________________________________________ Beginners mailing list Beginners@haskell.org http://www.haskell.org/mailman/listinfo/beginners

On Thursday 07 July 2011, 13:02:46, Sean Charles wrote:
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`?
Resolving dependencies... target `DCABAL_VERSION_MINOR=10' is not a module name or a source file cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
That would be --ghc-option=-DCABAL_VERSION_MINOR=10 you need to provide the option-dash yourself, cabal doesn't insert it.

Yeah, don't mind me. I just got off work (7AM here) so the ol' cognitive faculties are not exactly at peak efficiency. On Jul 7, 2011, at 7:14 AM, Daniel Fischer wrote:
On Thursday 07 July 2011, 13:02:46, Sean Charles wrote:
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`?
Resolving dependencies... target `DCABAL_VERSION_MINOR=10' is not a module name or a source file cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1
That would be
--ghc-option=-DCABAL_VERSION_MINOR=10
you need to provide the option-dash yourself, cabal doesn't insert it.

On Thursday 07 July 2011, 13:19:45, Jack Henahan wrote:
Yeah, don't mind me. I just got off work (7AM here) so the ol' cognitive faculties are not exactly at peak efficiency.
I thought it was a plain old typo as it happens all the time. Of course more frequently in the middle of the night (which 7AM is close enough to ;). Cheers, Daniel

Sweeeeeeeeeeeeeeeeeeeeeeeeeet! Job done, thanks Jack and Daniel.... time for a drink? ...think about it....groan ;) All the best, saying that, svgcairo then failed to install with: cabal install --ghc-option=-DCABAL_VERSION_MINOR=10 svgcairo ...but it was because I hadn't installed the ubuntu librsvg stuff, which I promptly and re-running the above command worked just fine. So, I now have Cairo and Cairo SVG bindings locked and loaded, what shall I do with them? (Just kidding!) Once again a big thanks to everybody that's stopped to hell. All the best :) Sean On 07/07/11 12:14, Daniel Fischer wrote:
On Thursday 07 July 2011, 13:02:46, Sean Charles wrote:
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`? Resolving dependencies... target `DCABAL_VERSION_MINOR=10' is not a module name or a source file cabal: Error: some packages failed to install: cairo-0.12.0 failed during the configure step. The exception was: ExitFailure 1 That would be
--ghc-option=-DCABAL_VERSION_MINOR=10
you need to provide the option-dash yourself, cabal doesn't insert it.

Just to get this on the record (I found this message while googling [PackageDB] for a similar error): [1] One needs a dash, cabal install --ghc-option=-DCABAL_VERSION_MINOR=10 cairo [2] It's irrelevant what the "correct answer" is as to the version of Cabal; one may want the wrong answer. The Setup.hs in an older package may not have correctly predicted future development. Developers could use "micro" versions to keep variants current, but they tend not to do so. One wants the branch of Setup.hs code that picks the right variant between [PackageDB] and PackageDB, so the install gets past hanging on this issue. One needs to look at the code. In my case, I needed cabal install --ghc-option=-DCABAL_VERSION_MINOR=6 glib-0.11.2 and I could only figure that out by looking at the branching code in Gtk2HsSetup.hs; the two choices in that file were 6 and 8. 6 works, 8 doesn't, I'm actually on 10, go figure. Several days of part-time yak shaving in, I managed to get gtk+ up on OS X using fink (not manually or using MacPorts) but it's an older version. The current glib assumes it can make a call to g_mount_get_default_location, which is described online but not in the fink version of gio. This earlier glib doesn't assume it can make a call to g_mount_get_default_location. Alas, but this earlier glib triggers the [PackageDB] versus PackageDB Cabal bug, claimed to be fixed on various tickets. And that's 0.4% of the yak shaving I've been doing. In an ideal world there'd be a glib-0.11.3 that works with contemporary versions of cabal without this hack, but doesn't assume recent advances in gtk+ such as the g_mount_get_default_location call. That's what micro versions are for. On Jul 7, 2011, at 3:38 AM, Jack Henahan wrote:
That looks like it might be a bug in the source. What it says, in short, is that it expects that sixth argument in (i.e., registerPackage _ _ _ _ _ O) to be a PackageDBStack, but instead it's a PackageDB.
The lines around where the error occurs are
#if CABAL_VERSION_CHECK(1,10,0) installedPkgInfo pkg lbi inplace [packageDb] #else installedPkgInfo pkg lbi inplace packageDb #endif
So it seems that it can't infer your cabal's minor version, so it drops into the else. Do you get any different result when you call `cabal install --ghc-option=DCABAL_VERSION_MINOR=10 cairo`?
participants (4)
-
Daniel Fischer
-
Dave Bayer
-
Jack Henahan
-
Sean Charles