gtk2hs安装

时间:2011-06-08 06:26:46

标签: haskell gtk cabal

你好,我收到了一些错误

在windows xp sp3上,

我试过

安装最新的Haskell平台

安装gtk + all in one bundle 2.16

将MinGW的bin地址添加到PATH环境变量

将GTK +的bin地址添加到PATH环境变量

和CMD

我执行

cabal update

cabal install gtk2hs-buildtools

到目前为止一切顺利

但是当我执行

cabal install gtk

出现错误

这里是转储

Microsoft Windows XP [Version 5.1.2600]
(C) Copyright 1985-2001 Microsoft Corp.

C:\Documents and Settings\dreambook>cabal install gtk
Resolving dependencies...
C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\cairo-0.12.0808\cairo-0.12.0\Gtk2HsSetup.hs:2
5: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 buil
ding (prefixed by --ghc-option= when using the 'cabal' command)
[1 of 2] Compiling Gtk2HsSetup      ( C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\cairo-0
.12.0808\cairo-0.12.0\Gtk2HsSetup.hs, C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\cairo-0
.12.0808\cairo-0.12.0\dist\setup\Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\cairo-0
.12.0808\cairo-0.12.0\Setup.hs, C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\cairo-0.12.08
08\cairo-0.12.0\dist\setup\Main.o )
Linking C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\cairo-0.12.0808\cairo-0.12.0\dist\set
up\setup.exe ...
Configuring cairo-0.12.0...
Preprocessing library cairo-0.12.0...
Building cairo-0.12.0...
[ 1 of 17] Compiling Graphics.Rendering.Cairo.Matrix ( dist\build\Graphics\Rende
ring\Cairo\Matrix.hs, dist\build\Graphics\Rendering\Cairo\Matrix.o )
[ 2 of 17] Compiling Graphics.Rendering.Cairo.Types ( dist\build\Graphics\Render
ing\Cairo\Types.hs, dist\build\Graphics\Rendering\Cairo\Types.o )
[ 3 of 17] Compiling Graphics.Rendering.Cairo.Internal.Drawing.Cairo ( dist\buil
d\Graphics\Rendering\Cairo\Internal\Drawing\Cairo.hs, dist\build\Graphics\Render
ing\Cairo\Internal\Drawing\Cairo.o )
[ 4 of 17] Compiling Graphics.Rendering.Cairo.Internal.Drawing.Paths ( dist\buil
d\Graphics\Rendering\Cairo\Internal\Drawing\Paths.hs, dist\build\Graphics\Render
ing\Cairo\Internal\Drawing\Paths.o )
[ 5 of 17] Compiling Graphics.Rendering.Cairo.Internal.Drawing.Patterns ( dist\b
uild\Graphics\Rendering\Cairo\Internal\Drawing\Patterns.hs, dist\build\Graphics\
Rendering\Cairo\Internal\Drawing\Patterns.o )
[ 6 of 17] Compiling Graphics.Rendering.Cairo.Internal.Drawing.Text ( dist\build
\Graphics\Rendering\Cairo\Internal\Drawing\Text.hs, dist\build\Graphics\Renderin
g\Cairo\Internal\Drawing\Text.o )
[ 7 of 17] Compiling Graphics.Rendering.Cairo.Internal.Drawing.Transformations (
 dist\build\Graphics\Rendering\Cairo\Internal\Drawing\Transformations.hs, dist\b
uild\Graphics\Rendering\Cairo\Internal\Drawing\Transformations.o )
[ 8 of 17] Compiling Graphics.Rendering.Cairo.Internal.Fonts.FontOptions ( dist\
build\Graphics\Rendering\Cairo\Internal\Fonts\FontOptions.hs, dist\build\Graphic
s\Rendering\Cairo\Internal\Fonts\FontOptions.o )
[ 9 of 17] Compiling Graphics.Rendering.Cairo.Internal.Surfaces.Image ( dist\bui
ld\Graphics\Rendering\Cairo\Internal\Surfaces\Image.hs, dist\build\Graphics\Rend
ering\Cairo\Internal\Surfaces\Image.o )
[10 of 17] Compiling Graphics.Rendering.Cairo.Internal.Surfaces.PDF ( dist\build
\Graphics\Rendering\Cairo\Internal\Surfaces\PDF.hs, dist\build\Graphics\Renderin
g\Cairo\Internal\Surfaces\PDF.o )
[11 of 17] Compiling Graphics.Rendering.Cairo.Internal.Surfaces.PNG ( dist\build
\Graphics\Rendering\Cairo\Internal\Surfaces\PNG.hs, dist\build\Graphics\Renderin
g\Cairo\Internal\Surfaces\PNG.o )
[12 of 17] Compiling Graphics.Rendering.Cairo.Internal.Surfaces.PS ( dist\build\
Graphics\Rendering\Cairo\Internal\Surfaces\PS.hs, dist\build\Graphics\Rendering\
Cairo\Internal\Surfaces\PS.o )
[13 of 17] Compiling Graphics.Rendering.Cairo.Internal.Surfaces.SVG ( dist\build
\Graphics\Rendering\Cairo\Internal\Surfaces\SVG.hs, dist\build\Graphics\Renderin
g\Cairo\Internal\Surfaces\SVG.o )
[14 of 17] Compiling Graphics.Rendering.Cairo.Internal.Surfaces.Surface ( dist\b
uild\Graphics\Rendering\Cairo\Internal\Surfaces\Surface.hs, dist\build\Graphics\
Rendering\Cairo\Internal\Surfaces\Surface.o )
[15 of 17] Compiling Graphics.Rendering.Cairo.Internal.Utilities ( dist\build\Gr
aphics\Rendering\Cairo\Internal\Utilities.hs, dist\build\Graphics\Rendering\Cair
o\Internal\Utilities.o )
[16 of 17] Compiling Graphics.Rendering.Cairo.Internal ( Graphics\Rendering\Cair
o\Internal.hs, dist\build\Graphics\Rendering\Cairo\Internal.o )
[17 of 17] Compiling Graphics.Rendering.Cairo ( Graphics\Rendering\Cairo.hs, dis
t\build\Graphics\Rendering\Cairo.o )
Registering cairo-0.12.0...
Installing library in C:\Documents and Settings\dreambook\Application
Data\cabal\cairo-0.12.0\ghc-7.0.3
Registering cairo-0.12.0...
setup.exe: internal error: unexpected package db stack: [UserPackageDB]
C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\glib-0.12.0808\glib-0.12.0\Gtk2HsSetup.hs:25:
2: warning: #warning Setup.hs is guessing the version of Cabal. If compilation o
f Setup.hs fails use -DCABAL_VERSION_MINOR=x for Cabal version 1.x.0 when buildi
ng (prefixed by --ghc-option= when using the 'cabal' command)
[1 of 2] Compiling Gtk2HsSetup      ( C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\glib-0.
12.0808\glib-0.12.0\Gtk2HsSetup.hs, C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\glib-0.12
.0808\glib-0.12.0\dist\setup\Gtk2HsSetup.o )
[2 of 2] Compiling Main             ( C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\glib-0.
12.0808\glib-0.12.0\Setup.hs, C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\glib-0.12.0808\
glib-0.12.0\dist\setup\Main.o )
Linking C:\DOCUME~1\DREAMB~1\LOCALS~1\Temp\glib-0.12.0808\glib-0.12.0\dist\setup
\setup.exe ...
Configuring glib-0.12.0...
Preprocessing library glib-0.12.0...
Building glib-0.12.0...
[ 1 of 20] Compiling System.Glib.Attributes ( System\Glib\Attributes.hs, dist\bu
ild\System\Glib\Attributes.o )
[ 2 of 20] Compiling System.Glib.Flags ( System\Glib\Flags.hs, dist\build\System
\Glib\Flags.o )
[ 3 of 20] Compiling System.Glib.FFI  ( System\Glib\FFI.hs, dist\build\System\Gl
ib\FFI.o )
[ 4 of 20] Compiling System.Glib.Types ( dist\build\System\Glib\Types.hs, dist\b
uild\System\Glib\Types.o )
[ 5 of 20] Compiling System.Glib.GList ( dist\build\System\Glib\GList.hs, dist\b
uild\System\Glib\GList.o )
[ 6 of 20] Compiling System.Glib.GType ( dist\build\System\Glib\GType.hs, dist\b
uild\System\Glib\GType.o )
[ 7 of 20] Compiling System.Glib.GValue ( dist\build\System\Glib\GValue.hs, dist
\build\System\Glib\GValue.o )
[ 8 of 20] Compiling System.Glib.GParameter ( dist\build\System\Glib\GParameter.
hs, dist\build\System\Glib\GParameter.o )
[ 9 of 20] Compiling System.Glib.GTypeConstants ( dist\build\System\Glib\GTypeCo
nstants.hs, dist\build\System\Glib\GTypeConstants.o )
[10 of 20] Compiling System.Glib.UTFString ( System\Glib\UTFString.hs, dist\buil
d\System\Glib\UTFString.o )
[11 of 20] Compiling System.Glib.GObject ( dist\build\System\Glib\GObject.hs, di
st\build\System\Glib\GObject.o )
[12 of 20] Compiling System.Glib.GValueTypes ( dist\build\System\Glib\GValueType
s.hs, dist\build\System\Glib\GValueTypes.o )
[13 of 20] Compiling System.Glib.Properties ( dist\build\System\Glib\Properties.
hs, dist\build\System\Glib\Properties.o )
[14 of 20] Compiling System.Glib.StoreValue ( dist\build\System\Glib\StoreValue.
hs, dist\build\System\Glib\StoreValue.o )

