John Macfarlane released a new version of Pandoc that has a lot of new enhancements. A lot of things have changed in the Markdown input types and it’s now compatible with PHP Markdown. This is very nice, because a lot of implementations use the extensions defined by PHP Markdown.
I downloaded the dmg file to install it on my MacBook Pro and it works like a charm.
So, I decided to install it on my new CentOS 6 server to build documents there. Well, I was in for a nice surprise.
After cloning the source from github I started as documented in the INSTALL
file
make prep
and now I get
Resolving dependencies...
cabal: cannot configure directory-1.1.0.0. It requires old-time ==1.0.*
For the dependency on old-time ==1.0.* there are these packages:
old-time-1.0.0.0, old-time-1.0.0.2, old-time-1.0.0.3, old-time-1.0.0.4,
old-time-1.0.0.5, old-time-1.0.0.6 and old-time-1.0.0.7.
However none of them are available.
old-time-1.0.0.0 was excluded because pandoc-1.10.0.5 requires old-time ==1.1.*
old-time-1.0.0.7 was excluded because pandoc-1.10.0.5 requires old-time ==1.1.*
etc.
I kept tweaking the makefile and tried almost everything possible, but I was caught in a cyclic dependency loop. So, time to rethink and use Google.
I had already figured out it had to do with a cabal
and ghc
version
that are to old, so it’s time to update.
I found newer Cabal versions at JustHub.
I started removing every RPM with haskel
or ghc
in the name and
removed ~/.cabal
and ~/.ghc
directories to start of fresh. Then:
sudo rpm -Uhv
http://sherkin.justhub.org/el6/RPMS/x86_64/justhub-release-2.0-4.0.el6.x86_64.rpm
export PATH=/usr/hs/bin:~/.cabal/bin:$PATH
cabal install cabal-dev
cd ~/pandoc
make prep
.
.
Now it compiles but it breaks with:
make install
cabal-0.14.0: Error: some packages failed to install:
pandoc-1.10.0.5 failed during the tests phase. The exception was:
ExitFailure 1
cabal --config-file=/home/tonk/qq/pandoc/cabal-dev/cabal.config:
/usr/hs/tools/cabal-0.14.0 failure (return code=1)
make: *** [install] Error 1
Some tests fail, but I just removed --enable-tests
from the
Makefile
and I got a working executable. Simply copy it to the
~/.cabal/bin
directory, install the man-page and everything is
fine.
I think it should be simpler, but for now I’m a happy camper.