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

stack build fails due to haddock-library internal dependency on attoparsec #629

Closed
andybp85 opened this issue Mar 27, 2018 · 9 comments
Closed

Comments

@andybp85
Copy link

andybp85 commented Mar 27, 2018

I'm brand new to Haskell (been studying the lang for a few weeks and just got the toolchain setup this weekend) and I can't find anyone talking about this, so I'm guessing (hoping) it's an easy fix. I just haven't found it after a day of googling.

I've been getting myself setup following An opinionated guide to Haskell in 2018.

The build fails on pandoc-2.1.2. Here's the build output:

haddock-library-1.4.5: using precompiled package
pandoc-2.1.2: configure
Progress: 2/5
--  While building custom Setup.hs for package pandoc-2.1.2 using:
      /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack73380/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.0.1.0 configure --with-ghc=/<home-dir>/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc --with-ghc-pkg=<home-dir>/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/pkgdb --libdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/lib --bindir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/bin --datadir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/share --libexecdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/libexec --sysconfdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/etc --docdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/doc/pandoc-2.1.2 --htmldir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/doc/pandoc-2.1.2 --haddockdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/doc/pandoc-2.1.2 --dependency=Cabal=Cabal-2.0.1.1-ARIl7MGNKZFBAH1HVzpC6s --dependency=Glob=Glob-0.9.2-B0gAg5I1EFbLLrqvbBP6OJ --dependency=HTTP=HTTP-4000.3.11-YE11dQWYOOFa9JXNxdpAk --dependency=JuicyPixels=JuicyPixels-3.2.9.5-2XvTMfxs0Kx3BzXC84P9nD --dependency=SHA=SHA-1.6.4.4-1zvOUgVKaQx7KvqAhOzZXy --dependency=aeson=aeson-1.2.4.0-IvrO5GAegP7LjoNPWPphBD --dependency=aeson-pretty=aeson-pretty-0.8.5-CAGtNvV8ERO67GbKnRo8zA --dependency=base=base-4.10.1.0 --dependency=base64-bytestring=base64-bytestring-1.0.0.1-8MlzMz2YH3lCqJ4GOwL1Be --dependency=binary=binary-0.8.5.1 --dependency=blaze-html=blaze-html-0.9.0.1-84OXykbyE0R9ZdEtuaV3w2 --dependency=blaze-markup=blaze-markup-0.8.2.0-BC2OdJZnDet1GkrNw1YfoW --dependency=bytestring=bytestring-0.10.8.2 --dependency=case-insensitive=case-insensitive-1.2.0.11-DieXAizupZnBb7Wfxln47O --dependency=cmark-gfm=cmark-gfm-0.1.3-3bl2x1rGMrBAjjlnaIhlz8 --dependency=containers=containers-0.5.10.2 --dependency=data-default=data-default-0.7.1.1-HxP9sk0JsrKFuLVc9OIluX --dependency=deepseq=deepseq-1.4.3.0 --dependency=directory=directory-1.3.0.2 --dependency=doctemplates=doctemplates-0.2.2.1-2wd0dHkcFRiDt0jNwzeK5M --dependency=exceptions=exceptions-0.8.3-CYMTujxEbkkJnOJ7pW82ZD --dependency=filepath=filepath-1.4.1.2 --dependency=haddock-library=haddock-library-1.4.5-uQdrVGi1uKLD22IlKGc6n --dependency=hslua=hslua-0.9.5.1-Fv25sHNXRkzwPERXS8CKk --dependency=hslua-module-text=hslua-module-text-0.1.2.1-JmGJzWBJCqHCUoB9W3EIif --dependency=http-client=http-client-0.5.11-86kVpwl6JeALblZfYXYlpX --dependency=http-client-tls=http-client-tls-0.3.5.3-8trXIPYzDC4IacljHpIhWF --dependency=http-types=http-types-0.12.1-20NLDWrYorfCy3zUNrIMsI --dependency=mtl=mtl-2.2.2-8XubxMJDT8QLsstvlNotkc --dependency=network=network-2.6.3.4-D6yy3exF2RyArU0wk1GgIu --dependency=network-uri=network-uri-2.6.1.0-EYywkSTD8HiCwSdvhz21Tw --dependency=pandoc-types=pandoc-types-1.17.3.1-EYicLCXgekC3nfPnqZZxIT --dependency=parsec=parsec-3.1.13.0-7jIoWXeUFiXFkcrm3qWsZW --dependency=process=process-1.6.1.0 --dependency=random=random-1.1-LLUGZ7T9DqQ5vN0Jbcd0We --dependency=safe=safe-0.3.17-CBj05uAzpTx4SAsFxDnCju --dependency=scientific=scientific-0.3.5.3-DyALTfRMv7iJ3ZsVF5vJ63 --dependency=skylighting=skylighting-0.6-YsRIiYqgKF8TwwQCmIvLJ --dependency=split=split-0.2.3.3-69JBPqG5rhJEaFzFyiVOGW --dependency=syb=syb-0.7-3Lq8MQxmYP07qktjI1jxu0 --dependency=tagsoup=tagsoup-0.14.6-5zW9hLVTejc6euTmTI8vrY --dependency=temporary=temporary-1.2.1.1-468ctV5wSju4LIYhvyQeLr --dependency=texmath=texmath-0.10.1.1-7ifRuJk7bh3ItEbqGexJqf --dependency=text=text-1.2.3.0-8nD60G3tOYT3Qi8GaESeB5 --dependency=time=time-1.8.0.2 --dependency=unix=unix-2.7.2.2 --dependency=unordered-containers=unordered-containers-0.2.9.0-AID53f8BSxj1wBLxJT9npu --dependency=vector=vector-0.12.0.1-JlawpRjIcMJIYPJVsWriIA --dependency=xml=xml-1.3.14-Kljl530Com7KGsYBJQzfI6 --dependency=yaml=yaml-0.8.28-Lu6PmdQHNnT21AIVcNU3EN --dependency=zip-archive=zip-archive-0.3.2.4-InVWuoq7L4M2cSSNf871XR --dependency=zlib=zlib-0.6.2-7YwI9pUae6uDEuDsJgYPoD -f-old-locale
    Process exited with code: ExitFailure 1
    Logs have been written to: /<project-dir>.stack-work/logs/pandoc-2.1.2.log

    [1 of 2] Compiling Main             ( /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack73380/pandoc-2.1.2/Setup.hs, /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack73380/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/Main.o )
    [2 of 2] Compiling StackSetupShim   ( /<home-dir>/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack73380/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/StackSetupShim.o )
    Linking /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack73380/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup ...
    Configuring pandoc-2.1.2...
    Error:
        The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.
    installed package haddock-library-1.4.5 is broken due to missing package haddock-library-1.4.5-JMywL3gQR7h8vuSGU4Yu5w-attoparsec

