Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom builds failing (in particular, one depending on superdoc) #1663

Closed
braje opened this issue Jan 16, 2016 · 3 comments
Closed

Custom builds failing (in particular, one depending on superdoc) #1663

braje opened this issue Jan 16, 2016 · 3 comments
Milestone

Comments

@braje
Copy link

braje commented Jan 16, 2016

I am trying to use a project that depends on something that is built with a custom build that leverages a project called superdoc. It is basically a project to augment the allowed markup within haddock blocks. Currently, this project (easyrender) is built using cabal, as is superdoc. But, I don't think that is the relevant problem, and I have created what I believe to be a minimal example. For reference - if you download superdoc, put in a stack.yaml with a few extra-dependencies, then it builds just fine, even though it uses itself to bootstrap its own custom build. So, I believe this is only an issue if you are trying to use a custom build script that is a dependency.

Steps to reproduce:

  1. Download https://github.com/braje/stack-broken-custom-build
  2. stack build (doesn't work)
  3. edit Setup.hs to use normal default build
  4. stack build (works fine)
$ stack --version
Version 1.0.0, Git revision 3bc26237b5b3c387b8fd564459ea4dd88fd58b30 (2939 commits) x86_64
$ stack build --verbose

Version 1.0.0, Git revision 3bc26237b5b3c387b8fd564459ea4dd88fd58b30 (2939 commits) x86_64
2016-01-15 21:56:50.900176: [debug] Checking for project config at: /home/tbraje/dev/stack-broken-custom-build/stack.yaml @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Config src/Stack/Config.hs:577:9)
2016-01-15 21:56:50.900581: [debug] Loading project config file stack.yaml @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Config src/Stack/Config.hs:600:13)
2016-01-15 21:56:50.942917: [debug] Run process: ldd /usr/bin/stack @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:50.963260: [debug] Trying to decode /home/tbraje/.stack/build-plan-cache/x86_64-linux/lts-4.1.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-15 21:56:50.997004: [debug] Success decoding /home/tbraje/.stack/build-plan-cache/x86_64-linux/lts-4.1.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-15 21:56:50.998243: [debug] Trying to decode /home/tbraje/.stack/indices/Hackage/00-index.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-15 21:56:51.325651: [debug] Success decoding /home/tbraje/.stack/indices/Hackage/00-index.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-15 21:56:51.340244: [debug] Run process: ghc --numeric-version @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.366211: [debug] Run process: ghc-pkg --no-user-package-db field --simple-output Cabal version @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.384638: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.402973: [debug] Run process: locale -a @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.404998: [debug] Checking resolver: lts-4.1 @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Source src/Stack/Build/Source.hs:164:17)
2016-01-15 21:56:51.405120: [debug] Trying to decode /home/tbraje/.stack/build-plan-cache/x86_64-linux/lts-4.1.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-15 21:56:51.414518: [debug] Success decoding /home/tbraje/.stack/build-plan-cache/x86_64-linux/lts-4.1.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-15 21:56:51.416922: [debug] Run process: ghc-pkg --global --no-user-package-db dump --expand-pkgroot @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.455035: [debug] Ignoring package haskeline due to wanting version 0.7.2.2 instead of 0.7.2.1 @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-01-15 21:56:51.455207: [debug] Ignoring package terminfo due to wanting version 0.4.0.2 instead of 0.4.0.1 @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-01-15 21:56:51.455329: [debug] Ignoring package Cabal due to wanting version 1.22.6.0 instead of 1.22.5.0 @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Installed src/Stack/Build/Installed.hs:189:5)
2016-01-15 21:56:51.455953: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/tbraje/.stack/snapshots/x86_64-linux/lts-4.1/7.10.3/pkgdb dump --expand-pkgroot @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.476024: [debug] Run process: ghc-pkg --user --no-user-package-db --package-db /home/tbraje/dev/stack-broken-custom-build/.stack-work/install/x86_64-linux/lts-4.1/7.10.3/pkgdb dump --expand-pkgroot @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:51.495267: [debug] Trying to decode /home/tbraje/.stack/indices/Hackage/00-index.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:55:5)
2016-01-15 21:56:51.753774: [debug] Success decoding /home/tbraje/.stack/indices/Hackage/00-index.cache @(stack_Jo7PUTL0uTIFJF98jKr0KI:Data.Binary.VersionTagged src/Data/Binary/VersionTagged.hs:64:13)
2016-01-15 21:56:51.989166: [debug] Run process: ghc-pkg --no-user-package-db list --global @(stack_Jo7PUTL0uTIFJF98jKr0KI:System.Process.Read src/System/Process/Read.hs:267:3)
2016-01-15 21:56:52.027795: [info] custom-build-0.0.1: configure @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Execute src/Stack/Build/Execute.hs:668:23)
2016-01-15 21:56:52.028506: [debug] Run process: /home/tbraje/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --make -odir /home/tbraje/dev/stack-broken-custom-build/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup -hidir /home/tbraje/dev/stack-broken-custom-build/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup -i -i. -package=Cabal-1.22.5.0 -clear-package-db -global-package-db -package-db=/home/tbraje/.stack/snapshots/x86_64-linux/lts-4.1/7.10.3/pkgdb /home/tbraje/dev/stack-broken-custom-build/Setup.hs -o /home/tbraje/dev/stack-broken-custom-build/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Execute src/Stack/Build/Execute.hs:812:21)
2016-01-15 21:56:52.109489: [warn]  @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Execute src/Stack/Build/Execute.hs:1338:35)
2016-01-15 21:56:52.131737: [warn] /home/tbraje/dev/stack-broken-custom-build/Setup.hs:1:8: @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Execute src/Stack/Build/Execute.hs:1338:35)
2016-01-15 21:56:52.132145: [warn]     Could not find module ‘Distribution.Superdoc’ @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Execute src/Stack/Build/Execute.hs:1338:35)
2016-01-15 21:56:52.132213: [warn]     Use -v to see a list of the files searched for. @(stack_Jo7PUTL0uTIFJF98jKr0KI:Stack.Build.Execute src/Stack/Build/Execute.hs:1338:35)

