ReScience-submission
ReScience-submission copied to clipboard
Unable to install pandoc-crossref that's required by the Makefile
Hiya,
I've been trying to install pandoc-crossref that's required by the makefile, but I can't seem to get it to work somehow. I've also filed a ticket upstream, but they're not quite sure what's happening either.
This is a Fedora 26 system here. Anyone else seeing this?
I'm not sure either what is the problem here. Note that if you intend to make a submission, it is not absolutely necessary to have crossref since your paper can be later compiled by the editor. This would mean temporarily removing references in the paper (such that you can compile) and add them at the time of submission. Hopefully, the editor will be able to compile it for you.
Anyone experienced such installation problem ?
Note also that the current build is failing at pandoc-crossref: https://github.com/lierdakil/pandoc-crossref
This might be related. Maybe you can try to install a less recent version.
Current build's fine, it's just CI being uncooperative.
P.S. In any case, hackage-published packages are definitely fine https://matrix.hackage.haskell.org/package/pandoc-crossref
@lierdakil Thanks. @sanjayankur31 Did you make any progress with your installation problem ?
None yet. I get the same issue on three different Fedora 26 installations. I'll ask the Fedora haskell folks for help.
Same issue on my side. The pandoc-fignos
etc filters work very well (we use it in our own preprint engine), in case there are issues with pandoc-crossref
.
@tpoisoit You mean you cannot install the pandoc-crossref ?
Yes -- tried with the ghc devel stack too, and no luck.
A slighty roundabout way to get these binaries is ... via RStudio for your system/distro. I get both server and desktop, and most systems should at least get the desktop. It will be in there:
$ dpkg -L rstudio-server|grep pandoc
/usr/lib/rstudio-server/bin/pandoc
/usr/lib/rstudio-server/bin/pandoc/pandoc-citeproc
/usr/lib/rstudio-server/bin/pandoc/pandoc
$ dpkg -L rstudio|grep pandoc
/usr/lib/rstudio/bin/pandoc
/usr/lib/rstudio/bin/pandoc/pandoc-citeproc
/usr/lib/rstudio/bin/pandoc/pandoc
$
On a Fedora system, one needs to install the ghc-pandoc-devel
package. Then cabal install pandoc-crossref
works as expected. On other distributions, one will have to install whatever package is similar to ghc-pandoc-devel
on Fedora I'd think. (No clue about the ghc devel stack I'm afraid)
Or, of course, use the binary:
$ COLUMNS=90 dpkg -l | grep pandoc
ii libghc-pandoc-ci 0.10.2.2-1bui all Pandoc support for Citation Style Lang
ii pandoc 1.17.2~dfsg-3 amd64 general markup converter
ii pandoc-citeproc 0.10.2.2-1bui amd64 Pandoc support for Citation Style Lang
ii pandoc-data 1.17.2~dfsg-3 all general markup converter - data files
$
But some people run (for reason I fail to grasp) outdated versions of their distro and then the RStudio trick can help (as the pandoc*
binaries are statically linked).
The pandoc-crossref
package isn't available as a binary in the Fedora repositories. so one must install it using cabal install
. Note that the problem wasn't pandoc itself, it was the pandoc-crossref
bit only.
@sanjayankur31 this is not working for me (on F26)
@eddelbuettel, you're apparently confusing pandoc-citeproc and pandoc-crossref. I know names are similar, but latter isn't universally available in binary distros. I think only Arch, NixOS and Gentoo have it easily-available.
@tpoisot, make sure to clean up the mess that's left after previous attempt. If you used sandbox, delete it and create a new one (cabal sandbox delete; cabal sandbox init
). If you didn't, I think removing/renaming $HOME/.ghc
and $HOME/.cabal
should do the trick.
FWIW I also provide pre-built executables on GitHub releases page, which apparently work on FC26.
@lierdakil Indeed. And RStudio doesn't ship it either. I'll crawl back under my rock then.
[ Now, the pandoc complex has a (apparently well-earned) reputation for being hard to build. Maybe an easier way to get binaries across would get. Maybe a Docker container for ReScience ? ]
Okay, so with relation to this issue, further investigation shows you don't have to get ghc-pandoc-devel
actually (although it will save quite a few CPU cycles in compilation if you have that).
The root of the problem is, apparently, installing just cabal-install
doesn't bring in all the wired-in GHC packages, which then get pulled off Hackage, not necessarily the correct versions, which in turn leads to weirdness. To avoid that, you need to install haskell-platform
instead of cabal-install
(which will pull in compiler, cabal-install, and a bunch of libraries). ghc-pandoc-devel
just happens to pull in all the wired-in packages needed for pandoc-crossref.
So, to summarize. On Fedora, you need haskell-platform
package for Haskell compilation to work in general. If you don't want to rebuild Pandoc (which takes quite a while), having both pandoc
and ghc-pandoc-devel
is recommended.
I guess I'll add a paragraph or two to Readme.
On Mac OS X, I get:
% cabal install pandoc-crossref
clang: error: unknown argument: '-no-pie'
`gcc' failed in phase `C Compiler'. (Exit code: 1)
which seems related. Researching now.
(I'm acting as editor... :)
Most likely unrelated. The error seems to stem from the fact that your system C compiler is clang instead of gcc, and not a fresh version apparently. Until last summer clang used -nopie
and didn't understand -no-pie
flag (which gcc does).
ok. I do find it funny that the first two or three google matches for my specific error came up with rescience-related people's attempts to install pandoc crossref :)
In any case I found a precompiled binary that seems to be working.
On OSX it's also available via Homebrew (brew install pandoc-crossref
)
Have likewise been struggling to install pandoc-crossref, and have now admitted defeat :( , as any further installation avenues are beyond my abilities. Just in case it is useful in developing a more robust installation process to help others in the future, I'm noting my failures here.
On Ubuntu native and Ubuntu Windows Linux Subsystem, all goes well until running cabal install pandoc-crossref
which results in a failure to install the updated version of pandoc:
cabal: Error: some packages failed to install: pandoc-1.19.2.1 failed during the building phase. The exception was: ExitFailure 1 pandoc-crossref-0.2.5.0 depends on pandoc-1.19.2.1 which failed to install.
I've also tried from a Debian Windows Linux Subsystem as this has a more up to date version of pandoc, but again at cabal install pandoc-crossref
pandoc-crossref itself fails to install.
cabal: Error: some packages failed to install: pandoc-crossref-0.3.1.0 failed during the building phase. The exception was: ExitFailure 1
Fortunately, as @rougier notes earlier in this thread that a submission can be made without submitting a compiled pdf I'll hopefully still be able to submit my paper!
@tretherington, the fact that cabal tries to build v2.5.0 indicates that your compiler is way too old. You might have some luck with prebuilt binaries available at the github releases page. If not, try building with stack, here's an issue detailing the process somewhat: https://github.com/lierdakil/pandoc-crossref/issues/195.
... Also, there are native Windows binaries available for both Pandoc and pandoc-crossref, no build necessary. Why are you trying to do this through WSL?
Having continued my Unix education, I've now got things working on my Ubuntu Windows Linux Subsystem. It was actually embarassingly simple, but just in case it is helpful for others who fail to get pandoc-crossref installed via
$ cabal update
$ cabal install pandoc-crossref
I simply checked my pandoc version with pandoc --version
and then as @lierdakil advised I went to the pandoc-crossref prebuilt binaries release page and downloaded the version of pandoc-crossref that matched my pandoc version.
Then once unzipped, it was a simple case of just moving the pandoc-crossref
file to ~/.cabal/bin/
as within the ReScience Makefile pandoc applies a filter that looks for ~/.cabal/bin/pandoc-crossref
@tretherington Thanks for the report. Maybe the culprit is insinde the Makefile. I know I added the ~/.cabal/bin/pandoc-crossref
for some reason but I think I've removed since. Maybe this is one of the reason some people have problems.