-
Notifications
You must be signed in to change notification settings - Fork 847
Closed
Description
General summary
Building project dependent on glib fails on lts-7.8 and later after Cabal becomes 1.24.1.0.
Steps to reproduce
- Add glib to a project's .cabal file
('gtktest' is the project name.)
build-depends: base
, gtktest
, glib
- Run following commands
stack install gtk2hs-buildtools
stack build
Expected
I expected that the build will succeed.
Actual
The following error occurred
verbose : failure.txt
...
2016-11-17 22:07:54.899952: [debug] Getting Cabal package version
@(Stack\GhcPkg.hs:171:5)
2016-11-17 22:07:54.900952: [debug] Run process: C:\Users\foo\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.1\bin\ghc-pkg.EXE --no-user-package-db field --simple-output Cabal version
@(System\Process\Read.hs:277:3)
2016-11-17 22:07:54.900952: [debug] Getting global package database location
@(Stack\GhcPkg.hs:54:5)
...
[debug] Ignoring package Cabal due to 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 with 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’
with actual type ‘Cabal-1.24.1.0:Distribution.Simple.UserHooks.UserHooks’
NB: ‘Cabal-1.24.1.0:Distribution.Simple.UserHooks.UserHooks’
is defined in ‘Distribution.Simple.UserHooks’
in package ‘Cabal-1.24.1.0’
‘Distribution.Simple.UserHooks.UserHooks’
is defined in ‘Distribution.Simple.UserHooks’
in package ‘Cabal-1.24.0.0’
窶「 In the first argument of ‘defaultMainWithHooks’, namely
‘gtk2hsUserHooks’
In the expression: defaultMainWithHooks gtk2hsUserHooks
In an equation for ‘main’:
main = defaultMainWithHooks gtk2hsUserHooks
I thought that Cabal-1.24.0.0 in the ghc-8.0.1 global package was causing problems, and succeeded building it after installing Cabal-1.24.1.0 in ghc 's global package .
stack exec -- ghc-pkg update [Cabal-1.24.1.0.conf]
C:\Users\foo\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.1\lib\package.conf.d
Cabal-1.24.1.0
...
verbose : success.txt
Stack version
Version 1.2.0, Git revision 123819b7d65df2ad7fe63fb5eb39a98536acb5f3 (4055 commits) x86_64 hpack-0.14.0
Method of installation
- Official binary, downloaded from stackage.org or fpcomplete's package repository
(Windows 64-bit Installer)
balajirrao, sid-kap, adamse, DanielSchuessler, SheldonNico and 3 more
Metadata
Metadata
Assignees
Labels
No labels