System\Glib\StoreValue.hsc:38:1:
    Warning: Module `Control.OldException' is deprecated:
               Future versions of base will not support the old exceptions style
. Please switch to extensible exceptions.

System\Glib\StoreValue.hsc:38:1:
    Warning: In the use of data constructor `AssertionFailed'
             (imported from Control.OldException):
             Deprecated: "Future versions of base will not support the old excep
tions style. Please switch to extensible exceptions."
[15 of 20] Compiling System.Glib.Signals ( dist\build\System\Glib\Signals.hs, di
st\build\System\Glib\Signals.o )
[16 of 20] Compiling System.Glib.MainLoop ( dist\build\System\Glib\MainLoop.hs,
dist\build\System\Glib\MainLoop.o )
[17 of 20] Compiling System.Glib.GError ( dist\build\System\Glib\GError.hs, dist
\build\System\Glib\GError.o )

System\Glib\GError.chs:93:1:
    Warning: Module `Control.OldException' is deprecated:
               Future versions of base will not support the old exceptions style
. Please switch to extensible exceptions.

System\Glib\GError.chs:93:1:
    Warning: In the use of `catchDyn'
             (imported from Control.OldException):
             Deprecated: "Future versions of base will not support the old excep
tions style. Please switch to extensible exceptions."

