I am attempting to use pandoc to convert an HTML file to a MediaWiki format. I'm getting the following error. (It is a large file, so it wouldn't surprise me if this is the issue.)
I have googled the error message, but no results I could find seemed sensible/understandable.
pandoc run_faster.html -f html -t mediawiki -s -o run_faster.txt
Stack space overflow: current size 16777216 bytes.
Use `+RTS -Ksize -RTS' to increase it.
What exactly is causing the problem, and how do I fix it?
pandoc +RTS -K100000000 -RTS run_faster.html -f html -t mediawiki -s -o run_faster.txt
A bit of Googling suggests that pandoc needs to compiled with RTS options enabled for this solution to work:cabal install --ghc-options=-rtsopts=all
+RTS -Ksize -RTS
andcabal install --gch-options=-rtsopts=all
. I don't understand what either is doing. Note that I use Ubuntu 14.04. @MikeFitzpatrick+RTS -K100000000 -RTS
into your command at the position I've suggested in my first comment. This will increase pandoc's stack size from 16777216 bytes to 100000000 bytes iff your copy of pandoc supportsrstopts
and this will hopefully sidestep your stack size issue. If you get the same error try increasing the stack size further. If you get a different error then your copy of pandoc might not have been compiled with--ghc-options=-rtsopts=all