Help resolving stack build plan error

I’m looking for help in resolving this error:


<span style="color:#323232;">$ stack install pandoc-cli
</span><span style="color:#323232;">Error: [S-4804]
</span><span style="color:#323232;">       Stack failed to construct a build plan.
</span><span style="color:#323232;">       
</span><span style="color:#323232;">       While constructing the build plan, Stack encountered the following errors:
</span><span style="color:#323232;">       
</span><span style="color:#323232;">       In the dependencies for pandoc-cli-0.1.1.1:
</span><span style="color:#323232;">           hslua-cli must match >=1.4.1 &amp;&amp; &lt;1.5, but the Stack configuration has no specified
</span><span style="color:#323232;">                     version (latest matching version is 1.4.1)
</span><span style="color:#323232;">           pandoc-lua-engine must match >=0.2 &amp;&amp; &lt;0.3, but the Stack configuration has no specified
</span><span style="color:#323232;">                             version (latest matching version is 0.2.1.1)
</span><span style="color:#323232;">           pandoc-server must match >=0.1 &amp;&amp; &lt;0.2, but the Stack configuration has no specified
</span><span style="color:#323232;">                         version (latest matching version is 0.1.0.2)
</span><span style="color:#323232;">       needed since pandoc-cli is a build target.
</span>

Clearly, stack is having issues understanding version numbers. Best I can tell, stack has the pieces to form a build plan but its logic for building a plan is broken.

I installed stack via curl -sSL https://get.haskellstack.org/ | sh, as described in the documentation. The only clue that something went wrong when installing stack was the message:


<span style="color:#323232;">$ stack setup
</span><span style="color:#323232;">…
</span><span style="color:#323232;">Using the latest snapshot lts-21.7.
</span><span style="color:#323232;">…
</span><span style="color:#323232;">Downloaded ghc-tinfo6-9.4.5
</span><span style="color:#323232;">ar conftest.a: No such file or directory
</span><span style="color:#323232;">Installed GHC.
</span><span style="color:#323232;">…
</span><span style="color:#323232;">
</span><span style="color:#323232;">$ echo $? # verify success—should be 0
</span><span style="color:#323232;">0
</span><span style="color:#323232;">
</span>

I tried this on two systems and got the same error. I also tried compiling stack from GitHub source—that didn’t help.

I am not well-versed in the Haskell ecosystem would appreciate some pointers on how to resolve this issue. Or pointers on where to get help.

And apologies if this off-topic for this group. Just let me know.

Thanks!

bss03,

Using a stack resolver pins all the packages in that resolver to specific versions, but pandoc-cli depends on newer versions than are available in your reoslver (lts-21.7). You might try using a newer resolver (maybe a nightly?), or using “extra-deps” to add package versions to your resolver.

Alternatively, I use cabal to install things rather than stack.

Finally, if you just want to use pandoc from the command-line, you might look for pandoc packages provided by your distribution. Often Haskell programs are distributed statically linked, at least for Haskell library dependencies, and using such a binary distribution would avoid having to (re)resolve the dependencies on your local system.

HTH

  • All
  • Subscribed
  • Moderated
  • Favorites
  • haskell@lemmy.ml
  • GTA5RPClips
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • tacticalgear
  • cubers
  • Youngstown
  • mdbf
  • slotface
  • rosin
  • osvaldo12
  • ngwrru68w68
  • kavyap
  • InstantRegret
  • JUstTest
  • everett
  • Durango
  • cisconetworking
  • khanakhh
  • ethstaker
  • tester
  • anitta
  • Leos
  • normalnudes
  • modclub
  • megavids
  • provamag3
  • lostlight
  • All magazines