System\Glib\GError.chs:93:1:
    Warning: In the use of `throwDyn'
             (imported from Control.OldException):
             Deprecated: "Future versions of base will not support the old excep
tions style. Please switch to extensible exceptions."
[18 of 20] Compiling System.Glib.GDateTime ( dist\build\System\Glib\GDateTime.hs
, dist\build\System\Glib\GDateTime.o )
[19 of 20] Compiling System.Glib.Utils ( dist\build\System\Glib\Utils.hs, dist\b
uild\System\Glib\Utils.o )
[20 of 20] Compiling System.Glib      ( System\Glib.hs, dist\build\System\Glib.o
 )
Registering glib-0.12.0...
Installing library in C:\Documents and Settings\dreambook\Application
Data\cabal\glib-0.12.0\ghc-7.0.3
Registering glib-0.12.0...
setup.exe: internal error: unexpected package db stack: [UserPackageDB]
cabal: Error: some packages failed to install:
cairo-0.12.0 failed during the final install step. The exception was:
ExitFailure 1
gio-0.12.0 depends on glib-0.12.0 which failed to install.
glib-0.12.0 failed during the final install step. The exception was:
ExitFailure 1
gtk-0.12.0 depends on glib-0.12.0 which failed to install.
pango-0.12.0 depends on glib-0.12.0 which failed to install.

2 个答案:

答案 0 :(得分:1)

你遇到了Gtk2hsSetup.hs中的一个错误,该错误和解决方法被描述为here.

我建议您在trac上添加自己的故障单,以便在修复程序可用时通知您。

答案 1 :(得分:0)

使用--global选项在全局包目录中安装这些包。 例如:cabal install cairo --global