--  While building package custom-build-0.0.1 using:
      /home/tbraje/.stack/programs/x86_64-linux/ghc-7.10.3/bin/ghc --make -odir /home/tbraje/dev/stack-broken-custom-build/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup -hidir /home/tbraje/dev/stack-broken-custom-build/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup -i -i. -package=Cabal-1.22.5.0 -clear-package-db -global-package-db -package-db=/home/tbraje/.stack/snapshots/x86_64-linux/lts-4.1/7.10.3/pkgdb /home/tbraje/dev/stack-broken-custom-build/Setup.hs -o /home/tbraje/dev/stack-broken-custom-build/.stack-work/dist/x86_64-linux/Cabal-1.22.5.0/setup/setup
    Process exited with code: ExitFailure 1
@mgsloan
Copy link
Contributor

mgsloan commented Jan 17, 2016

Hi, thanks for the report and repro! Once Cabal-1.24 is out, the proper way to resolve this will be haskell/cabal#948 . For now, you will need to use

explicit-setup-deps:
  custom-build: true

In your stack.yaml. See #1110 for more info on this, and why it isn't on by default. Here are the docs for explicit-setup-deps

In this case, the reason that this is necessary is because extra-deps are currently treated similarly as local packages, and are installed to the local database. Another way this will be fixed is by unifying extra-deps and snapshots - #1265 .

@mgsloan mgsloan closed this as completed Jan 17, 2016
@mgsloan mgsloan added this to the Support milestone Jan 17, 2016
@braje
Copy link
Author

braje commented Jan 20, 2016

@mgsloan -- thank you. That worked perfectly.

@agreif
Copy link
Contributor

agreif commented Sep 6, 2016

@mgsloan -- thanks, this solved my problem too with

explicit-setup-deps:
  "*": true

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants