real world haskell - chapter 23 how to install gtk and glade -


i working way through book real world haskell, far found way adapt code snippets make them run time stuck.

i have install gtk , glade bindings in order run gui example in chapter 23.

this have done:

~/prog/haskell/realworldhaskell/chapter23 $ cabal sanbox init ~/prog/haskell/realworldhaskell/chapter23 $ cabal install gtk2hs-buildtools ~/prog/haskell/realworldhaskell/chapter23 $ cabal install gtk 

which worked, when did:

~/prog/haskell/realworldhaskell/chapter23 $ cabal install glade 

i get:

resolving dependencies... notice: installing sandbox located @ /home/fayong/prog/haskell/realworldhaskell/chapter23/.cabal-sandbox configuring utf8-string-0.3.8... building utf8-string-0.3.8... installed utf8-string-0.3.8 configuring cairo-0.12.5.3... configuring glib-0.12.5.4... failed install cairo-0.12.5.3 build log ( /home/fayong/prog/haskell/realworldhaskell/chapter23/.cabal-sandbox/logs/cairo-0.12.5.3.log ): [1 of 2] compiling setupwrapper     ( /tmp/cairo-0.12.5.3-13890/cairo-0.12.5.3/setupwrapper.hs, /tmp/cairo-0.12.5.3-13890/cairo-0.12.5.3/dist/dist-sandbox-96c39190/setup/setupwrapper.o ) [2 of 2] compiling main             ( /tmp/cairo-0.12.5.3-13890/cairo-0.12.5.3/dist/dist-sandbox-96c39190/setup/setup.hs, /tmp/cairo-0.12.5.3-13890/cairo-0.12.5.3/dist/dist-sandbox-96c39190/setup/main.o ) linking /tmp/cairo-0.12.5.3-13890/cairo-0.12.5.3/dist/dist-sandbox-96c39190/setup/setup ... [1 of 2] compiling gtk2hssetup      ( gtk2hssetup.hs, dist/setup-wrapper/gtk2hssetup.o )  gtk2hssetup.hs:169:28:     couldn't match expected type `io                                     (distribution.installedpackageinfo.installedpackageinfo_                                        modulename)'                 actual type `filepath                                   -> packagedb                                   -> io distribution.installedpackageinfo.installedpackageinfo'     in return type of call of `generateregistrationinfo'     probable cause: `generateregistrationinfo' applied few arguments     in stmt of 'do' block:       installedpkginforaw <- generateregistrationinfo                                verbosity pkg lib lbi clbi inplace distpref     in expression:       { installedpkginforaw <- generateregistrationinfo                                     verbosity pkg lib lbi clbi inplace distpref;            dllsinscope <- getsearchpath >>= (filterm doesdirectoryexist)                           >>= getdlls;            let libs = fixlibs dllsinscope (extralibraries installedpkginforaw)                installedpkginfo = ...;            case () of {              _ | modegenerateregfile -> die "generate reg file not supported"                | modegenerateregscript -> die "generate reg script not supported"                | otherwise                -> registerpackage                     verbosity installedpkginfo pkg lbi inplace packagedbs } }  gtk2hssetup.hs:170:63:     couldn't match type `[char]' `bool'     expected type: bool       actual type: filepath     in 7th argument of `generateregistrationinfo', namely       `distpref'     in stmt of 'do' block:       installedpkginforaw <- generateregistrationinfo                                verbosity pkg lib lbi clbi inplace distpref     in expression:       { installedpkginforaw <- generateregistrationinfo                                     verbosity pkg lib lbi clbi inplace distpref;            dllsinscope <- getsearchpath >>= (filterm doesdirectoryexist)                           >>= getdlls;            let libs = fixlibs dllsinscope (extralibraries installedpkginforaw)                installedpkginfo = ...;            case () of {              _ | modegenerateregfile -> die "generate reg file not supported"                | modegenerateregscript -> die "generate reg script not supported"                | otherwise                -> registerpackage                     verbosity installedpkginfo pkg lbi inplace packagedbs } } failed install glib-0.12.5.4 build log ( /home/fayong/prog/haskell/realworldhaskell/chapter23/.cabal-sandbox/logs/glib-0.12.5.4.log ): [1 of 2] compiling setupwrapper     ( /tmp/glib-0.12.5.4-13890/glib-0.12.5.4/setupwrapper.hs, /tmp/glib-0.12.5.4-13890/glib-0.12.5.4/dist/dist-sandbox-96c39190/setup/setupwrapper.o ) [2 of 2] compiling main             ( /tmp/glib-0.12.5.4-13890/glib-0.12.5.4/dist/dist-sandbox-96c39190/setup/setup.hs, /tmp/glib-0.12.5.4-13890/glib-0.12.5.4/dist/dist-sandbox-96c39190/setup/main.o ) linking /tmp/glib-0.12.5.4-13890/glib-0.12.5.4/dist/dist-sandbox-96c39190/setup/setup ... [1 of 2] compiling gtk2hssetup      ( gtk2hssetup.hs, dist/setup-wrapper/gtk2hssetup.o )  gtk2hssetup.hs:161:28:     couldn't match expected type `io                                     (distribution.installedpackageinfo.installedpackageinfo_                                        modulename)'                 actual type `filepath                                   -> packagedb                                   -> io distribution.installedpackageinfo.installedpackageinfo'     in return type of call of `generateregistrationinfo'     probable cause: `generateregistrationinfo' applied few arguments     in stmt of 'do' block:       installedpkginforaw <- generateregistrationinfo                                verbosity pkg lib lbi clbi inplace distpref     in expression:       { installedpkginforaw <- generateregistrationinfo                                     verbosity pkg lib lbi clbi inplace distpref;            dllsinscope <- getsearchpath >>= (filterm doesdirectoryexist)                           >>= getdlls;            let libs = fixlibs dllsinscope (extralibraries installedpkginforaw)                installedpkginfo = ...;            case () of {              _ | modegenerateregfile -> die "generate reg file not supported"                | modegenerateregscript -> die "generate reg script not supported"                | otherwise                -> registerpackage                     verbosity installedpkginfo pkg lbi inplace packagedbs } }  gtk2hssetup.hs:162:63:     couldn't match type `[char]' `bool'     expected type: bool       actual type: filepath     in 7th argument of `generateregistrationinfo', namely       `distpref'     in stmt of 'do' block:       installedpkginforaw <- generateregistrationinfo                                verbosity pkg lib lbi clbi inplace distpref     in expression:       { installedpkginforaw <- generateregistrationinfo                                     verbosity pkg lib lbi clbi inplace distpref;            dllsinscope <- getsearchpath >>= (filterm doesdirectoryexist)                           >>= getdlls;            let libs = fixlibs dllsinscope (extralibraries installedpkginforaw)                installedpkginfo = ...;            case () of {              _ | modegenerateregfile -> die "generate reg file not supported"                | modegenerateregscript -> die "generate reg script not supported"                | otherwise                -> registerpackage                     verbosity installedpkginfo pkg lbi inplace packagedbs } } cabal: error: packages failed install: cairo-0.12.5.3 failed during configure step. exception was: exitfailure 1 gio-0.12.5.3 depends on glib-0.12.5.4 failed install. glade-0.12.5.0 depends on glib-0.12.5.4 failed install. glib-0.12.5.4 failed during configure step. exception was: exitfailure 1 gtk-0.12.5.7 depends on glib-0.12.5.4 failed install. pango-0.12.5.3 depends on glib-0.12.5.4 failed install. 

i doing wrong? quite new haskell , cabal (and programing in general)

i using ghc 7.6.3 , cabal 1.22.3.0


Comments

Popular posts from this blog

angularjs - ADAL JS Angular- WebAPI add a new role claim to the token -

php - CakePHP HttpSockets send array of paramms -

node.js - Using Node without global install -