haskell - Building project dependent on gtk2hs fails on lts-7.8 and later -
building project dependent on glib fails on lts-7.8 , later after cabal becomes 1.24.1.0.
steps reproduce
add glib project's .cabal file
build-depends: base , gtktest , glib
run following commands
stack install gtk2hs-buildtools stack build
result
the following error occurred
... [debug] ignoring package cabal due wanting version 1.24.1.0 instead of 1.24.0.0 @(stack\build\installed.hs:196:5) ... -- while building package glib-0.13.4.1 using: c:\users\foo\appdata\local\programs\stack\x86_64-windows\ghc-8.0.1\bin\ghc.exe --make -odir c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\.stack-work\dist\b7fec021\setup -hidir c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\.stack-work\dist\b7fec021\setup -i -i. -package=cabal-1.24.0.0 -clear-package-db -global-package-db -package-db=c:\sr\snapshots\a78c6a89\pkgdb c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\setup.hs -o c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\.stack-work\dist\b7fec021\setup\setup process exited code: exitfailure 1 logs have been written to: c:\users\foo\documents\files\haskell\gtktest\.stack-work\logs\glib-0.13.4.1.log [1 of 1] compiling main ( c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\setup.hs, c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\.stack-work\dist\b7fec021\setup\main.o ) c:\users\foo\appdata\local\temp\stack5512\glib-0.13.4.1\setup.hs:8:29: error: couldn't match expected type ‘distribution.simple.userhooks.userhooks’ actual type ‘cabal-1.24.1.0:distribution.simple.userhooks.userhooks’ nb: cabal-1.24.1.0:distribution.simple.userhooks.userhooks’ defined in ‘distribution.simple.userhooks’ in package ‘cabal-1.24.1.0’ ‘distribution.simple.userhooks.userhooks’ defined in ‘distribution.simple.userhooks’ in package ‘cabal-1.24.0.0’ in first argument of ‘defaultmainwithhooks’, namely gtk2hsuserhooks’ in expression: defaultmainwithhooks gtk2hsuserhooks in equation ‘main’: main = defaultmainwithhooks gtk2hsuserhooks
i thought cabal-1.24.0.0 in ghc-8.0.1 global package causing problems, , succeeded building after installing cabal-1.24.1.0 in ghc 's global package.
however, method difficult beginners , not think right solution. how correct way solve it?
stack version
version 1.2.0, git revision 123819b7d65df2ad7fe63fb5eb39a98536acb5f3 (4055 commits) x86_64 hpack-0.14.0
Comments
Post a Comment