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

Unable to install pandoc-crossref that's required by the Makefile #38

Open
sanjayankur31 opened this issue Sep 22, 2017 · 24 comments
Open

Comments

@sanjayankur31
Copy link

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.

pandoc-crossref.txt

This is a Fedora 26 system here. Anyone else seeing this?

@rougier
Copy link
Member

rougier commented Sep 23, 2017

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 ?

@rougier
Copy link
Member

rougier commented Sep 23, 2017

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.

@lierdakil
Copy link

lierdakil commented Sep 25, 2017

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

@rougier
Copy link
Member

rougier commented Sep 25, 2017

@lierdakil Thanks.
@sanjayankur31 Did you make any progress with your installation problem ?

@sanjayankur31
Copy link
Author

None yet. I get the same issue on three different Fedora 26 installations. I'll ask the Fedora haskell folks for help.

@tpoisot
Copy link

tpoisot commented Oct 16, 2017

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.

@rougier
Copy link
Member

rougier commented Oct 16, 2017

@tpoisoit You mean you cannot install the pandoc-crossref ?

@tpoisot
Copy link

tpoisot commented Oct 16, 2017

Yes -- tried with the ghc devel stack too, and no luck.

@eddelbuettel
Copy link
Member

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
$

@sanjayankur31
Copy link
Author

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)

@eddelbuettel
Copy link
Member

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).

@sanjayankur31
Copy link
Author

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.

@tpoisot
Copy link

tpoisot commented Oct 16, 2017

@sanjayankur31 this is not working for me (on F26)

@lierdakil
Copy link

@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.

@eddelbuettel
Copy link
Member

@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 ? ]

@lierdakil
Copy link

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.

@ctb
Copy link

ctb commented May 14, 2018

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... :)

@lierdakil
Copy link

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).

@ctb
Copy link

ctb commented May 14, 2018 via email

@damiendr
Copy link

On OSX it's also available via Homebrew (brew install pandoc-crossref)

@tretherington
Copy link

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!

@lierdakil
Copy link

@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: lierdakil/pandoc-crossref#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?

@tretherington
Copy link

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

@rougier
Copy link
Member

rougier commented Mar 21, 2019

@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.

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

8 participants