I have seen other issues that seem relevant, but I don't really know enough about what's going on to get any further myself. (I'm kinda hoping I just missed the flag I need to pass to stack build in the help output.)

Thanks so much in advance for any help!

@jaspervdj
Copy link
Owner

Does it work when you use an LTS stack, e.g. stack install --resolver lts-11.2 hakyll?

@andybp85
Copy link
Author

andybp85 commented Mar 27, 2018

That command throws the same error:

~/Projects ❯❯❯ stack install --resolver lts-11.2 hakyll
haddock-library-1.4.5: using precompiled package
pandoc-2.1.2: configure
Progress: 2/4
--  While building custom Setup.hs for package pandoc-2.1.2 using:
      /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack74680/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup --builddir=.stack-work/dist/x86_64-osx/Cabal-2.0.1.0 configure --with-ghc=/<home-dir>/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc --with-ghc-pkg=/<home-dir>/.stack/programs/x86_64-osx/ghc-8.2.2/bin/ghc-pkg --user --package-db=clear --package-db=global --package-db=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/pkgdb --libdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/lib --bindir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/bin --datadir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/share --libexecdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/libexec --sysconfdir=/<home-dir>.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/etc --docdir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/doc/pandoc-2.1.2 --htmldir=/<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/doc/pandoc-2.1.2 --haddockdir=<home-dir>/.stack/snapshots/x86_64-osx/lts-11.2/8.2.2/doc/pandoc-2.1.2 --dependency=Cabal=Cabal-2.0.1.1-ARIl7MGNKZFBAH1HVzpC6s --dependency=Glob=Glob-0.9.2-B0gAg5I1EFbLLrqvbBP6OJ --dependency=HTTP=HTTP-4000.3.11-YE11dQWYOOFa9JXNxdpAk --dependency=JuicyPixels=JuicyPixels-3.2.9.5-2XvTMfxs0Kx3BzXC84P9nD --dependency=SHA=SHA-1.6.4.4-1zvOUgVKaQx7KvqAhOzZXy --dependency=aeson=aeson-1.2.4.0-IvrO5GAegP7LjoNPWPphBD --dependency=aeson-pretty=aeson-pretty-0.8.5-CAGtNvV8ERO67GbKnRo8zA --dependency=base=base-4.10.1.0 --dependency=base64-bytestring=base64-bytestring-1.0.0.1-8MlzMz2YH3lCqJ4GOwL1Be --dependency=binary=binary-0.8.5.1 --dependency=blaze-html=blaze-html-0.9.0.1-84OXykbyE0R9ZdEtuaV3w2 --dependency=blaze-markup=blaze-markup-0.8.2.0-BC2OdJZnDet1GkrNw1YfoW --dependency=bytestring=bytestring-0.10.8.2 --dependency=case-insensitive=case-insensitive-1.2.0.11-DieXAizupZnBb7Wfxln47O --dependency=cmark-gfm=cmark-gfm-0.1.3-3bl2x1rGMrBAjjlnaIhlz8 --dependency=containers=containers-0.5.10.2 --dependency=data-default=data-default-0.7.1.1-HxP9sk0JsrKFuLVc9OIluX --dependency=deepseq=deepseq-1.4.3.0 --dependency=directory=directory-1.3.0.2 --dependency=doctemplates=doctemplates-0.2.2.1-2wd0dHkcFRiDt0jNwzeK5M --dependency=exceptions=exceptions-0.8.3-CYMTujxEbkkJnOJ7pW82ZD --dependency=filepath=filepath-1.4.1.2 --dependency=haddock-library=haddock-library-1.4.5-uQdrVGi1uKLD22IlKGc6n --dependency=hslua=hslua-0.9.5.1-Fv25sHNXRkzwPERXS8CKk --dependency=hslua-module-text=hslua-module-text-0.1.2.1-JmGJzWBJCqHCUoB9W3EIif --dependency=http-client=http-client-0.5.11-86kVpwl6JeALblZfYXYlpX --dependency=http-client-tls=http-client-tls-0.3.5.3-8trXIPYzDC4IacljHpIhWF --dependency=http-types=http-types-0.12.1-20NLDWrYorfCy3zUNrIMsI --dependency=mtl=mtl-2.2.2-8XubxMJDT8QLsstvlNotkc --dependency=network=network-2.6.3.4-D6yy3exF2RyArU0wk1GgIu --dependency=network-uri=network-uri-2.6.1.0-EYywkSTD8HiCwSdvhz21Tw --dependency=pandoc-types=pandoc-types-1.17.3.1-EYicLCXgekC3nfPnqZZxIT --dependency=parsec=parsec-3.1.13.0-7jIoWXeUFiXFkcrm3qWsZW --dependency=process=process-1.6.1.0 --dependency=random=random-1.1-LLUGZ7T9DqQ5vN0Jbcd0We --dependency=safe=safe-0.3.17-CBj05uAzpTx4SAsFxDnCju --dependency=scientific=scientific-0.3.5.3-DyALTfRMv7iJ3ZsVF5vJ63 --dependency=skylighting=skylighting-0.6-YsRIiYqgKF8TwwQCmIvLJ --dependency=split=split-0.2.3.3-69JBPqG5rhJEaFzFyiVOGW --dependency=syb=syb-0.7-3Lq8MQxmYP07qktjI1jxu0 --dependency=tagsoup=tagsoup-0.14.6-5zW9hLVTejc6euTmTI8vrY --dependency=temporary=temporary-1.2.1.1-468ctV5wSju4LIYhvyQeLr --dependency=texmath=texmath-0.10.1.1-7ifRuJk7bh3ItEbqGexJqf --dependency=text=text-1.2.3.0-8nD60G3tOYT3Qi8GaESeB5 --dependency=time=time-1.8.0.2 --dependency=unix=unix-2.7.2.2 --dependency=unordered-containers=unordered-containers-0.2.9.0-AID53f8BSxj1wBLxJT9npu --dependency=vector=vector-0.12.0.1-JlawpRjIcMJIYPJVsWriIA --dependency=xml=xml-1.3.14-Kljl530Com7KGsYBJQzfI6 --dependency=yaml=yaml-0.8.28-Lu6PmdQHNnT21AIVcNU3EN --dependency=zip-archive=zip-archive-0.3.2.4-InVWuoq7L4M2cSSNf871XR --dependency=zlib=zlib-0.6.2-7YwI9pUae6uDEuDsJgYPoD -f-old-locale
    Process exited with code: ExitFailure 1
    Logs have been written to: /<home-dir>/.stack/global-project/.stack-work/logs/pandoc-2.1.2.log

    [1 of 2] Compiling Main             ( /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack74680/pandoc-2.1.2/Setup.hs, /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack74680/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/Main.o )
    [2 of 2] Compiling StackSetupShim   ( /<home-dir>/.stack/setup-exe-src/setup-shim-mPHDZzAJ.hs, /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack74680/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/StackSetupShim.o )
    Linking /private/var/folders/ng/q9hd78_d6vdf0cr0zt6__9c40000gn/T/stack74680/pandoc-2.1.2/.stack-work/dist/x86_64-osx/Cabal-2.0.1.0/setup/setup ...
    Configuring pandoc-2.1.2...
    Error:
        The following packages are broken because other packages they depend on are missing. These broken packages must be rebuilt before they can be used.
    installed package haddock-library-1.4.5 is broken due to missing package haddock-library-1.4.5-JMywL3gQR7h8vuSGU4Yu5w-attoparsec

Not sure if it matters but I have Hakyll installed on my current stack; I saw the error first when running stack build after creating a project with haykll-init <proj>.

@andybp85
Copy link
Author

Okay I think this is a local problem for me, I received these instructions in the #haskell-beginner channel on the functional programming slack channel and I was able to install:

# move ~/.stack somewhere
stack new my-project
cd my-project
stack install hakyll
stack exec hakyll-init -- -f .
cp site.hs app/Main.hs
# now add hakyll to the dependencies in cabal file or package.yaml (someone can walk you through this on the beginner channel

Thanks much!

@byorgey
Copy link
Contributor

byorgey commented May 21, 2018

Just leaving a comment to note that I am getting the exact same error, but I doubt it is the fault of hakyll so I will leave this issue closed. I will post another comment if I learn anything more.

@jaspervdj
Copy link
Owner

@byorgey I think this has been fixed in recent stack versions, see commercialhaskell/stack#3899

@byorgey
Copy link
Contributor

byorgey commented May 21, 2018

@jaspervdj Thanks for the link. But I'm using stack-1.7.1 which as far as I can tell should include the fixes you linked to there. According to bitemyapp in #haskell-stack this is fixed in the HEAD version of stack but not released yet.

@tallpeak
Copy link

tallpeak commented May 22, 2018

This works: stack install pandoc --resolver=lts-11.9
This doesnt: stack install pandoc --resolver=lts-11.10 ( "...installed package haddock-library-1.4.5 is broken due to missing package haddock-library-1.4.5-JMywL3gQR7h8vuSGU4Yu5w-attoparsec")
Windows 10, stack 1.7.1, ghc 8.2.2

(I suppose pandoc may be off-topic, but I'm wondering if there are some stackage versions with broken packages?)

@nurpax
Copy link

nurpax commented May 29, 2018

lts-11.9 resolver worked for me too. Had this exact same problem with lts-11.11.

@timokratia
Copy link

timokratia commented May 29, 2018

I managed to build hakyll according to the suggestion 1 bitemyapp gave to byorgey, which is found here. Specifically, I edited the stack.yaml as follows:

resolver: lts-11.4

packages:
- .
- location:
    git: https://github.com/st3ll1s/haddock/
    commit: b3912d70f74b0693f1ea8cffb8f547b1303ef325
  subdirs:
    - haddock-library
  extra-dep: true

extra-deps:
- pandoc-2.1.3
- pandoc-types-1.17.4.2

Would also like to add that, which might be unrelated, on mac I reinstalled stack using stack upgrade --force-download to replace the one installed by Homebrew before successfully building hakyll, due to a message saying

Warning: this is an unsupported build that may use different versions of
dependencies and GHC than the officially released binaries...

when I stack --version. I was able to build using the above-mentioned config after reinstalling stack.

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

6 participants